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

PLPixel32 Class Reference

#include <plpixel32.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

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


Detailed Description

32 bit pixel class. A pixel in this class contains 8 bits each of red, green, blue and alpha. 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 23 of file plpixel32.h.


Member Function Documentation

PLPixel32 PLPixel32::Blend int  Factor,
const PLPixel32  Pix1,
const PLPixel32  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 161 of file plpixel32.h.

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

int PLPixel32::BoxDist const PLPixel32  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 154 of file plpixel32.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