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

RGBA Class Reference

#include <bitmap.h>

Inheritance diagram for RGBA:

Packed Bitmap List of all members.

Detailed Description

32-bit RGBA bitmap where the last 8 bits is the alpha channel describing the opacity of each pixel.


Public Member Functions

 RGBA (int width=0, int height=0)
virtual enum ColorSpace get_color_space () const
 Used for identifying the type of a Bitmap at runtime.

virtual Bitmapcreate () const
 "Virtual constructor".

virtual void blend (const Bitmap &source, int xoff=0, int yoff=0, int alpha=0)
 Alpha blends source onto this.

virtual void put (const Bitmap &source, int xoff=0, int yoff=0)
 Identical to blend, except that target pixels in this will be overwritten completely.


Protected Member Functions

virtual int get_pixel_alpha (int pixel) const
virtual void set_pixel_alpha (int pixel, int value)


Member Function Documentation

void RGBA::blend const Bitmap source,
int  xoff = 0,
int  yoff = 0,
int  alpha = 0
[virtual]
 

Alpha blends source onto this.

The alpha parameter is a number between -255 and 255 that's added to source's alpha channel, i.e. alpha should usually be negative or 0. You can also specify x and y offsets with xoff and yoff.

This blend funtion works with every type of bitmap, but it's slow. For better performance a virtual blend function should be written for each Bitmap type.

Reimplemented from Bitmap.

virtual Bitmap* RGBA::create  )  const [inline, virtual]
 

"Virtual constructor".

Returns an empty bitmap of the same derived class as this.

Implements Bitmap.

void RGBA::put const Bitmap source,
int  xoff = 0,
int  yoff = 0
[virtual]
 

Identical to blend, except that target pixels in this will be overwritten completely.

Has better performance than blend.

This put funtion works with every type of bitmap, but it's slow. For better performance a virtual put function should be written for each Bitmap type.

Reimplemented from Bitmap.


The documentation for this class was generated from the following files:
Generated on Sun Oct 19 17:34:48 2003 for rve by doxygen 1.3.3