GMemDC Class Reference

An implemenation of GSurface to draw into a memory bitmap. More...

#include <Gdc2.h>

Inheritance diagram for GMemDC:

GSurface GImageList

List of all members.

Public Member Functions

 GMemDC (int x=0, int y=0, int bits=0)
 Creates a memory bitmap.
bool Lock ()
 Locks the bits for access. GMemDC's start in the locked state.
bool Unlock ()
void SetOrigin (int x, int y)
 Sets the surface origin.
void Blt (int x, int y, GSurface *Src, GRect *a=NULL)
 Copy an image onto the surface.
void StretchBlt (GRect *d, GSurface *Src, GRect *s=NULL)
 Not implemented.

Detailed Description

An implemenation of GSurface to draw into a memory bitmap.

This class uses a block of memory to represent an image. You have direct pixel access as well as higher level functions to manipulate the bits.

Constructor & Destructor Documentation

GMemDC::GMemDC ( int  x = 0,
int  y = 0,
int  bits = 0 

Creates a memory bitmap.

x  The width
y  The height
bits  The bit depth of the pixels

Member Function Documentation

bool GMemDC::Unlock (  ) 

Unlocks the bits to optimize for display. While the bitmap is unlocked you can't access the data for read or write. On linux this converts the XImage to pixmap. On other systems it doesn't do much. As a general rule if you don't need access to a bitmap after creating / loading it then unlock it.

Referenced by GImageList::GImageList().

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

Generated on Wed Dec 1 15:41:03 2010 for Lgi by  doxygen