Recolor (RC/TC/PAL) modification. More...
#include <image_modifications.hpp>


Public Member Functions | |
| rc_modification () | |
| Default constructor. | |
| rc_modification (const std::map< Uint32, Uint32 > &recolor_map) | |
| RC-map based constructor. | |
| 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. | |
| bool | no_op () const |
| const std::map< Uint32, Uint32 > & | map () const |
| std::map< Uint32, Uint32 > & | map () |
Private Attributes | |
| std::map< Uint32, Uint32 > | rc_map_ |
Recolor (RC/TC/PAL) modification.
It is used not only for color-range-based recoloring ("~RC(magenta>teal)") but also for team-color-based color range selection and recoloring ("~TC(3,magenta)") and palette switches ("~PAL(000000,005000 > FFFFFF,FF00FF)").
Definition at line 97 of file image_modifications.hpp.
| image::rc_modification::rc_modification | ( | ) | [inline] |
Default constructor.
Definition at line 103 of file image_modifications.hpp.
| image::rc_modification::rc_modification | ( | const std::map< Uint32, Uint32 > & | recolor_map | ) | [inline] |
RC-map based constructor.
| recolor_map | The palette switch map. |
Definition at line 110 of file image_modifications.hpp.
| const std::map<Uint32, Uint32>& image::rc_modification::map | ( | ) | const [inline] |
Definition at line 120 of file image_modifications.hpp.
References rc_map_.
| std::map<Uint32, Uint32>& image::rc_modification::map | ( | ) | [inline] |
Definition at line 121 of file image_modifications.hpp.
References rc_map_.
| bool image::rc_modification::no_op | ( | ) | const [inline] |
Definition at line 118 of file image_modifications.hpp.
References rc_map_.
Applies the image-path modification on the specified surface.
Implements image::modification.
Definition at line 122 of file image_modifications.cpp.
References rc_map_, and recolor_image().

| virtual int image::rc_modification::priority | ( | ) | const [inline, virtual] |
Specifies the priority of the modification.
Reimplemented from image::modification.
Definition at line 116 of file image_modifications.hpp.
std::map<Uint32, Uint32> image::rc_modification::rc_map_ [private] |
Definition at line 124 of file image_modifications.hpp.
Referenced by map(), no_op(), and operator()().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:24:40 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |