HGL::ImageOutput::ICanvas::RGBA Struct Reference
[Image output plugins]

Structure representing a color. More...

#include <icanvas.h>

List of all members.

Public Member Functions

 RGBA (uint32_t index) throw ()
 Constructor.
 RGBA (uint8_t r, uint8_t g, uint8_t b, uint8_t a) throw ()
 Constructor.
 RGBA (const std::string &hexStr) throw ()
 Constructor.
 RGBA () throw ()
 Constructor.
virtual ~RGBA () throw ()
 Destructor.
uint32_t getColorIndex () const throw ()
 Gets the color index.

Public Attributes

uint8_t alpha
 the alpha value between 0 and 255
uint8_t blue
 the blue value between 0 and 255
uint8_t green
 the green value between 0 and 255
uint8_t red
 the red value between 0 and 255

Detailed Description

Structure representing a color.

Includes the alpha channel

Author:
Heiko Schäfer <heiko@hgl.rangun.de>

Constructor & Destructor Documentation

HGL::ImageOutput::ICanvas::RGBA::RGBA (  )  throw ()

Constructor.

Initial is color white with no opacity (rsep. full transparent)

HGL::ImageOutput::ICanvas::RGBA::RGBA ( const std::string &  hexStr  )  throw () [explicit]

Constructor.

Parameters:
hexStr a string in the form rrggbbaa
HGL::ImageOutput::ICanvas::RGBA::RGBA ( uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a 
) throw ()

Constructor.

Parameters:
r the red value between 0 and 255
g the green value between 0 and 255
b the blue value between 0 and 255
a the alpha value between 0 and 255
HGL::ImageOutput::ICanvas::RGBA::RGBA ( uint32_t  index  )  throw ()

Constructor.

Constructs an RGBA instance from a 32 bit integer.

The integer should have a hex form like 0xrrggbbaa.

See also:
RGBA(const std::string &hexStr)
Parameters:
index the color index
Since:
0.4.49
virtual HGL::ImageOutput::ICanvas::RGBA::~RGBA (  )  throw () [virtual]

Destructor.


Member Function Documentation

uint32_t HGL::ImageOutput::ICanvas::RGBA::getColorIndex (  )  const throw ()

Gets the color index.

Returns:
the color index
Since:
0.4.49

Member Data Documentation

the alpha value between 0 and 255

the blue value between 0 and 255

the green value between 0 and 255

the red value between 0 and 255


Generated on 9 Apr 2014 for hgl 0.5.26~svn by  doxygen 1.6.1