L_GetCurvePoints

#include "l_bitmap.h"

L_LTIMGEFX_API L_INT L_GetCurvePoints(pCurve, apUserPoint, uUserPointCount, puPointCount, uFlag)

L_INT *pCurve;

/* array of integer values */

POINT *apUserPoint;

/* array of points */

L_UINT uUserPointCount;

/* number of points in the array */

L_UINT *puPointCount;

/* pointer to a variable to be updated */

L_UINT uFlag;

/* flag */

Updates the pCurve array based on a curve or lines that pass through the specified points.

Parameter

Description

pCurve

Pointer to the array to be filled by this function. To get the real value of the array elements, each of the values must be divided by 1000.

apUserPoint

Pointer to an array of POINT structures that contain the points on the curve used to determine the values for pCurve. The minimum x coordinate value is 0.

uUserPointCount

Number of points in the apUserPoint array.

puPointCount

Pointer to a variable to be updated with the number of entries in pCurve that were actually updated by this function.

uFlag

Flag that indicates the method to be used to update the buffer. Possible values are:

 

Value

Meaning

 

GUB_CURVE

[0x0000] Fill pCurve with the best curve that passes through the user points.

 

GUB_LINEAR

[0x0001] Fill pCurve with lines that pass through the user points.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function will update pCurve using either the best curve or lines that pass through the points specified in the apUserPoint parameter. The points in the array may be sorted or not. In most cases, this function is used with the L_FreeHandShearBitmap, or L_FreeHandWaveBitmap functions.

To compute the size of the pCurve array:

Size = Maximum (apUserPoint.x) + 1;

The values stored in pCurve represent the y coordinates of the calculated curve based on the points in the apUserPoint array. In the pCurve array there can be only one y value for each x coordinate. Therefore, circles, ellipses, and spirals cannot be represented by pCurve.

The x coordinates for the user points are sorted internally automatically.

Required DLLs and Libraries

LTIMGEFX

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

Platforms

Windows 2000 / XP/Vista.

See Also

Functions:

L_GetFunctionalLookupTable, L_GetUserLookUpTable, L_FreeHandShearBitmap, L_FreeHandWaveBitmap

Topics:

Raster Image Functions: Modifying Intensity Values

 

Changing Brightness and Contrast

 

Raster Image Functions: Changing Brightness and Contrast

Example

For an example, refer to L_FreeHandShearBitmap or L_FreeHandWaveBitmap.