|
|
|
|
MGL_getBitmapFromDC
Copy a portion of a device context as a lightweight memory bitmap.
Declaration
bitmap_t * MGLAPI MGL_getBitmapFromDC(
MGLDC *dc,
int left,
int top,
int right,
int bottom,
ibool savePalette)
Prototype In
mgraph.h
Parameters
dc |
Device context to save from |
left |
Left coordinate of bitmap to save |
top |
Top coordinate of bitmap to save |
right |
Right coordinate of bitmap to save |
bottom |
Bottom coordinate of bitmap to save |
savePalette |
Save palette with bitmap. |
Return Value
Pointer to allocated bitmap, NULL on error.
Description
This function copies a portion of a device context as a lightweight memory bitmap. If this function fails (for instance if out of memory), it will return NULL and you can get the error code from the MGL_result function. Otherwise this function will return a pointer to a new lightweight bitmap containing the bitmap data.
Note that the source rectangle for the bitmap to be saved is not clipped to the current clipping rectangle for the device context, but it is mapped to the current viewport. If you specify dimensions that are larger than the current device context, you will get garbage in the bitmap file as a result.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com