Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

IMG_ColorRGBA Class Reference

Implements a color with red, green, blue and alpha components. More...

#include <IMG_Color.h>

List of all members.

Public Methods

 IMG_ColorRGBA (float r=0,float g=0,float b=0,float a=0)
 Constructs a color with the given values. More...

 IMG_ColorRGBA (const IMG_ColorRGBA &c)
 Copy constructor. More...

 IMG_ColorRGBA (const IMG_ColorRGB &c)
 Constructs a color with alpha from one without. More...

void blendColor (const IMG_ColorRGBA &c)
 Blends the given color with this color. More...


Public Attributes

float m_r
 Red component of the color.

float m_g
 Green component of the color.

float m_b
 Blue component of the color.

float m_a
 Alpha component of the color.


Detailed Description

Implements a color with red, green, blue and alpha components.

Components are stored as floats.

Author(s):
Maarten Gribnau
Date:
March 6, 2001


Constructor & Destructor Documentation

IMG_ColorRGBA::IMG_ColorRGBA ( float r = 0,
float g = 0,
float b = 0,
float a = 0 ) [inline]
 

Constructs a color with the given values.

Parameters:
r   requested red component of the color
g   requested green component of the color
b   requested blue component of the color
a   requested alpha component of the color

IMG_ColorRGBA::IMG_ColorRGBA ( const IMG_ColorRGBA & c ) [inline]
 

Copy constructor.

Parameters:
c   the color to copy.

IMG_ColorRGBA::IMG_ColorRGBA ( const IMG_ColorRGB & c ) [inline]
 

Constructs a color with alpha from one without.

Parameters:
c   the color to copy.


Member Function Documentation

void IMG_ColorRGBA::blendColor ( const IMG_ColorRGBA & c ) [inline]
 

Blends the given color with this color.

Uses the alpha of the given color for blending. The alpha of this color is left untouched.

Parameters:
c   the color to blend


The documentation for this class was generated from the following file:
Generated at Thu May 3 17:29:38 2001 for ImgLib by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000