new Function()
Although PDF is not a programming language it provides several types of function
object that represent parameterized classes of functions, including mathematical
formulas and sampled representations with arbitrary resolution. Functions are used
in various ways in PDF, including device-dependent rasterization information for
high-quality printing (halftone spot functions and transfer functions), color
transform functions for certain color spaces, and specification of colors as a
function of position for smooth shadings. Functions in PDF represent static,
self-contained numerical transformations.
PDF::Function represents a single, flat interface around all PDF function types.
PDF::Function represents a single, flat interface around all PDF function types.
Extends
Members
-
<static> Type
-
Type:
- number
Properties:
Name Type Description e_sampled
number e_exponential
number e_stitching
number e_postscript
number
Methods
-
<static> create( [funct_dict])
-
Create a PDF::Function object from an existing SDF function dictionary. If funct_dict is null, a non valid Function object is created.
Parameters:
Name Type Argument Description funct_dict
PDFNet.Obj <optional>
Returns:
A promise that resolves to an object of type: "PDFNet.Function"- Type
- Promise.<PDFNet.Function>
-
destroy()
-
Destructor
- Inherited From:
Returns:
- Type
- Promise.<void>
-
eval(inval, outval)
-
Parameters:
Name Type Description inval
number outval
number Returns:
- Type
- Promise.<void>
-
getInputCardinality()
-
Returns:
A promise that resolves to the number of input components required by the function- Type
- Promise.<number>
-
getOutputCardinality()
-
Returns:
A promise that resolves to the number of output components returned by the function- Type
- Promise.<number>
-
getSDFObj()
-
Returns:
A promise that resolves to the underlying SDF/Cos object- Type
- Promise.<PDFNet.Obj>
-
getType()
-
Returns:
A promise that resolves to the function type- Type
- Promise.<number>
Example
Return value enum: <pre> PDFNet.Function.Type = { e_sampled : 0 e_exponential : 2 e_stitching : 3 e_postscript : 4 } </pre>
-
takeOwnership()
-
Take the ownership of this object, so that PDFNet.runWithCleanup won't destroy this object.
- Inherited From:
Returns:
- Type
- void