MEPP2 Project
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
FEVV::Color Class Reference

#include <Color.hpp>

Collaboration diagram for FEVV::Color:
Collaboration graph

Public Member Functions

 ~Color ()
 
 Color ()
 
 Color (const unsigned char _redValue, const unsigned char _greenValue, const unsigned char _blueValue, const unsigned char _alphaValue=255)
 
 Color (const unsigned char _grayValue, const unsigned char _alphaValue=255)
 
 Color (const Color &_color)
 
ColorsetRGB (const unsigned char _redValue, const unsigned char _greenValue, const unsigned char _blueValue)
 
ColorsetRGBA (const unsigned char _redValue, const unsigned char _greenValue, const unsigned char _blueValue, const unsigned char _alphaValue=255)
 
void red (const unsigned char _redValue)
 
void green (const unsigned char _greenValue)
 
void blue (const unsigned char _blueValue)
 
void alpha (const unsigned char _alphaValue)
 
unsigned char red () const
 
unsigned char green () const
 
unsigned char blue () const
 
unsigned char alpha () const
 
bool operator== (const Color &_color) const
 
bool operator!= (const Color &_color) const
 
bool operator< (const Color &_color) const
 
Coloroperator= (const Color &_color)
 
Color operator+ (const Color &_color)
 
Coloroperator+= (const Color &_color)
 
Color operator- (const Color &_color)
 
Coloroperator-= (const Color &_color)
 
Color operator* (const double _scale)
 
Coloroperator*= (const double _scale)
 
void selfDisplay (std::ostream &out) const
 

Static Public Member Functions

static Color None (void)
 
static Color Black (void)
 
static Color White (void)
 
static Color Red (void)
 
static Color Pink (void)
 
static Color Purple (void)
 
static Color DeepPurple (void)
 
static Color Indigo (void)
 
static Color Blue (void)
 
static Color LightBlue (void)
 
static Color Cyan (void)
 
static Color Teal (void)
 
static Color Green (void)
 
static Color LightGreen (void)
 
static Color Lime (void)
 
static Color Yellow (void)
 
static Color Amber (void)
 
static Color Orange (void)
 
static Color DeepOrange (void)
 
static Color Brown (void)
 
static Color Grey (void)
 
static Color BlueGrey (void)
 
static Color Turquoise (void)
 
static Color GreenSea (void)
 
static Color Emerald (void)
 
static Color Nephritis (void)
 
static Color PeterRiver (void)
 
static Color BelizeHole (void)
 
static Color Amethyst (void)
 
static Color Wisteria (void)
 
static Color WetAsphalt (void)
 
static Color MidnightBlue (void)
 
static Color SunFlower (void)
 
static Color Carrot (void)
 
static Color Pumpkin (void)
 
static Color Alizarin (void)
 
static Color Pomegranate (void)
 
static Color Clouds (void)
 
static Color Silver (void)
 
static Color Concrete (void)
 
static Color Asbestos (void)
 

Private Attributes

unsigned char redComponent
 
unsigned char greenComponent
 
unsigned char blueComponent
 
unsigned char alphaComponent
 

Detailed Description

Definition at line 17 of file Color.hpp.

Constructor & Destructor Documentation

◆ ~Color()

FEVV::Color::~Color ( )
inline

Destructor.

Definition at line 23 of file Color.hpp.

◆ Color() [1/4]

FEVV::Color::Color ( )
inline

Default constructor.

Note
Set the color to BLACK.

Definition at line 16 of file Color.inl.

◆ Color() [2/4]

FEVV::Color::Color ( const unsigned char  _redValue,
const unsigned char  _greenValue,
const unsigned char  _blueValue,
const unsigned char  _alphaValue = 255 
)
inline

Constructor.

Parameters
[in]_redValuethe red component. Value must be into [0,255] interval.
[in]_greenValuethe green component. Value must be into [0,255] interval.
[in]_blueValuethe blue component. Value must be into [0,255] interval.
[in]_alphaValuethe alpha transparency. Value must be into [0,255] interval. (Default value = 255)

Definition at line 23 of file Color.inl.

◆ Color() [3/4]

FEVV::Color::Color ( const unsigned char  _grayValue,
const unsigned char  _alphaValue = 255 
)
inline

Constructor.

Parameters
[in]_grayValuethe grey component. Value must be into [0,255] interval.
[in]_alphaValuethe alpha transparency. Value must be into [0,255] interval. (Default value = 255)

Definition at line 33 of file Color.inl.

◆ Color() [4/4]

FEVV::Color::Color ( const Color _color)
inline

Copy Constructor.

Parameters
[in]_colorthe color to copy.

Definition at line 41 of file Color.inl.

Member Function Documentation

◆ Alizarin()

FEVV::Color FEVV::Color::Alizarin ( void  )
inlinestatic

Definition at line 530 of file Color.inl.

◆ alpha() [1/2]

unsigned char FEVV::Color::alpha ( ) const
inline

Get the alpha component.

Returns
the alpha component.

Definition at line 129 of file Color.inl.

◆ alpha() [2/2]

void FEVV::Color::alpha ( const unsigned char  _alphaValue)
inline

Set the alpha component.

Parameters
[in]_alphaValuethe alpha component.

Definition at line 101 of file Color.inl.

Here is the caller graph for this function:

◆ Amber()

FEVV::Color FEVV::Color::Amber ( void  )
inlinestatic

Definition at line 413 of file Color.inl.

◆ Amethyst()

FEVV::Color FEVV::Color::Amethyst ( void  )
inlinestatic

Definition at line 488 of file Color.inl.

Here is the caller graph for this function:

◆ Asbestos()

FEVV::Color FEVV::Color::Asbestos ( void  )
inlinestatic

Definition at line 560 of file Color.inl.

◆ BelizeHole()

FEVV::Color FEVV::Color::BelizeHole ( void  )
inlinestatic

Definition at line 482 of file Color.inl.

◆ Black()

FEVV::Color FEVV::Color::Black ( void  )
inlinestatic

Definition at line 323 of file Color.inl.

◆ blue() [1/2]

unsigned char FEVV::Color::blue ( ) const
inline

Get the blue component.

Returns
the blue component.

Definition at line 122 of file Color.inl.

◆ blue() [2/2]

void FEVV::Color::blue ( const unsigned char  _blueValue)
inline

Set the blue component.

Parameters
[in]_blueValuethe blue component.

Definition at line 94 of file Color.inl.

Here is the caller graph for this function:

◆ Blue()

FEVV::Color FEVV::Color::Blue ( void  )
inlinestatic

Definition at line 365 of file Color.inl.

Here is the caller graph for this function:

◆ BlueGrey()

FEVV::Color FEVV::Color::BlueGrey ( void  )
inlinestatic

Definition at line 443 of file Color.inl.

◆ Brown()

FEVV::Color FEVV::Color::Brown ( void  )
inlinestatic

Definition at line 431 of file Color.inl.

◆ Carrot()

FEVV::Color FEVV::Color::Carrot ( void  )
inlinestatic

Definition at line 518 of file Color.inl.

◆ Clouds()

FEVV::Color FEVV::Color::Clouds ( void  )
inlinestatic

Definition at line 542 of file Color.inl.

◆ Concrete()

FEVV::Color FEVV::Color::Concrete ( void  )
inlinestatic

Definition at line 554 of file Color.inl.

◆ Cyan()

FEVV::Color FEVV::Color::Cyan ( void  )
inlinestatic

Definition at line 377 of file Color.inl.

◆ DeepOrange()

FEVV::Color FEVV::Color::DeepOrange ( void  )
inlinestatic

Definition at line 425 of file Color.inl.

◆ DeepPurple()

FEVV::Color FEVV::Color::DeepPurple ( void  )
inlinestatic

Definition at line 353 of file Color.inl.

◆ Emerald()

FEVV::Color FEVV::Color::Emerald ( void  )
inlinestatic

Definition at line 464 of file Color.inl.

◆ green() [1/2]

unsigned char FEVV::Color::green ( ) const
inline

Get the green component.

Returns
the green component.

Definition at line 115 of file Color.inl.

◆ green() [2/2]

void FEVV::Color::green ( const unsigned char  _greenValue)
inline

Set the green component.

Parameters
[in]_greenValuethe green component.

Definition at line 87 of file Color.inl.

Here is the caller graph for this function:

◆ Green()

FEVV::Color FEVV::Color::Green ( void  )
inlinestatic

Definition at line 389 of file Color.inl.

Here is the caller graph for this function:

◆ GreenSea()

FEVV::Color FEVV::Color::GreenSea ( void  )
inlinestatic

Definition at line 458 of file Color.inl.

◆ Grey()

FEVV::Color FEVV::Color::Grey ( void  )
inlinestatic

Definition at line 437 of file Color.inl.

◆ Indigo()

FEVV::Color FEVV::Color::Indigo ( void  )
inlinestatic

Definition at line 359 of file Color.inl.

◆ LightBlue()

FEVV::Color FEVV::Color::LightBlue ( void  )
inlinestatic

Definition at line 371 of file Color.inl.

◆ LightGreen()

FEVV::Color FEVV::Color::LightGreen ( void  )
inlinestatic

Definition at line 395 of file Color.inl.

◆ Lime()

FEVV::Color FEVV::Color::Lime ( void  )
inlinestatic

Definition at line 401 of file Color.inl.

◆ MidnightBlue()

FEVV::Color FEVV::Color::MidnightBlue ( void  )
inlinestatic

Definition at line 506 of file Color.inl.

◆ Nephritis()

FEVV::Color FEVV::Color::Nephritis ( void  )
inlinestatic

Definition at line 470 of file Color.inl.

◆ None()

FEVV::Color FEVV::Color::None ( void  )
inlinestatic

Definition at line 317 of file Color.inl.

Here is the caller graph for this function:

◆ operator!=()

bool FEVV::Color::operator!= ( const Color _color) const
inline

Definition at line 148 of file Color.inl.

◆ operator*()

FEVV::Color FEVV::Color::operator* ( const double  _scale)
inline

Definition at line 274 of file Color.inl.

◆ operator*=()

FEVV::Color & FEVV::Color::operator*= ( const double  _scale)
inline

Definition at line 291 of file Color.inl.

◆ operator+()

FEVV::Color FEVV::Color::operator+ ( const Color _color)
inline

Definition at line 199 of file Color.inl.

◆ operator+=()

FEVV::Color & FEVV::Color::operator+= ( const Color _color)
inline

Definition at line 219 of file Color.inl.

◆ operator-()

FEVV::Color FEVV::Color::operator- ( const Color _color)
inline

Definition at line 237 of file Color.inl.

◆ operator-=()

FEVV::Color & FEVV::Color::operator-= ( const Color _color)
inline

Definition at line 257 of file Color.inl.

◆ operator<()

bool FEVV::Color::operator< ( const Color _color) const
inline

Definition at line 157 of file Color.inl.

◆ operator=()

FEVV::Color & FEVV::Color::operator= ( const Color _color)
inline

Definition at line 187 of file Color.inl.

◆ operator==()

bool FEVV::Color::operator== ( const Color _color) const
inline

Definition at line 138 of file Color.inl.

◆ Orange()

FEVV::Color FEVV::Color::Orange ( void  )
inlinestatic

Definition at line 419 of file Color.inl.

◆ PeterRiver()

FEVV::Color FEVV::Color::PeterRiver ( void  )
inlinestatic

Definition at line 476 of file Color.inl.

◆ Pink()

FEVV::Color FEVV::Color::Pink ( void  )
inlinestatic

Definition at line 341 of file Color.inl.

Here is the caller graph for this function:

◆ Pomegranate()

FEVV::Color FEVV::Color::Pomegranate ( void  )
inlinestatic

Definition at line 536 of file Color.inl.

◆ Pumpkin()

FEVV::Color FEVV::Color::Pumpkin ( void  )
inlinestatic

Definition at line 524 of file Color.inl.

◆ Purple()

FEVV::Color FEVV::Color::Purple ( void  )
inlinestatic

Definition at line 347 of file Color.inl.

◆ red() [1/2]

unsigned char FEVV::Color::red ( ) const
inline

Get the red component.

Returns
the red component.

Definition at line 108 of file Color.inl.

◆ red() [2/2]

void FEVV::Color::red ( const unsigned char  _redValue)
inline

Set the red component.

Parameters
[in]_redValuethe red component.

Definition at line 80 of file Color.inl.

Here is the caller graph for this function:

◆ Red()

FEVV::Color FEVV::Color::Red ( void  )
inlinestatic

Definition at line 335 of file Color.inl.

Here is the caller graph for this function:

◆ selfDisplay()

void FEVV::Color::selfDisplay ( std::ostream &  out) const
inline

Definition at line 307 of file Color.inl.

◆ setRGB()

FEVV::Color & FEVV::Color::setRGB ( const unsigned char  _redValue,
const unsigned char  _greenValue,
const unsigned char  _blueValue 
)
inline

Set the RGB value to the current Color.

Note
The alpha component will be set to 255.
Parameters
[in]_redValuethe red component. Value must be into [0,255] interval.
[in]_greenValuethe green component. Value must be into [0,255] interval.
[in]_blueValuethe blue component. Value must be into [0,255] interval.

Definition at line 51 of file Color.inl.

◆ setRGBA()

FEVV::Color & FEVV::Color::setRGBA ( const unsigned char  _redValue,
const unsigned char  _greenValue,
const unsigned char  _blueValue,
const unsigned char  _alphaValue = 255 
)
inline

Set the RGBA value to the current Color.

Parameters
[in]_redValuethe red component. Value must be into [0,255] interval.
[in]_greenValuethe green component. Value must be into [0,255] interval.
[in]_blueValuethe blue component. Value must be into [0,255] interval.
[in]_alphaValuethe alpha transparency. Value must be into [0,255] interval. (Default value = 255)

Definition at line 65 of file Color.inl.

◆ Silver()

FEVV::Color FEVV::Color::Silver ( void  )
inlinestatic

Definition at line 548 of file Color.inl.

◆ SunFlower()

FEVV::Color FEVV::Color::SunFlower ( void  )
inlinestatic

Definition at line 512 of file Color.inl.

◆ Teal()

FEVV::Color FEVV::Color::Teal ( void  )
inlinestatic

Definition at line 383 of file Color.inl.

◆ Turquoise()

FEVV::Color FEVV::Color::Turquoise ( void  )
inlinestatic

Definition at line 452 of file Color.inl.

◆ WetAsphalt()

FEVV::Color FEVV::Color::WetAsphalt ( void  )
inlinestatic

Definition at line 500 of file Color.inl.

Here is the caller graph for this function:

◆ White()

FEVV::Color FEVV::Color::White ( void  )
inlinestatic

Definition at line 329 of file Color.inl.

Here is the caller graph for this function:

◆ Wisteria()

FEVV::Color FEVV::Color::Wisteria ( void  )
inlinestatic

Definition at line 494 of file Color.inl.

Here is the caller graph for this function:

◆ Yellow()

FEVV::Color FEVV::Color::Yellow ( void  )
inlinestatic

Definition at line 407 of file Color.inl.

Here is the caller graph for this function:

Member Data Documentation

◆ alphaComponent

unsigned char FEVV::Color::alphaComponent
private

Definition at line 228 of file Color.hpp.

◆ blueComponent

unsigned char FEVV::Color::blueComponent
private

Definition at line 227 of file Color.hpp.

◆ greenComponent

unsigned char FEVV::Color::greenComponent
private

Definition at line 226 of file Color.hpp.

◆ redComponent

unsigned char FEVV::Color::redComponent
private

Definition at line 225 of file Color.hpp.


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