Rotate (ROTATE) modification. More...
#include <image_modifications.hpp>
Public Member Functions | |
rotate_modification (int degrees=90, int zoom=16, int offset=8) | |
Constructor. More... | |
virtual surface | operator() (const surface &src) const |
Applies the image-path modification on the specified surface. More... | |
bool | no_op () const |
Public Member Functions inherited from image::modification | |
virtual | ~modification () |
virtual int | priority () const |
Specifies the priority of the modification. More... | |
Private Attributes | |
int | degrees_ |
int | zoom_ |
int | offset_ |
Additional Inherited Members | |
Static Public Member Functions inherited from image::modification | |
static modification_queue | decode (const std::string &) |
Decodes modifications from a modification string. More... | |
Rotate (ROTATE) modification.
Definition at line 183 of file image_modifications.hpp.
|
inline |
Constructor.
degrees | Amount of rotation (in degrees). Positive values are clockwise; negative are counter-clockwise. |
zoom | The zoom level to calculate the rotation from. Greater values result in better results and increased runtime. This parameter will be ignored if degrees is a multiple of 90. |
offset | Determines the step size of the scanning of the zoomed source. Different offsets can produce better results, try them out. Greater values result in decreased runtime. This parameter will be ignored if degrees is a multiple of 90. If offset is greater than zoom the result will have empty pixels. |
Definition at line 203 of file image_modifications.hpp.
|
inline |
Definition at line 208 of file image_modifications.hpp.
References degrees_.
Applies the image-path modification on the specified surface.
Implements image::modification.
Definition at line 176 of file image_modifications.cpp.
References rotate_180_surface(), rotate_90_surface(), and rotate_any_surface().
|
private |
Definition at line 211 of file image_modifications.hpp.
Referenced by no_op().
|
private |
Definition at line 213 of file image_modifications.hpp.
|
private |
Definition at line 212 of file image_modifications.hpp.