Click or drag to resize

PdfiumFPDFFunction_CreateExp Method

Create exponential interpolation function.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntax
public static IntPtr FPDFFunction_CreateExp(
	int numOfInputs,
	int numOfOutputs,
	float exponent,
	float[] domain,
	float[] range = null,
	float[] valuesAt0 = null,
	float[] valuesAt1 = null
)

Parameters

numOfInputs  Int32
The number of input values of a function.
numOfOutputs  Int32
The number of output values of a function.
exponent  Single
The interpolation exponent.
domain  Single
The domain of definition of a function.
range  Single  (Optional)
The range of a function.
valuesAt0  Single  (Optional)
An array of numbers defining the function result when x = 0.0.
valuesAt1  Single  (Optional)
An array of numbers defining the function result when x = 1.0.

Return Value

IntPtr
The handle to the created function.
Remarks
exponentRequiredAn interpolation exponent. Each input value x will return numOfOutputs values, given by yj = valuesAt0j + xexponent × (valuesAt1j - valuesAt0j), for 0 ≤ j < numOfOutputs.
domainRequiredAn array of 2 × numOfInputs numbers. Input values outside the declared domain are clipped to the nearest boundary value.
rangeOptionalAn array of 2 × numOfOutputs numbers. Output values outside the declared range are clipped to the nearest boundary value. If absent, no clipping is done.
valuesAt0OptionalAn array of numOfOutputs numbers defining the function result when x = 0.0. Default value: [0.0]
valuesAt1OptionalAn array of numOfOutputs numbers defining the function result when x = 1.0. Default value: [1.0]

Values of domain must constrain x in such a way that if exponent is not an integer, all values of x must be non-negative, and if exponent is negative, no value of x may be zero. Typically, domain is declared as [0.0 1.0], and exponent is a positive number. The range attribute is optional and can be used to clip the output to a specified range.

Note that when exponent is 1, the function performs a linear interpolation between valuesAt0 and valuesAt1; therefore, the function can also be expressed as a sampled function.

Note  Note
When an application is finished using the function handle returned by method, use the FPDFFunction_CloseHandle(IntPtr) function to close the handle.
See Also