PTFunction
@interface PTFunction : NSObject
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.
-
Return Value
The function type
-
Declaration
Objective-C
- (int)GetInputCardinality;
Swift
func getInputCardinality() -> Int32
Return Value
the number of input components required by the function
-
Declaration
Objective-C
- (int)GetOutputCardinality;
Swift
func getOutputCardinality() -> Int32
Return Value
the number of output components returned by the function
-
Evaluate the function at a given point.
Note
that size of ‘in’ array must be greater than or equal to function input cardinality. and the size of ‘out’ array must be greater than or equal to function output cardinality.Declaration
Objective-C
- (NSMutableArray *)Eval:(NSMutableArray *)in_arr;
Swift
func eval(_ in_arr: NSMutableArray!) -> NSMutableArray!