PdfFunction Class

Definition

A function object: a live view over a function dictionary or stream that evaluates the function it describes.

public abstract class PdfFunction

Remarks

ISO 32000-2 §7.10. Get one with GetFunction(CosObject); the subclass says which of the four types it is (PdfSampledFunction, PdfExponentialFunction, PdfStitchingFunction, PdfPostScriptFunction). Entries such as Domain are read from the COS object on every call.

Evaluation runs on a form compiled once from the COS objects: inputs are clipped to the domain, outputs to the range (§7.10.1). When any object it was compiled from changes through the public API, the next evaluation compiles it again. Evaluation is safe from any number of threads while nobody mutates the document, allocates nothing, never returns NaN or infinity, and never throws for anything in the file: a function that cannot be used (IsValid is false) yields 0 clipped to its range. Deviations are recorded as the document's diagnostics: those found compiling, once; an error met while evaluating (a Type 4 division by zero, for instance), once per compiled function. In strict mode both throw DiagnosticException.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (10)

Methods (2)