Bomberman
Public Member Functions | Private Attributes | List of all members
RAY::Color Class Reference

Object representation of color. More...

#include <Color.hpp>

Collaboration diagram for RAY::Color:

Public Member Functions

 Color (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 A Color constructor. More...
 
 Color (float h, float s, float v)
 A Color constructor. More...
 
 Color (const ::Color &)
 A constructor using ray's own color struct @info Useful when want to use pre-defined color. More...
 
 Color (const Color &)=default
 A default copy constructor. More...
 
 Color (unsigned int hexValue)
 Create a color from an hexadecimal value. More...
 
 ~Color ()=default
 A default destructor. More...
 
Coloroperator= (const Color &)=default
 An color is assignable. More...
 
ColorsetR (unsigned char r)
 set R-component of color More...
 
ColorsetG (unsigned char g)
 set G-component of color More...
 
ColorsetB (unsigned char b)
 set B-component of color More...
 
ColorsetA (unsigned char a)
 set A-component of color More...
 
unsigned char getR (void) const
 
unsigned char getG (void) const
 
unsigned char getB (void) const
 
unsigned char getA (void) const
 
int toHex (void) const
 

Private Attributes

::Color _color
 Color, really, that's just it... More...
 
INTERNAL __pad0__: operator ::Color() const
 

Detailed Description

Object representation of color.

Constructor & Destructor Documentation

◆ Color() [1/5]

RAY::Color::Color ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)

A Color constructor.

Parameters
rR-component of color
gB-component of color
gG-component of color
aA-component of color

◆ Color() [2/5]

RAY::Color::Color ( float  h,
float  s,
float  v 
)

A Color constructor.

Parameters
hH-component of color
sS-component of color
vV-component of color

◆ Color() [3/5]

RAY::Color::Color ( const ::Color color)

A constructor using ray's own color struct @info Useful when want to use pre-defined color.

◆ Color() [4/5]

RAY::Color::Color ( const Color )
default

A default copy constructor.

◆ Color() [5/5]

RAY::Color::Color ( unsigned int  hexValue)

Create a color from an hexadecimal value.

◆ ~Color()

RAY::Color::~Color ( )
default

A default destructor.

Member Function Documentation

◆ getA()

unsigned char RAY::Color::getA ( void  ) const
Returns
A-component of color

◆ getB()

unsigned char RAY::Color::getB ( void  ) const
Returns
B-component of color

◆ getG()

unsigned char RAY::Color::getG ( void  ) const
Returns
G-component of color

◆ getR()

unsigned char RAY::Color::getR ( void  ) const
Returns
R-component of color

◆ operator=()

Color& RAY::Color::operator= ( const Color )
default

An color is assignable.

◆ setA()

Color & RAY::Color::setA ( unsigned char  a)

set A-component of color

◆ setB()

Color & RAY::Color::setB ( unsigned char  b)

set B-component of color

◆ setG()

Color & RAY::Color::setG ( unsigned char  g)

set G-component of color

◆ setR()

Color & RAY::Color::setR ( unsigned char  r)

set R-component of color

◆ toHex()

int RAY::Color::toHex ( void  ) const
Returns
hexadecimal value of color

Member Data Documentation

◆ __pad0__

INTERNAL RAY::Color::__pad0__
private

◆ _color

::Color RAY::Color::_color
private

Color, really, that's just it...


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