typedef struct _PAINTCALLBACKDATA
{
L_UINT uStructSize;
L_UINT32 uFlags;
L_VOID *pDisplay;
L_VOID *pUserData;
PAINTCALLBACK_GETDEVICECAPS pGetDeviceCaps;
PAINTCALLBACK_GETMAPMODE pGetMapMode;
PAINTCALLBACK_SETSTRETCHBLTMODE pSetStretchBltMode;
PAINTCALLBACK_INTERSECTCLIPRECT pIntersectClipRect;
PAINTCALLBACK_SAVEDC pSaveDC;
PAINTCALLBACK_RESTOREDC pRestoreDC;
PAINTCALLBACK_STRETCHDIBITS pStretchDIBits;
PAINTCALLBACK_SETVIEWPORTORGEX pSetViewportOrgEx;
PAINTCALLBACK_GETVIEWPORTORGEX pGetViewportOrgEx;
PAINTCALLBACK_EXTSELECTCLIPRGN pExtSelectClipRgn;
PAINTCALLBACK_SELECTPALETTE pSelectPalette;
PAINTCALLBACK_REALIZEPALETTE pRealizePalette;
PAINTCALLBACK_GETGRAPHICSMODE pGetGraphicsMode;
PAINTCALLBACK_GETWORLDTRANSFORM pGetWorldTransform;
PAINTCALLBACK_ISCOMPATIBLEDC pIsCompatibleDC;
PAINTCALLBACK_CONVERTLINE pConvertLine;
PAINTCALLBACK_GETDIBINFO pGetDibInfo;
PAINTCALLBACK_PREPAINT pPrePaint;
PAINTCALLBACK_POSTPAINT pPostPaint;
PAINTCALLBACK_FILLRECT pFillRect;
} PAINTCALLBACKDATA, * pPAINTCALLBACKDATA;
The PAINTCALLBACKDATA structure describes the format of PAINTCALLBACKDATA, * pPAINTCALLBACKDATA;
The PAINTCALLBACKDATA structure contains the callbacks used for custom painting.
Size of the PAINTCALLBACKDATA structure. This should be sizeof(PAINTCALLBACKDATA).
Any of the following flags. (You can use a bitwise OR to specify more than one value.).
Value | Meaning |
---|---|
PAINTCALLBACKDATA_NO_INDEXEDPAINT | [0x00000001] Do not use indexed paint. The palette colors should be passed as RGB colors, not palette indices. |
The device context to paint on. The predefined callbacks expect this value to be a valid DC handle. But, if you redirect all the callbacks, this can be a pointer to any structure you want. This value will be passed to all the paint callbacks that take a pDisplay parameter.
Pointer to a user-defined structure that will be passed to all the callback functions as the pUserData parameter.
Pointer to a function that will replace the GetDeviceCaps GDI function.
Pointer to a function that will replace the GetMapMode GDI function.
Pointer to a function that will replace the SetStretchBltMode GDI function.
Pointer to a function that will replace the IntersectClipRect GDI function.
Pointer to a function that will replace the SaveDC GDI function.
Pointer to a function that will replace the RestoreDC GDI function.
Pointer to a function that will replace the StretchDIBits GDI function.
Pointer to a function that will replace the SetViewportOrgEx GDI function.
Pointer to a function that will replace the GetViewportOrgEx GDI function.
Pointer to a function that will replace the ExtSelectClipRgn GDI function.
Pointer to a function that will replace the SelectPalette GDI function.
Pointer to a function that will replace the RealizePalette GDI function.
Pointer to a function that will replace the GetGraphicsMode GDI function.
Pointer to a function that will replace the GetWorldTransform GDI function.
Pointer to a function that determines whether the DC and bitmap are compatible with my callbacks.
Pointer to a function that converts the image data to display data.
Pointer to a function that will tell the raster engine the format of display data. This function must be provided if you provide the pConvertLine function.
Pointer to a function that can be used for initialization.
Pointer to a function that can be used for cleanup.
Pointer to a function that will replace the FillRect GDI function.
You do not need to provide every callback. You can set to NULL any callbacks that you do not wish to replace. If you pass NULL for a certain callback, the default GDI function will be used.
If you do pass NULL for some of the GDI callbacks, then you should set pDisplay to a valid HDC handle. The default GDI functions expect pDisplay to be a HDC handle.
If you set pIsCompatibleDC
to a valid function pointer, that function will be called before any other callback function to determine whether the DC is compatible with your callbacks. If this function returns FALSE, then no other callback will be called and the default GDI functions will be used.
If you set pConvertLine
to a valid function pointer, you must also set pGetDibInfo to a valid function pointer so LEADTOOLS will know the format of the image data expected by the painting functions.
If you set pPrePaint
to a valid function pointer, it will be called once after pIsCompatibleDC and before any other callback.
If you set pPostPaint
to a valid function pointer, it will be called once any other callback.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document