|
|
|
|
MGL_createCustomDC
Creates a new custom memory device context.
Declaration
MGLDC * MGLAPI MGL_createCustomDC(
int xSize,
int ySize,
int bitsPerPixel,
pixel_format_t *pf,
int bytesPerLine,
void *surface,
MGL_HBITMAP hbm)
Prototype In
mgraph.h
Parameters
xSize |
X resolution for the memory context |
ySize |
Y resolution for the memory context |
bitsPerPixel |
Pixel depth for the memory context |
pf |
Pixel format for memory context |
bytesPerLine |
Buffer pitch for memory context |
surface |
Pointer to surface memory for context |
hbm |
Handle to HBITMAP for DIB section |
Return Value
Pointer to the allocated memory device context.
Description
This function is useful for creating an MGL device context for a memory block provided by an application. This allows the SciTech MGL to render to memory it does not own (e.g. custom hardware framebuffers, or bitmaps allocated by other runtime libraries).
For Windows if the hbm parameter is not NULL, it is assumed that the original memory was created by a call to CreateDIBSection and the hbm parameter is a handle to the bitmap object for the DIB section. This parameter can be used to blit the memory DC image to a windowed DC using the standard Windows GDI blit functions. The hbm parameter is not necessary for fullscreen modes.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com