Mana
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Dye Class Reference

Class for dispatching pixel-recoloring amongst several palettes. More...

#include <dye.h>

Public Member Functions

 Dye (const std::string &dye)
 Creates a set of palettes based on the given string.
 
 ~Dye ()
 Destroys the associated palettes.
 
void update (int color[3]) const
 Modifies a pixel color.
 

Static Public Member Functions

static void instantiate (std::string &target, const std::string &palettes)
 Fills the blank in a dye placeholder with some palette names.
 

Private Attributes

DyePalettemDyePalettes [7]
 The order of the palettes, as well as their uppercase letter, is:
 

Detailed Description

Class for dispatching pixel-recoloring amongst several palettes.

Definition at line 65 of file dye.h.

Constructor & Destructor Documentation

◆ Dye()

Dye::Dye ( const std::string &  dye)

Creates a set of palettes based on the given string.

The parts of string are separated by semi-colons. Each part starts by an uppercase letter, followed by a colon and then a palette name.

Definition at line 179 of file dye.cpp.

◆ ~Dye()

Dye::~Dye ( )

Destroys the associated palettes.

Definition at line 224 of file dye.cpp.

Member Function Documentation

◆ instantiate()

void Dye::instantiate ( std::string &  target,
const std::string &  palettes 
)
static

Fills the blank in a dye placeholder with some palette names.

Definition at line 252 of file dye.cpp.

◆ update()

void Dye::update ( int  color[3]) const

Modifies a pixel color.

Definition at line 230 of file dye.cpp.

Member Data Documentation

◆ mDyePalettes

DyePalette* Dye::mDyePalettes[7]
private

The order of the palettes, as well as their uppercase letter, is:

Red, Green, Yellow, Blue, Magenta, White (or rather gray).

Definition at line 99 of file dye.h.


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