|
Public Member Functions |
| PLWinBmp (const PLWinBmp &Orig) |
| Copy constructor.
|
| PLWinBmp (const PLBmpBase &Orig) |
| Copy constructor.
|
virtual | ~PLWinBmp () |
| Destroys the bitmap.
|
PLWinBmp & | operator= (PLBmpBase const &Orig) |
| Assignment operator.
|
PLWinBmp & | operator= (PLWinBmp const &Orig) |
| Assignment operator.
|
void | AlphaBlt (PLWinBmp *pSrPLBmp, int x, int y) |
virtual long | GetMemUsed () |
| Returns the amount of memory used by the object.
|
virtual long | GetBytesPerLine () |
| Returns number of bytes used per line.
|
virtual void | CreateRes (HINSTANCE lh_ResInst, int ID) |
void | CreateFromHBitmap (HBITMAP hBitMap) |
| Takes a HBITMAP and converts it to a PLWinBmp.
|
void | CreateFromHDIBBitmap (BITMAPINFOHEADER *pBIH, HPALETTE hPal=NULL) |
SIZE | GetSize () |
| Returns the size of the bitmap in pixels.
|
BITMAPINFOHEADER * | GetBMI () |
virtual void | Draw (HDC hDC, int x, int y, DWORD rop=SRCCOPY) |
virtual void | StretchDraw (HDC hDC, int x, int y, double Factor, DWORD rop=SRCCOPY) |
virtual void | StretchDraw (HDC hDC, int x, int y, int w, int h, DWORD rop=SRCCOPY) |
virtual BOOL | DrawExtract (HDC hDC, POINT pntDest, RECT rcSrc) |
| Draws a portion of the bitmap on the given device context.
|
void | ToClipboard () |
| Puts a copy of the bitmap in the clipboard.
|
bool | FromClipboard (UINT uFormat=CF_BITMAP) |
BYTE * | GetBits () |
void | CopyPalette (PLWinBmp *pSrPLBmp) |
| Copies the palette over from pSrPLBmp.
|
void | TracePalette () |
| Traces the values in the palette via PLTRACE();.
|
Static Public Member Functions |
long | GetMemNeeded (LONG width, LONG height, WORD BitsPerPixel) |
| Returns memory needed by a bitmap with the specified attributes.
|
long | GetBitsMemNeeded (LONG width, LONG height, WORD BitsPerPixel) |
| Returns memory needed by bitmap bits.
|
int | GetLineMemNeeded (LONG width, WORD BitsPerPixel) |
| Returns memory needed by one line.
|
Protected Member Functions |
virtual void | internalCreate (LONG Width, LONG Height, const PLPixelFormat &pf) |
virtual void | internalCreate (BITMAPINFOHEADER *pBMI) |
virtual void | freeMembers () |
| Deletes memory allocated by member variables.
|
virtual void | initLineArray () |
| Initializes internal table of line addresses.
|
virtual HANDLE | createCopyHandle () |
virtual void | initPointers () |
const PLPixelFormat & | pixelFormatFromBMI (const BITMAPINFOHEADER *pBMI) const |
Protected Attributes |
BITMAPINFOHEADER * | m_pBMI |
BYTE * | m_pBits |
The subset of the windows DIB format supported is as follows: The DIB is stored so that header, palette, and bits are in one buffer. The bottom line is stored first (biHeight must be > 0) and the data is uncompressed (BI_RGB). Color tables for 16, 24, and 32 bpp are not supported. biClrUsed is always 0. The palette mode is DIB_RGB_COLORS. DIB_PAL_COLORS is not supported.
Note that almost all real-life DIBs conform to this subset anyway, so there shouldn't be any problems.