Public Types | Public Member Functions | Public Attributes

img_color_t Struct Reference

standard 4-byte color value for images. Byte ranges 0-255 More...

#include <color.h>

List of all members.

Public Types

enum  eConstants { eMaxComponent = 255 }

Public Member Functions

 img_color_t (void) throw ()
 img_color_t (int r, int g, int b, int a=eMaxComponent) throw ()
 see caveats about the int-based setter
 img_color_t (const img_color_t &c) throw ()
const img_color_toperator= (const img_color_t &c) throw ()
void set (int r, int g, int b, int a=eMaxComponent) throw ()
 could be inefficient! If you are calling this a lot, consider setting the byte values directly and doing your own validation.
void clear (void) throw ()
 this will set the color to solid (opaque) black
void dump (const char *title) const throw ()
 for debugging

Public Attributes

byte_t red
byte_t green
byte_t blue
byte_t alpha

Detailed Description

standard 4-byte color value for images. Byte ranges 0-255

Definition at line 53 of file color.h.


Member Enumeration Documentation

Enumerator:
eMaxComponent 

max byte value for a color

Definition at line 55 of file color.h.


Constructor & Destructor Documentation

img_color_t::img_color_t ( void   )  throw () [inline]

Definition at line 60 of file color.h.

img_color_t::img_color_t ( int  r,
int  g,
int  b,
int  a = eMaxComponent 
) throw () [inline]

see caveats about the int-based setter

Definition at line 62 of file color.h.

img_color_t::img_color_t ( const img_color_t c  )  throw () [inline]

Definition at line 64 of file color.h.


Member Function Documentation

const img_color_t& img_color_t::operator= ( const img_color_t c  )  throw () [inline]

Definition at line 67 of file color.h.

void img_color_t::set ( int  r,
int  g,
int  b,
int  a = eMaxComponent 
) throw () [inline]

could be inefficient! If you are calling this a lot, consider setting the byte values directly and doing your own validation.

Definition at line 77 of file color.h.

void img_color_t::clear ( void   )  throw () [inline]

this will set the color to solid (opaque) black

Definition at line 89 of file color.h.

void img_color_t::dump ( const char *  title  )  const throw () [inline]

for debugging

Definition at line 95 of file color.h.


Member Data Documentation

Definition at line 101 of file color.h.

Definition at line 102 of file color.h.

Definition at line 103 of file color.h.

Definition at line 104 of file color.h.


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