The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Private Attributes | List of all members
image::rc_modification Class Reference

Recolor (RC/TC/PAL) modification. More...

#include <image_modifications.hpp>

Inheritance diagram for image::rc_modification:

Public Member Functions

 rc_modification ()
 Default constructor. More...
 
 rc_modification (const color_range_map &recolor_map)
 RC-map based constructor. More...
 
virtual void operator() (surface &src) const override
 Applies the image-path modification on the specified surface. More...
 
virtual int priority () const override
 Specifies the priority of the modification. More...
 
bool no_op () const
 
const color_range_mapmap () const
 
color_range_mapmap ()
 
- Public Member Functions inherited from image::modification
virtual ~modification ()
 

Private Attributes

color_range_map rc_map_
 

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...
 

Detailed Description

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 117 of file image_modifications.hpp.

Constructor & Destructor Documentation

◆ rc_modification() [1/2]

image::rc_modification::rc_modification ( )
inline

Default constructor.

Definition at line 123 of file image_modifications.hpp.

◆ rc_modification() [2/2]

image::rc_modification::rc_modification ( const color_range_map recolor_map)
inline

RC-map based constructor.

Parameters
recolor_mapThe palette switch map.

Definition at line 130 of file image_modifications.hpp.

Member Function Documentation

◆ map() [1/2]

color_range_map& image::rc_modification::map ( )
inline

Definition at line 141 of file image_modifications.hpp.

References rc_map_.

◆ map() [2/2]

const color_range_map& image::rc_modification::map ( ) const
inline

Definition at line 140 of file image_modifications.hpp.

References rc_map_.

Referenced by BOOST_AUTO_TEST_CASE().

◆ no_op()

bool image::rc_modification::no_op ( ) const
inline

Definition at line 138 of file image_modifications.hpp.

References rc_map_.

◆ operator()()

void image::rc_modification::operator() ( surface src) const
overridevirtual

Applies the image-path modification on the specified surface.

Implements image::modification.

Definition at line 154 of file image_modifications.cpp.

References recolor_image(), and src.

◆ priority()

virtual int image::rc_modification::priority ( ) const
inlineoverridevirtual

Specifies the priority of the modification.

Reimplemented from image::modification.

Definition at line 136 of file image_modifications.hpp.

Member Data Documentation

◆ rc_map_

color_range_map image::rc_modification::rc_map_
private

Definition at line 144 of file image_modifications.hpp.

Referenced by map(), and no_op().


The documentation for this class was generated from the following files: