17 #ifndef IMAGE_MODIFICATIONS_HPP_INCLUDED
18 #define IMAGE_MODIFICATIONS_HPP_INCLUDED
52 typedef std::map<int, std::vector<modification *>, std::greater<int> >
map_type;
75 texception(
const std::stringstream& message_stream);
138 const std::map<Uint32, Uint32>&
map()
const {
return rc_map_;}
Grayscale (GS) modification.
Scale (BLIT) modification.
blend_modification(int r, int g, int b, float a)
Fill background with a color (BG).
const std::map< Uint32, Uint32 > & map() const
mask_modification(const surface &mask, int x, int y)
Gaussian-like blur (BL) modification.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
GLint GLint GLsizei GLsizei GLsizei depth
Color-shift (CS, R, G, B) modification.
#define IMPLEMENT_LUA_JAILBREAK_EXCEPTION(type)
Helper macro for classes deriving from tlua_jailbreak_exception.
Adjust Alpha (ADJUST_ALPHA) modification.
Black and white (BW) modification.
const surface & get_mask() const
A modified priority queue used to order image modifications.
Overlay with ToD darkening (DARKEN).
GLuint const GLfloat * val
Plot Alpha (Alpha) modification.
rc_modification()
Default constructor.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
std::map< Uint32, Uint32 > & map()
GLint GLint GLint GLint GLint GLint y
xBRZ scale (xBRZ) modification
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
Mask (MASK) modification.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
o_modification(float opacity)
Recolor (RC/TC/PAL) modification.
const surface & get_surface() const
Make an image negative (NEG)
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
virtual int priority() const
Specifies the priority of the modification.
void push(modification *mod)
Adds mod to the queue (unless mod is nullptr).
GLdouble GLdouble GLdouble b
bool toggle_vert()
Toggle vertical mirror flag.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
bw_modification(int threshold)
cs_modification(int r, int g, int b)
virtual std::pair< int, int > calculate_size(const surface &src) const
std::map< int, std::vector< modification * >, std::greater< int > > map_type
Map from a mod's priority() to the mods having that priority.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
const surface & get_surface() const
negative_modification(int r, int g, int b)
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
Crop (CROP) modification.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
virtual std::pair< int, int > calculate_size(const surface &src) const =0
Scale exact modification.
GLboolean GLboolean GLboolean GLboolean a
Color blending (BLEND) modification.
virtual int priority() const
Specifies the priority of the modification.
Overlay with ToD brightening (BRIGHTEN).
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
Base abstract class for an image-path modification.
std::map< Uint32, Uint32 > rc_map_
bl_modification(int depth)
background_modification(SDL_Color const &c)
const std::string ¶meters float amount
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
static modification_queue decode(const std::string &)
Decodes modifications from a modification string.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
Give to the image a sepia tint (SEPIA)
rc_modification(const std::map< Uint32, Uint32 > &recolor_map)
RC-map based constructor.
Rotate (ROTATE) modification.
modification * top() const
Returns the top element in the queue .
Base class for exceptions that want to be thrown 'through' lua.
scale_into_modification(int width, int height, std::string fn, bool use_nn)
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
light_modification(const surface &surf)
float get_opacity() const
GLint GLint GLint GLint GLint x
GLdouble GLdouble GLdouble r
size_t size() const
Returns the number of elements in the queue.
Opacity (O) modification.
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
Wipe Alpha (Wipe_Alpha) modification.
blit_modification(const surface &surf, int x, int y)
const std::string message
The error message regarding the failed operation.
scale_exact_modification(int width, int height, std::string fn, bool use_nn)
adjust_alpha_modification(fixed_t amount)
scale_modification(int width, int height, std::string fn, bool use_nn)
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
Exception thrown by the operator() when an error occurs.
bool toggle_horiz()
Toggle horizontal mirror flag.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
this module manages the cache of images.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
virtual surface operator()(const surface &src) const =0
Applies the image-path modification on the specified surface.
virtual std::pair< int, int > calculate_size(const surface &src) const
map_type priorities_
Map from a mod's priority() to the mods having that priority.
Scale into (SCALE_INTO) modification.
GLsizei GLenum GLuint GLuint GLsizei char * message
const SDL_Color & get_color() const
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
rotate_modification(int degrees=90, int zoom=16, int offset=8)
Constructor.
texception(const std::stringstream &message_stream)
Constructor.
GLint GLint GLint GLint GLint GLint GLsizei width
void pop()
Removes the top element from the queue.
swap_modification(channel r, channel g, channel b, channel a)
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
const SDL_Rect & get_slice() const
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
GLsizei const GLcharARB ** string
virtual surface operator()(const surface &src) const
Applies the image-path modification on the specified surface.
Mirror (FL) modification.
fl_modification(bool horiz=false, bool vert=false)
Constructor.
Scaling modifications base class.
crop_modification(const SDL_Rect &slice)