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

PLDIBSection Class Reference

#include <pldibsect.h>

Inheritance diagram for PLDIBSection:

PLWinBmp PLBmp PLBmpInfo List of all members.

Public Member Functions

 PLDIBSection ()
 Creates an empty bitmap.

virtual ~PLDIBSection ()
 Destroys the bitmap.

 PLDIBSection (const PLBmp &Orig)
 Copy constructor.

 PLDIBSection (const PLDIBSection &Orig)
 Copy constructor.

PLDIBSectionoperator= (PLBmp const &Orig)
 Assignment operator.

PLDIBSectionoperator= (PLDIBSection const &Orig)
 Assignment operator.

virtual void Detach ()
virtual void Draw (HDC hDC, int x, int y, DWORD rop=SRCCOPY)
virtual BOOL DrawExtract (HDC hDC, POINT pntDest, RECT rcSrc)
 Draws a portion of the bitmap on the given device context.

HBITMAP GetHandle ()

Protected Member Functions

virtual void internalCreate (LONG Width, LONG Height, WORD BitsPerPixel, bool bAlphaChannel, bool bIsGreyscale)
virtual void internalCreate (BITMAPINFOHEADER *pBMI)
virtual void freeMembers ()
 Deletes memory allocated by member variables.

virtual HANDLE createCopyHandle ()
virtual void initPointers ()
 Set color table pointer & pointer to bits based on m_pBMI.

Detailed Description

This is a windows DIBSection wrapped in a PLBmp-derived class. It can be used just like a PLWinBmp can be used. In addition, PLDIBSection can give access to the bitmap as a GDI bitmap handle. This bitmap handle can be selected into a device context. All normal GDI drawing functions can be used to write on the bitmap in this way.

Internally, PLDIBSections are stored with header and bits in two separate buffers.

Definition at line 27 of file pldibsect.h.

Member Function Documentation

virtual HANDLE PLDIBSection::createCopyHandle  )  [protected, virtual]

Creates a copy of the current bitmap in a global memory block and returns a handle to this block.

Reimplemented from PLWinBmp.

virtual void PLDIBSection::Detach  )  [virtual]

Calling this function causes the windows DIBSection to be detached from the PLDIBSection object. The bitmap data are not deleted in this function. This means that the bitmap handle and the bitmap memory (bits and BMI) must be deleted by some other object. The PLDIBSection object is in the same state as after a constructor call after this function is called.

virtual void PLDIBSection::Draw HDC  hDC,
int  x,
int  y,

Draws the bitmap on the given device context using BitBlt.

Reimplemented from PLWinBmp.

HBITMAP PLDIBSection::GetHandle  ) 

Returns a GDI handle to the bitmap. This handle can be selected into a DC and used in normal GDI operations. Under Windows NT, GDI operations can be queued. This means that a program running under NT must call GdiFlush() before the DIBSection can be used again after GetHandle() has been called. See the documentation for GdiFlush() for details.

virtual void PLDIBSection::internalCreate BITMAPINFOHEADER *  pBMI  )  [protected, virtual]

Creates a PLWinBmp from an existing bitmap pointer. Assumes that no memory is allocated before the call.

Reimplemented from PLWinBmp.

virtual void PLDIBSection::internalCreate LONG  Width,
LONG  Height,
WORD  BitsPerPixel,
bool  bAlphaChannel,
bool  bIsGreyscale
[protected, virtual]

Create a new empty DIB. Bits are uninitialized. Assumes that no memory is allocated before the call.

Reimplemented from PLWinBmp.

The documentation for this class was generated from the following file:
Generated on Sun Jun 6 13:42:22 2004 for paintlib by doxygen 1.3.2