BufferedCanvas Class Template Reference

Buffered Canvas, useful for e.g. double buffering updates to a Widget. More...

Inherits CanvasType.

List of all members.

Public Member Functions

void blast (const Rectangle &rectangle)
 BitBlasts buffer into specified rectangle of source.
 BufferedCanvas (HWND window)
 Constructor initializing the given source.
 BufferedCanvas (HWND window, HDC source)
 Constructor initializing the given source.
void drawBitmap (HBITMAP bitmap, const Rectangle &imageRectangle, COLORREF bitmapBackgroundColor, bool drawDisabled)
 Transparently draws bitmap.
virtual ~BufferedCanvas ()
 Destructor will free up the contained HDC.


Detailed Description

template<class CanvasType>
class SmartWin::BufferedCanvas< CanvasType >

Buffered Canvas, useful for e.g. double buffering updates to a Widget.

A BufferedCanvas is a Canvas which you can draw upon but only resides in memory and will not update the actual visible Canvas before you call blast, only then the results of the drawing operations will be visible, useful to avoid "tearing" which is an effect which might occur if your drawing operations are lengthy.
Class does provide RAII semantics!


Constructor & Destructor Documentation

virtual ~BufferedCanvas (  )  [virtual]

Destructor will free up the contained HDC.

Note!
Destructor will not flush the contained operations to the contained Canvas


Member Function Documentation

void drawBitmap ( HBITMAP  bitmap,
const Rectangle imageRectangle,
COLORREF  bitmapBackgroundColor,
bool  drawDisabled 
)

Transparently draws bitmap.

Bitmap background color should be the color of the image that should be transparent

Back to SmartWin website
SourceForge.net Logo