Scaling (SCALE[_INTO], SCALE[_INTO]_SHARP) modifications. More...
#include <image_modifications.hpp>
Public Types | |
enum | SCALE_FLAGS : uint8_t { SCALE_LINEAR = 0b00000 , SCALE_SHARP = 0b00001 , FIT_TO_SIZE = 0b00010 , PRESERVE_ASPECT_RATIO = 0b00100 , X_BY_FACTOR = 0b01000 , Y_BY_FACTOR = 0b10000 } |
Public Member Functions | |
scale_modification (point target_size, uint8_t flags) | |
virtual void | operator() (surface &src) const override |
Applies the image-path modification on the specified surface. More... | |
int | get_w () const |
int | get_h () const |
Public Member Functions inherited from image::modification | |
virtual | ~modification () |
virtual int | priority () const |
Specifies the priority of the modification. More... | |
Private Attributes | |
point | target_size_ {0,0} |
uint8_t | flags_ = SCALE_LINEAR | FIT_TO_SIZE |
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... | |
Scaling (SCALE[_INTO], SCALE[_INTO]_SHARP) modifications.
Definition at line 441 of file image_modifications.hpp.
enum image::scale_modification::SCALE_FLAGS : uint8_t |
Enumerator | |
---|---|
SCALE_LINEAR | |
SCALE_SHARP | |
FIT_TO_SIZE | |
PRESERVE_ASPECT_RATIO | |
X_BY_FACTOR | |
Y_BY_FACTOR |
Definition at line 445 of file image_modifications.hpp.
|
inline |
Definition at line 454 of file image_modifications.hpp.
|
inline |
Definition at line 462 of file image_modifications.hpp.
References target_size_.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 461 of file image_modifications.hpp.
References target_size_.
Referenced by BOOST_AUTO_TEST_CASE().
|
overridevirtual |
Applies the image-path modification on the specified surface.
Implements image::modification.
Definition at line 433 of file image_modifications.cpp.
References scale_surface_legacy(), scale_surface_sharp(), utf8::size(), and src.
|
private |
Definition at line 467 of file image_modifications.hpp.
|
private |
Definition at line 465 of file image_modifications.hpp.