Logo Search packages:      
Sourcecode: paintlib version File versions

PLDirectFBBmp Class Reference

#include <pldirectfbbmp.h>

Inheritance diagram for PLDirectFBBmp:

PLBmp PLBmpInfo

List of all members.

Detailed Description

Manipulates bitmaps stored as DirectFB surfaces. 8, 24 and 32 bpp (pixel formats DSPF_ARGB, DSPF_RGB32, DSPF_RGB24, DSPF_A8). The surfaces used are system memory surfaces.

Definition at line 23 of file pldirectfbbmp.h.

Public Member Functions

bool AlmostEqual (const PLBmpBase &Bmp, int epsilon) const
void ApplyFilter (const PLFilter &Filter)
 Applies a filter to the bitmap.
virtual void AssertValid () const
void AsString (char *psz, int len) const
virtual void Create (const PLBmpInfo &Info)
virtual void Create (PLLONG Width, PLLONG Height, PLWORD BitsPerPixel, bool bAlphaChannel, bool bIsGreyscale, PLBYTE *pBits=0, int Stride=0, const PLPoint &Resolution=PLPoint(0, 0))
void CreateCopy (const PLBmpBase &rSrcBmp, int BPPWanted=0)
void CreateFilteredCopy (PLBmpBase &rSrcBmp, const PLFilter &rFilter)
virtual void CreateFromSurface (IDirectFBSurface *pSurface, bool bOwnsSurface)
PLBYTE FindNearestColor (PLPixel32 cr)
int GetBitsPerPixel () const
long GetBytesPerLine ()
 Returns number of bytes used per line.
int GetHeight () const
PLBYTE ** GetLineArray () const
PLPixel16 ** GetLineArray16 () const
PLPixel24 ** GetLineArray24 () const
PLPixel32 ** GetLineArray32 () const
long GetMemUsed ()
 Returns the amount of memory used by the object.
int GetNumColors ()
PLPixel32GetPalette () const
PLPixel32 GetPixel (int x, int y) const
 Slow but simple function to get a single pixel. 32 bpp only.
const PLPointGetResolution () const
const PLPointGetSize () const
IDirectFBSurface * GetSurface ()
int GetWidth () const
bool HasAlpha () const
bool IsGreyscale () const
bool IsLocked () const
 Returns whether a bitmap surface is locked. (See Lock for specifics.).
virtual void Lock (bool bReadable, bool bWriteable)
PLDirectFBBmpoperator= (const PLDirectFBBmp &Orig)
 Assignment operator.
PLDirectFBBmpoperator= (const PLBmp &Orig)
 Assignment operator.
bool operator== (const PLBmpInfo &Other) const
bool const operator== (PLBmpBase const &Other)
 PLDirectFBBmp (const PLDirectFBBmp &Orig)
 Copy constructor.
 PLDirectFBBmp (const PLBmp &Orig)
 Copy constructor.
 PLDirectFBBmp ()
void SetAlphaChannel (PLBmpBase *pAlphaBmp)
void SetGrayPalette ()
void SetHasAlpha (bool b)
void SetPalette (PLPixel32 *pPal)
 Sets the color table to pPal. The contents of pPal are copied.
void SetPaletteEntry (PLBYTE Entry, PLPixel32 Value)
void SetPaletteEntry (PLBYTE Entry, PLBYTE r, PLBYTE g, PLBYTE b, PLBYTE a)
void SetPixel (int x, int y, PLPixel32 pixel)
 Slow but simple function to set a single pixel. 32 bpp only.
void SetQuantizationMode (int DitherType, int DitherPaletteType)
void SetResolution (const PLPoint &Resolution)
 Sets the bitmap resolution in pixels per inch.
virtual void Unlock ()
 Unlocks the Bitmap surface. (See Lock for specifics.).
virtual ~PLDirectFBBmp ()
 Destroys the bitmap.

Static Public Member Functions

static long GetBitsMemNeeded (PLLONG width, PLLONG height, PLWORD BitsPerPixel)
 Returns memory needed by bitmap bits.
static long GetMemNeeded (PLLONG width, PLLONG height, PLWORD BitsPerPixel)
 Returns memory needed by a bitmap with the specified attributes.
static void SetDirectFB (IDirectFB *pDirectFB)

Protected Member Functions

void create1BPPCopy (const PLBmpBase &rSrcBmp)
void create8BPPCopy (const PLBmpBase &rSrcBmp)
virtual void freeMembers ()
 Delete memory allocated by member variables.
virtual void initLineArray ()
 Initialize internal table of line addresses.
virtual void initLocals (PLLONG Width, PLLONG Height, PLWORD BitsPerPixel, bool bAlphaChannel, bool bIsGreyscale)
 Can be called from internalCreate() to initialize object state.
void internalCopy (const PLBmpBase &rSrcBmp)
virtual void internalCreate (PLLONG Width, PLLONG Height, PLWORD BitsPerPixel, bool bAlphaChannel, bool bIsGreyscale)
void SetBmpInfo (const PLBmpInfo &SrcInfo)
void SetBmpInfo (const PLPoint &Size, int bpp, const PLPoint &Resolution, bool bAlphaChannel, bool bIsGreyscale)

Protected Attributes

bool m_bAlphaChannel
bool m_bIsGreyscale
int m_bpp
int m_DitherPaletteType
int m_DitherType
int m_LockCount
PLBYTE ** m_pLineArray
PLPoint m_Resolution
PLPoint m_Size

Private Attributes

bool m_bOwnsSurface
IDirectFBSurface * m_pSurface

Static Private Attributes

static IDirectFB * s_pDirectFB = 0

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index