My Project
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ParaEngine::Color Class Reference

Public Member Functions

uint32 & DWColor (void)
 
const uint32 & DWColor (void) const
 
 operator const uint32 () const
 
void operator= (const uint32 color)
 
void operator= (const LinearColor &color)
 
 Color (EnumForceInit)
 
 Color (uint8 InR, uint8 InG, uint8 InB, uint8 InA=255)
 
 Color (const LinearColor &C)
 
 Color (uint32 InColor)
 
std::string ToRGBString ()
 "255 255 255"
 
std::string ToRGBAString ()
 "255 255 255 255"
 
bool operator== (const Color &C) const
 
bool operator!= (const Color &C) const
 
void operator+= (const Color &C)
 
Color MutiplyOpacity (float fOpacity)
 
LinearColor FromRGBE () const
 
LinearColor ReinterpretAsLinear () const
 Reinterprets the color as a linear color. More...
 

Static Public Member Functions

static uint16 convert32_16 (uint32 rgb)
 conversion between 32bits color and 16 bits color
 
static uint32 convert16_32 (uint16 rgb)
 conversion between 32bits color and 16 bits color
 
static Color MakeRandomColor ()
 Makes a random but quite nice color.
 
static Color MakeRedToGreenColorFromScalar (float Scalar)
 Makes a color red->green with the passed in scalar (e.g. More...
 
static Color FromString (const char *sColor)
 

Public Attributes

union {
   struct {
      uint8   a
 
      uint8   r
 
      uint8   g
 
      uint8   b
 
   } 
 
   uint32   AlignmentDummy
 
}; 
 

Static Public Attributes

static const Color White
 Some pre-inited colors, useful for debug code.
 
static const Color Black
 
static const Color Red
 
static const Color Green
 
static const Color Blue
 
static const Color Yellow
 
static const Color Cyan
 
static const Color Magenta
 

Member Function Documentation

§ FromString()

Color ParaEngine::Color::FromString ( const char *  sColor)
static
Parameters
sColorRGBA or RGB "#ff000000" or "255 255 255 255" or "255 255 255"

§ MakeRedToGreenColorFromScalar()

Color Color::MakeRedToGreenColorFromScalar ( float  Scalar)
static

Makes a color red->green with the passed in scalar (e.g.

0 is red, 1 is green)

§ ReinterpretAsLinear()

LinearColor ParaEngine::Color::ReinterpretAsLinear ( ) const
inline

Reinterprets the color as a linear color.

Returns
The linear color representation.

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