Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csRGBpixel Struct Reference

An RGB pixel. More...

#include <rgbpixel.h>

List of all members.

Public Methods

 csRGBpixel ()
 Constructor (initialize to zero, alpha to 255).

 csRGBpixel (const csRGBpixel &p)
 Copy constructor.

 csRGBpixel (const csRGBcolor &c)
 Yet another copy constructor.

 csRGBpixel (int r, int g, int b)
 Initialize the pixel with some R/G/B value.

bool operator== (const csRGBcolor &c) const
 Compare with an csRGBcolor.

bool operator== (const csRGBpixel &p) const
 Compare with an csRGBpixel (including alpha value).

bool operator!= (const csRGBcolor &c) const
 Check if the csRGBpixel is not equal to an csRGBcolor.

bool operator!= (const csRGBpixel &p) const
 Check if this csRGBpixel is not equal to another csRGBpixel (including alpha).

 operator csRGBcolor () const
 Construct an csRGBcolor from this csRGBpixel.

bool eq (const csRGBpixel &p) const
 Compare with another csRGBpixel, but don't take alpha into account.

int Intensity ()
 Get the pixel intensity.

unsigned char Luminance ()
void Set (const int r, const int g, const int b)
 Assign given red/green/blue values to this pixel.

void Set (const int r, const int g, const int b, const int a)
 Assign given red/green/blue/alpha values to this pixel.

void Set (const csRGBpixel &p)

Public Attributes

unsigned char red
 The red, green, blue and alpha components.

unsigned char green
 The red, green, blue and alpha components.

unsigned char blue
 The red, green, blue and alpha components.

unsigned char alpha
 The red, green, blue and alpha components.


Detailed Description

An RGB pixel.

In addition to R,G,B color components this structure also contains the Alpha channel component, which is used in images (that potentially have an alpha channel).


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000