#include <Gdc2.h>
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. |
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.
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 |
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().