In This Topic ▼

Paint Using Custom Callbacks

Some advanced display adapters offer non-standard paint functions that give you the ability to access a card's more advanced features. For example, a medical display adapter might give users the ability to display more than 256 shades of gray (more than 8 bits per component). One such card comes from Barco ( and it can display up to 8192 shades of gray (13-bits per pixel). Such adapters require you to use different functions for displaying such data, rather than the standard GDI functions like StretchDIBits.

LEADTOOLS makes it possible to use such advanced functions by allowing you to use custom callbacks during the paint process. We allow you to replace some of the standard GDI functions (like StretchDIBits) with the specialized function for the particular capture device. Do that by filling a PAINTCALLBACKDATA structure with the callbacks you wish to replace and then calling one of the paint functions that use this structure:

Function Description
L_PaintDCCallback Paints the whole image using custom callbacks.
L_PaintRgnDCCallback Paints only the bitmap portion inside a region using custom callbacks.
L_PaintDCBufferCallback Paints a buffer using custom callbacks (use this to implement paint while load effect).
L_PaintRgnDCBufferCallback Paints only the buffer portion inside a region using custom callbacks
L_PaintDCOverlayCallback Paints a bitmap overlay using custom callbacks.

You override only the paint functions that you need. The default GDI function equivalents will be used for the functions you do not override. refer to the PAINTCALLBACKDATA documentation for a list of functions you can override.

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help