PAINTCALLBACK_GETDIBINFO Function - Raster Imaging C API Help

PAINTCALLBACK_GETDIBINFO Function

#include "l_bitmap.h"

L_INT pEXT_CALLBACK YourFunction(pDisplay, pBitmap, uWidth, pDibInfo, pUserData)

L_VOID *pDisplay;

device context handle

pBITMAPHANDLE pBitmap;

pointer to the bitmap handle

L_UINT uWidth;

number of pixels that will be converted

pPAINTDIBINFO pDibInfo;

pointer to a PAINTDIBINFO that will be filled by this function

L_VOID *pUserData;

pointer to additional data

This callback is used to get information on the image date expected by your display adapter.

Parameter

Description

pDisplay

Handle of the device context passed to the paint function.

pBitmap

Pointer to the bitmap handle structure holding the input data.

uWidth

The number of pixels that will be converted.

pDibInfo

Pointer to a PAINTDIBINFO structure that will be filled by this function.

pUserData

Void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of the PAINTCALLBACKDATA structure.)

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

pDisplay is the pDisplay member from the PAINTCALLBACKDATA structure that you passed to the paint function. The default callbacks expect it to be a HDC handle. But, if you override all the paint callbacks, it can be a pointer of any type you want.

This callback is expected to fill the pDibInfo structure with information describing the expected format of the data that should be used in painting to your display adapter. If you override the PAINTCALLBACK_STRETCHDIBITS callback, this structure will describe the format expected by that function.

uWidth should be used to calculate the uBytesPerLine member of the PAINTDIBINFO structure. This tells LEADTOOLS what sort of padding to add to each row. Usually, GDI functions expect the number of bytes per line to be a multiple of 4. You  indicate if your device expects that or not by filling the uBytesPerLine field.

You have to provide this callback in order to be able to provide your own PAINTCALLBACK_CONVERTLINE callback.

Required DLLs and Libraries

LTDIS

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Example

For an example, refer to L_PaintDCCallback.

Help Version 20.0.2018.7.30
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help