Click or drag to resize

PdfiumFPDFFunction_CreateSampled Method

Create sampled function.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntax
public static IntPtr FPDFFunction_CreateSampled(
	int numOfInputs,
	int numOfOutputs,
	float[] domain,
	float[] range,
	int[] numOfSamples,
	int bitsPerSample,
	byte[] sampleTable,
	float[] encode = null,
	float[] decode = null,
	int order = 0
)

Parameters

numOfInputs  Int32
The number of input values of a function.
numOfOutputs  Int32
The number of output values of a function.
domain  Single
The domain of definition of a function.
range  Single
The range of a function.
numOfSamples  Int32
The number of samples in each input dimension of the sample table.
bitsPerSample  Int32
The number of bits used to represent each sample.
sampleTable  Byte
A sequence of sample values which are organized as an numOfInputs - dimensional table.
encode  Single  (Optional)
The linear mapping of input values into the domain of the function’s sample table.
decode  Single  (Optional)
The linear mapping of sample values into the range appropriate for the function’s output values.
order  Int32  (Optional)
The order of interpolation between samples.

Return Value

IntPtr
The handle to the created function.
Remarks
domainRequiredAn array of 2 ×numOfInputs numbers. Input values outside the declared domain are clipped to the nearest boundary value.
rangeRequiredAn array of 2 ×numOfOutputs numbers. Output values outside the declared range are clipped to the nearest boundary value.
numOfSamplesRequiredAn array of numOfInputs positive integers specifying the number of samples in each input dimension of the sample table.
bitsPerSampleRequiredA number of bits used to represent each sample. (If the function has multiple output values, each one occupies BitsPerSample bits.) Valid values are 1, 2, 4, 8, 12, 16, 24, and 32.
encodeOptionalAn array of 2 ×numOfInputs numbers specifying the linear mapping of input values into the domain of the function’s sample table.
decodeOptionalAn array of 2 ×numOfOutputs numbers specifying the linear mapping of sample values into the range appropriate for the function’s output values.
orderOptionalThe order of interpolation between samples. Valid values are 1 and 3, specifying linear and cubic spline interpolation, respectively.
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