#include <plbmpbase.h>
Inheritance diagram for PLBmpBase:
Public Member Functions | |
PLBmpBase () | |
Empty constructor. | |
virtual | ~PLBmpBase () |
Empty destructor. | |
bool const | operator== (PLBmpBase const &Other) |
void | CopyPixels (const PLBmpBase &SrcBmp) |
void | SetGrayPalette () |
void | SetPalette (PLPixel32 *pPal) |
Sets the color table to pPal. The contents of pPal are copied. | |
void | SetPaletteEntry (PLBYTE Entry, PLBYTE r, PLBYTE g, PLBYTE b, PLBYTE a) |
void | SetPaletteEntry (PLBYTE Entry, PLPixel32 Value) |
void | SetHasAlpha (bool b) |
void | SetAlphaChannel (PLBmpBase *pAlphaBmp) |
void | SetPixel (int x, int y, PLPixel32 pixel) |
Slow but simple function to set a single pixel. 32 bpp only. | |
PLPixel32 | GetPixel (int x, int y) const |
Slow but simple function to get a single pixel. 32 bpp only. | |
PLBYTE | FindNearestColor (PLPixel32 cr) |
int | GetNumColors () |
PLPixel32 * | GetPalette () const |
PLBYTE ** | GetLineArray () const |
PLPixel32 ** | GetLineArray32 () const |
PLPixel24 ** | GetLineArray24 () const |
PLPixel16 ** | GetLineArray16 () const |
bool | AlmostEqual (const PLBmpBase &Bmp, int epsilon) const |
void | SetResolution (const PLPoint &Resolution) |
Sets the bitmap resolution in pixels per inch. | |
void | SetQuantizationMode (int DitherType, int DitherPaletteType) |
Protected Member Functions | |
virtual void | initLocals (PLLONG Width, PLLONG Height, const PLPixelFormat &pf) |
Can be called from internalCreate() to initialize object state. | |
void | create8BPPCopy (const PLBmpBase &rSrcBmp) |
void | create1BPPCopy (const PLBmpBase &rSrcBmp) |
Protected Attributes | |
PLPixel32 * | m_pClrTab |
PLBYTE ** | m_pLineArray |
int | m_DitherType |
int | m_DitherPaletteType |
Definition at line 26 of file plbmpbase.h.
|
Returns true if Bmp and this are almost equal. The comparison is done by comparing the pixels in the bitmaps component-wise. If all components are closer than epsilon, the bitmaps are considered almost equal. |
|
BitBlts SrcBmp on the current bitmap. Color depth conversion is performed as nessesary. |
|
Find the nearest color to cr in the palette used by this bitmap Only works for 8 bpp bitmaps. |
|
Returns pointer to an array containing the starting addresses of the bitmap lines. This array should be used whenever the bitmap bits need to be manipulated directly. Definition at line 257 of file plbmpbase.h. Referenced by PLFilterFillRect< PixelC >::ApplyInPlace(), and GetPixel(). |
|
Returns pointer to an array containing the starting addresses of the bitmap lines. This array should be used whenever the bitmap bits need to be manipulated directly. Definition at line 280 of file plbmpbase.h. |
|
Returns pointer to an array containing the starting addresses of the bitmap lines. This array should be used whenever the bitmap bits need to be manipulated directly. Definition at line 272 of file plbmpbase.h. |
|
Returns pointer to an array containing the starting addresses of the bitmap lines. This array should be used whenever the bitmap bits need to be manipulated directly. Definition at line 264 of file plbmpbase.h. Referenced by SetPixel(). |
|
Returns number of colors that can be stored by a bitmap with this color depth. Definition at line 247 of file plbmpbase.h. |
|
Returns the address of the color table of the bitmap or NULL if no color table exists. The color table is stored as an array of consecutive PLPixel32 objects. Definition at line 288 of file plbmpbase.h. |
|
Test for equality. This function actually tests every pixel, so it's not fast. It's meant mainly for use in asserts and such. |
|
Replaces the alpha channel of the bitmap with a new one. This only works for bitmaps with 32 bpp. pAlphaBmp must point to an 8 bpp bitmap with the same dimensions as the object. The alpha channel information is physically copied into the bitmap. |
|
Fills the color table with a grayscale palette. This function is only usable for bitmaps containing a color table. Index 0 contains black (0) and the last index contains white (255). The alpha channel is set to opaque (255) for every palette entry. |
|
Sets whether a bitmap stores an alpha channel. Works for 8 and 32 bpp bitmaps. In either case, if b is true and the bitmap did not have an alpha channel before the call, the complete alpha channel is set to opaque by the call. |
|
Sets one entry in the color table. The function may only be called if there is a color table stored with the bitmap. The color table entry is set to the red, green, blue, and alpha values specified. Definition at line 220 of file plbmpbase.h. |
|
Sets one entry in the color table. The function may only be called if there is a color table stored with the bitmap. The color table entry is set to the red, green, blue, and alpha values specified. Definition at line 209 of file plbmpbase.h. |
|
Sets quality of conversion to 8 bpp by CreateCopy(). Valid parameters are defined in FilterQuantize.h. |