Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.11.1
LEADTOOLS Raster Imaging C DLL Help

PAINTCALLBACK_CONVERTLINE Function

Show in webframe

#include "l_bitmap.h"

L_VOID pEXT_CALLBACK YourFunction(pOutScan, pInScan, pBitmap, nLeft, nRight, pDibInfo, pUserData)

L_UCHAR *pOutScan;

/* pointer to the output buffer */

L_UCHAR *pInScan;

/* pointer to the input buffer */

pBITMAPHANDLE pBitmap;

/* Pointer to the bitmap handle */

L_INT nLeft;

/* the left pixel offset into the input buffer */

L_INT nRight;

/* the right pixel offset into the input buffer */

pPAINTDIBINFO pDibInfo;

/* pointer to PAINTDIBINFO structure containing information on the expected output image data */

L_VOID *pUserData;

/* pointer to additional data */

This callback is used to convert input image data to output data suitable for display.

Parameter

Description

pOutScan

Pointer to the output buffer. The function should fill this buffer with data compatible with the display, according to information in pDibInfo.

pInScan

Pointer to the input buffer containing data of the same type as pBitmap.

pBitmap

Pointer to the bitmap handle structure indicating the format of the input buffer.

nLeft

Index of the first pixel in pInScan that should be copied to pOutBuf.

nRight

Index of the first pixel after nLeft that should not be copied to pOutBuf.

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

This function does not return any value.

Comments

You should use this callback if the built-in LEADTOOLS functions for converting image data are not suitable. However, the built-in functions are fast should be capable of performing most conversion needed. So it is recommended you use this callback only as a last resort.

The callback is expected to convert one row of image data. pInScan contains the input data and pOutScan contains the output data.

The callback is expected to skip the first nLeft pixels in the input buffer and convert the next (nRight - nLeft) pixels. So, nLeft is the index of the first pixel and not the byte offset into the input buffer. nRight is the index of the first pixel that should not be converted. Only pixels nLeft, nLeft+1,  ... , nRight - 1 are expected to be copied to pOutScan.

pDibInfo is the PAINTDIBINFO structure initialized by the PAINTCALLBACK_GETDIBINFO callback. This callback will not be called unless you provide a valid PAINTCALLBACK_GETDIBINFO 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.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.