 | PdfiumFPDFFunction_CreateExp Method |
Create exponential interpolation function.
Namespace: Patagames.PdfAssembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntaxpublic static IntPtr FPDFFunction_CreateExp(
int numOfInputs,
int numOfOutputs,
float exponent,
float[] domain,
float[] range = null,
float[] valuesAt0 = null,
float[] valuesAt1 = null
)
Public Shared Function FPDFFunction_CreateExp (
numOfInputs As Integer,
numOfOutputs As Integer,
exponent As Single,
domain As Single(),
Optional range As Single() = Nothing,
Optional valuesAt0 As Single() = Nothing,
Optional valuesAt1 As Single() = Nothing
) As IntPtr
public:
static IntPtr FPDFFunction_CreateExp(
int numOfInputs,
int numOfOutputs,
float exponent,
array<float>^ domain,
array<float>^ range = nullptr,
array<float>^ valuesAt0 = nullptr,
array<float>^ valuesAt1 = nullptr
)
static member FPDFFunction_CreateExp :
numOfInputs : int *
numOfOutputs : int *
exponent : float32 *
domain : float32[] *
?range : float32[] *
?valuesAt0 : float32[] *
?valuesAt1 : float32[]
(* Defaults:
let _range = defaultArg range null
let _valuesAt0 = defaultArg valuesAt0 null
let _valuesAt1 = defaultArg valuesAt1 null
*)
-> IntPtr
public static IntPtr FPDFFunction_CreateExp(
int numOfInputs,
int numOfOutputs,
float exponent,
float[] domain,
float[] range = null,
float[] valuesAt0 = null,
float[] valuesAt1 = null
)
Patagames.Pdf.Pdfium.FPDFFunction_CreateExp = function(numOfInputs, numOfOutputs, exponent, domain, range, valuesAt0, valuesAt1);
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
IntPtrThe handle to the created function.
Remarksexponent | Required | An interpolation exponent. Each input value x will return numOfOutputs values, given by yj = valuesAt0j + xexponent × (valuesAt1j - valuesAt0j), for 0 ≤ j < numOfOutputs. |
domain | Required | An array of 2 × numOfInputs numbers. Input values outside the declared domain are clipped to the nearest boundary value. |
range | Optional | An array of 2 × numOfOutputs numbers. Output values outside the declared range are clipped to the nearest boundary value. If absent, no clipping is done. |
valuesAt0 | Optional | An array of numOfOutputs numbers defining the function result when x = 0.0. Default value: [0.0] |
valuesAt1 | Optional | An 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.
See Also