Color Class Reference

color with red, green, blue and alpha component More...

#include <color.hh>


Public Types

enum  COLOR_NAME {
  WHITE = 0xffffff, LIGHT_GREY = 0xaaaaff, GREY = 0x999999ff, DARK_GREY = 0x333333ff,
  BLACK = 0x000000, RED = 0xff0000, GREEN = 0x00ff00, BLUE = 0x0000ff,
  CYAN = 0x00ffff, MAGENTA = 0xff00ff, YELLOW = 0xffff00
}

Public Member Functions

 Color ()
 Color (float r, float g, float b, float a=1.0)
 Color (int hex_code)
float & Red ()
const float & Red () const
float & Green ()
const float & Green () const
float & Blue ()
const float & Blue () const
float & Alpha ()
const float & Alpha () const
 operator float * ()
 operator const float * () const
Coloroperator*= (float rhs)
Coloroperator+= (float rhs)
Coloroperator+= (const Color &rhs)
Coloroperator-= (const Color &rhs)
Coloroperator-= (float rhs)
Coloroperator/= (float rhs)

Static Public Member Functions

static Color FromRGB (unsigned char r, unsigned char g, unsigned char b, unsigned char a=0xff)


Detailed Description

color with red, green, blue and alpha component

Definition at line 35 of file color.hh.


Member Enumeration Documentation

enum COLOR_NAME

Enumerator:
WHITE 
LIGHT_GREY 
GREY 
DARK_GREY 
BLACK 
RED 
GREEN 
BLUE 
CYAN 
MAGENTA 
YELLOW 

Definition at line 54 of file color.hh.


Constructor & Destructor Documentation

Color (  )  [inline]

Definition at line 40 of file color.hh.

Color ( float  r,
float  g,
float  b,
float  a = 1.0 
) [inline]

Definition at line 47 of file color.hh.

Color ( int  hex_code  ) 


Member Function Documentation

const float& Alpha (  )  const [inline]

Definition at line 77 of file color.hh.

float& Alpha (  )  [inline]

Definition at line 76 of file color.hh.

const float& Blue (  )  const [inline]

Definition at line 75 of file color.hh.

float& Blue (  )  [inline]

Definition at line 74 of file color.hh.

static Color FromRGB ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a = 0xff 
) [inline, static]

Definition at line 79 of file color.hh.

const float& Green (  )  const [inline]

Definition at line 73 of file color.hh.

float& Green (  )  [inline]

Definition at line 72 of file color.hh.

operator const float * (  )  const [inline]

Definition at line 89 of file color.hh.

operator float * (  )  [inline]

Definition at line 88 of file color.hh.

Color& operator*= ( float  rhs  ) 

Color& operator+= ( const Color rhs  ) 

Color& operator+= ( float  rhs  ) 

Color& operator-= ( float  rhs  ) 

Color& operator-= ( const Color rhs  ) 

Color& operator/= ( float  rhs  ) 

const float& Red (  )  const [inline]

Definition at line 71 of file color.hh.

float& Red (  )  [inline]

Definition at line 70 of file color.hh.


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

Generated on Fri Jul 2 14:23:06 2010 for OpenStructure by  doxygen 1.5.8