All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::Function Class Reference

#include <Function.h>

Public Types

enum  Type { e_sampled = 0, e_exponential = 2, e_stitching = 3, e_postscript = 4 }
 

Public Member Functions

 Function (SDF::Obj funct_dict=0)
 
 Function (const Function &f)
 
Functionoperator= (const Function &f)
 
 ~Function ()
 
Type GetType () const
 
int GetInputCardinality ()
 
int GetOutputCardinality ()
 
std::vector< double > Eval (const std::vector< double > &in_arr)
 
void Eval (double *in, double *out)
 
SDF::Obj GetSDFObj ()
 
void Destroy ()
 

Detailed Description

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.

Definition at line 28 of file Function.h.

Member Enumeration Documentation

Enumerator
e_sampled 
e_exponential 
e_stitching 
e_postscript 

Definition at line 41 of file Function.h.

Constructor & Destructor Documentation

pdftron::PDF::Function::Function ( SDF::Obj  funct_dict = 0)

Create a PDF::Function object from an existing SDF function dictionary. If funct_dict is null, a non valid Function object is created.

pdftron::PDF::Function::Function ( const Function f)
pdftron::PDF::Function::~Function ( )

Member Function Documentation

void pdftron::PDF::Function::Destroy ( )

Frees the native memory of the object.

std::vector<double> pdftron::PDF::Function::Eval ( const std::vector< double > &  in_arr)

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.
void pdftron::PDF::Function::Eval ( double *  in,
double *  out 
)
int pdftron::PDF::Function::GetInputCardinality ( )
Returns
the number of input components required by the function
int pdftron::PDF::Function::GetOutputCardinality ( )
Returns
the number of output components returned by the function
SDF::Obj pdftron::PDF::Function::GetSDFObj ( )
Returns
the underlying SDF/Cos object
Type pdftron::PDF::Function::GetType ( ) const
Returns
The function type
Function& pdftron::PDF::Function::operator= ( const Function f)

The documentation for this class was generated from the following file: