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 void | operator() (surface &src) const override |
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 185 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 205 of file image_modifications.hpp.
|
inline |
Definition at line 210 of file image_modifications.hpp.
References degrees_.
|
overridevirtual |
Applies the image-path modification on the specified surface.
Implements image::modification.
Definition at line 169 of file image_modifications.cpp.
References rotate_180_surface(), rotate_90_surface(), rotate_any_surface(), and src.
|
private |
Definition at line 213 of file image_modifications.hpp.
Referenced by no_op().
|
private |
Definition at line 215 of file image_modifications.hpp.
|
private |
Definition at line 214 of file image_modifications.hpp.