Class hierarchy Compound list File list Compound Members
BitmapFilter Class Reference
Generic abstract bitmap filter. More...
Inherited by FadeFilter and InverseFilter.
List of all members.
Public Members
- enum ErrorReturnValues { NO_INPUTS ,
NO_COMMON_REGION
}
- Return values.
- BitmapFilter (Bitmap* Output)
- Constructs a filter that will write its output to the given bitmap.
- virtual ~BitmapFilter ()
- Base virtual destructor.
- long addInput (Bitmap* Input)
- Add an input bitmap, that will be used to calculate the output.
- long addInput (Bitmap* Input, Vector2D Offset)
- Add an input bitmap, that will be used to calculate the output.
- long activate ()
- Activate the filter, and calculate the output bitmap.
- long activate (Rect2D Region)
- Activate the filter, and calculate the output bitmap.
- virtual TColor filterPixel (TColor** InputPixels, int NumberOfInputs) = 0
- Calculates the output pixel value, by considering all or some inputs.
Protected Members
- void getColorComponents (TColor Color, int& Red, int& Green, int& Blue)
- Separate a 16 bit color to its components (0..255) each.
- TColor getColor (int Red, int Green, int Blue)
- Combine the components into a 16 bit color value.
Detailed Description
Generic abstract bitmap filter.
Allows creating 2D special effects on a pixel basis.
Member Enumeration Type Documentation
enum BitmapFilter::ErrorReturnValues
Member Function Documentation
BitmapFilter::BitmapFilter(Bitmap* Output)
Constructs a filter that will write its output to the given bitmap.
virtual BitmapFilter::~BitmapFilter() [virtual]
long BitmapFilter::addInput(Bitmap* Input)
Add an input bitmap, that will be used to calculate the output.
Uses bitmap from offset 0,0
long BitmapFilter::addInput(Bitmap* Input, Vector2D Offset)
Add an input bitmap, that will be used to calculate the output.
The offset is used to use a rectangle within a large bitmap.
long BitmapFilter::activate()
Activate the filter, and calculate the output bitmap.
long BitmapFilter::activate(Rect2D Region)
Activate the filter, and calculate the output bitmap.
Process only the given rectangle.
virtual TColor BitmapFilter::filterPixel(TColor** InputPixels, int NumberOfInputs) = 0 [pure virtual]
Calculates the output pixel value, by considering all or some inputs.
This pure virtual function must be overridden to supply filter behaviour.
Input1 = *InputPixels[0];
Input2 = *InputPixels[1];
NumberOfInputs specifies how many inputs are available.
Reimplemented in InverseFilter and FadeFilter.
void BitmapFilter::getColorComponents(TColor Color, int& Red, int& Green, int& Blue) [protected]
Separate a 16 bit color to its components (0..255) each.
TColor BitmapFilter::getColor(int Red, int Green, int Blue) [protected]
Combine the components into a 16 bit color value.
The documentation for this class was generated from the following file: