Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

PLPixel24 Class Reference

#include <plpixel24.h>

List of all members.

Public Member Functions

 PLPixel24 (PLBYTE r, PLBYTE g, PLBYTE b)
void Set (PLBYTE r, PLBYTE g, PLBYTE b)
void SetR (PLBYTE r)
void SetG (PLBYTE g)
void SetB (PLBYTE b)
PLBYTE GetR () const
PLBYTE GetG () const
PLBYTE GetB () const
PLPixel24 operator= (const PLPixel32 Pix)
 operator PLPixel32 () const
bool operator== (const PLPixel24 &) const
bool operator!= (const PLPixel24 &) const
int BoxDist (const PLPixel24 Pix) const

Static Public Member Functions

PLPixel24 Blend (int Factor, const PLPixel24 Pix1, const PLPixel24 Pix2)


Detailed Description

24 bit pixel class. A pixel in this class contains 8 bits each of red, green and blue. The order of the color components is OS-dependent and defined in config.h. This class is meant to be fast, so all methods are inlined.

Definition at line 22 of file plpixel24.h.


Member Function Documentation

PLPixel24 PLPixel24::Blend int  Factor,
const PLPixel24  Pix1,
const PLPixel24  Pix2
[inline, static]
 

Returns a weighed average between two pixels. Factor must be between 0 and 256. Factor=256 means Pix1 is the result, Factor=0 means Pix2 is the result.

Definition at line 133 of file plpixel24.h.

References GetB(), GetG(), and GetR().

int PLPixel24::BoxDist const PLPixel24  Pix  )  const [inline]
 

Simple and fast 'distance' between two pixels. Just adds the distances between the color components and treats colors equally.

Definition at line 125 of file plpixel24.h.

References GetB(), GetG(), and GetR().


The documentation for this class was generated from the following file:
Generated on Sun Jun 6 13:42:23 2004 for paintlib by doxygen 1.3.2