Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Types | Public Member Functions | Public Attributes | List of all members
cColor Class Reference

#include <Color.h>

Public Types

enum  eColorLimits : unsigned int { COLOR_MIN = 0 , COLOR_MAX = 255 , COLOR_LIMIT = 256 , COLOR_NONE = 0xFFFFFFFF }
 

Public Member Functions

 cColor ()
 
 cColor (unsigned char a_Red, unsigned char a_Green, unsigned char a_Blue)
 
void Clear ()
 Resets the color. More...
 
unsigned char GetBlue () const
 Returns the blue value of the color. More...
 
unsigned char GetGreen () const
 Returns the green value of the color. More...
 
unsigned char GetRed () const
 Returns the red value of the color. More...
 
bool IsValid () const
 Returns whether the color is a valid color. More...
 
void SetBlue (unsigned char a_Blue)
 Alters the blue value of the color. More...
 
void SetColor (unsigned char a_Red, unsigned char a_Green, unsigned char a_Blue)
 Changes the color. More...
 
void SetGreen (unsigned char a_Green)
 Alters the green value of the color. More...
 
void SetRed (unsigned char a_Red)
 Alters the red value of the color. More...
 

Public Attributes

unsigned int m_Color
 

Detailed Description

Definition at line 13 of file Color.h.

Member Enumeration Documentation

◆ eColorLimits

enum cColor::eColorLimits : unsigned int
Enumerator
COLOR_MIN 
COLOR_MAX 
COLOR_LIMIT 
COLOR_NONE 

Definition at line 17 of file Color.h.

Constructor & Destructor Documentation

◆ cColor() [1/2]

cColor::cColor ( )
inline

Definition at line 24 of file Color.h.

◆ cColor() [2/2]

cColor::cColor ( unsigned char  a_Red,
unsigned char  a_Green,
unsigned char  a_Blue 
)
inline

Definition at line 25 of file Color.h.

Member Function Documentation

◆ Clear()

void cColor::Clear ( void  )
inline

Resets the color.

Definition at line 53 of file Color.h.

◆ GetBlue()

unsigned char cColor::GetBlue ( ) const

Returns the blue value of the color.

Definition at line 73 of file Color.cpp.

◆ GetGreen()

unsigned char cColor::GetGreen ( ) const

Returns the green value of the color.

Definition at line 64 of file Color.cpp.

◆ GetRed()

unsigned char cColor::GetRed ( ) const

Returns the red value of the color.

Definition at line 55 of file Color.cpp.

◆ IsValid()

bool cColor::IsValid ( void  ) const
inline

Returns whether the color is a valid color.

Definition at line 28 of file Color.h.

◆ SetBlue()

void cColor::SetBlue ( unsigned char  a_Blue)

Alters the blue value of the color.

Definition at line 46 of file Color.cpp.

◆ SetColor()

void cColor::SetColor ( unsigned char  a_Red,
unsigned char  a_Green,
unsigned char  a_Blue 
)

Changes the color.

Definition at line 19 of file Color.cpp.

◆ SetGreen()

void cColor::SetGreen ( unsigned char  a_Green)

Alters the green value of the color.

Definition at line 37 of file Color.cpp.

◆ SetRed()

void cColor::SetRed ( unsigned char  a_Red)

Alters the red value of the color.

Definition at line 28 of file Color.cpp.

Member Data Documentation

◆ m_Color

unsigned int cColor::m_Color

Definition at line 56 of file Color.h.


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