iText 8.0.5 API
iText.Kernel.Pdf.Function.AbstractPdfFunction< T > Class Template Referenceabstract

The abstract PdfFunction class that represents the Function Dictionary or Stream PDF object. More...

Inheritance diagram for iText.Kernel.Pdf.Function.AbstractPdfFunction< T >:
iText.Kernel.Pdf.PdfObjectWrapper< T > iText.Kernel.Pdf.Function.IPdfFunction

Public Member Functions

virtual int  GetFunctionType ()
  The function type, (see ISO-320001 Table 38). More...
 
virtual bool  CheckCompatibilityWithColorSpace (PdfColorSpace alternateSpace)
  Chacks wether the output of the function matches in components with the passed by color space. More...
 
virtual int  GetInputSize ()
  The number of input components. More...
 
virtual int  GetOutputSize ()
  The number of output components. More...
 
virtual double[]  GetDomain ()
  The valid input domain, input will be clipped to this domain contains a min max pair per input component. More...
 
virtual void  SetDomain (double[] value)
  The valid input domain, input will be clipped to this domain contains a min max pair per input component. More...
 
virtual double[]  GetRange ()
  the valid output range, output will be clipped to this range contains a min max pair per output component. More...
 
virtual void  SetRange (double[] value)
  the valid output range, output will be clipped to this range contains a min max pair per output component. More...
 
virtual byte[]  CalculateFromByteArray (byte[] bytes, int offset, int length, int wordSizeInputLength, int wordSizeOutputLength)
  Performs the calculation in bulk on a set of raw data and returns a new set of raw data. More...
 
virtual byte[]  CalculateFromByteArray (byte[] bytes, int offset, int length, int wordSizeInputLength, int wordSizeOutputLength, BaseInputOutPutConvertors.IInputConversionFunction inputConvertor, BaseInputOutPutConvertors.IOutputConversionFunction outputConvertor)
  Performs the calculation in bulk on a set of raw data and returns a new set of raw data. More...
 
virtual double[]  ClipInput (double[] input)
  Clip input values to the allowed domain. More...
 
virtual double[]  ClipOutput (double[] input)
  Clip output values to the allowed range, if there is a range. More...
 
virtual PdfObject  GetAsPdfObject ()
 
abstract double[]  Calculate (double[] arg1)
  Calculates one set of input components to one set of output components. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< T >
virtual T  GetPdfObject ()
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  SetModified ()
 
virtual void  Flush ()
 
virtual bool  IsFlushed ()
 

Package Functions

  AbstractPdfFunction (T pdfObject, int functionType, double[] domain, double[] range)
  Constructs a PdfFunction from a new PdfObject. More...
 
  AbstractPdfFunction (T pdfObject)
  Constructs a PdfFunction from an existing PdfObject. More...
 
override bool  IsWrappedObjectMustBeIndirect ()
  Defines if the object behind this wrapper must be an indirect object in the resultant document. More...
 
- Package Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< T >
  PdfObjectWrapper (T pdfObject)
 
virtual void  SetPdfObject (T pdfObject)
 
virtual void  SetForbidRelease ()
 
virtual void  UnsetForbidRelease ()
 
virtual void  EnsureUnderlyingObjectHasIndirectReference ()
 

Static Package Functions

static double[]  Clip (double[] values, double[] limits)
 
static double[]  Normalize (double[] values, double[] limits)
 
static double[]  ConvertFloatArrayToDoubleArray (float[] array)
 
- Static Package Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< T >
static void  MarkObjectAsIndirect (PdfObject pdfObject)
 
static void  EnsureObjectIsAddedToDocument (PdfObject @object)
  Some wrappers use object's indirect reference to obtain the PdfDocument to which the object belongs to. More...
 

Detailed Description

The abstract PdfFunction class that represents the Function Dictionary or Stream PDF object.

The abstract PdfFunction class that represents the Function Dictionary or Stream PDF object. Holds common properties and methods and a factory method. (see ISO-320001 Chapter 7.10)

Template Parameters
T Either a iText.Kernel.Pdf.PdfDictionary or a iText.Kernel.Pdf.PdfStream
Type Constraints
T  : PdfDictionary  

Constructor & Destructor Documentation

◆ AbstractPdfFunction() [1/2]

iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.AbstractPdfFunction ( pdfObject,
int  functionType,
double[]  domain,
double[]  range 
)
inlinepackage

Constructs a PdfFunction from a new PdfObject.

Parameters
pdfObject The new, empty, object, created in a concrete implementation
functionType The function type, can be 0, 2, 3 or 4
domain the valid input domain, input will be clipped to this domain contains a min max pair per input component
range the valid output range, oputput will be clipped to this range contains a min max pair per output component

◆ AbstractPdfFunction() [2/2]

Constructs a PdfFunction from an existing PdfObject.

Parameters
pdfObject Either a iText.Kernel.Pdf.PdfDictionary or a iText.Kernel.Pdf.PdfStream

Member Function Documentation

◆ Calculate()

abstract double [] iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.Calculate ( double[]  input )
pure virtual

Calculates one set of input components to one set of output components.

Parameters
input The input values size must contain GetInputSize() items
Returns
an array the size of GetOutputSize() items containing the result

Implements iText.Kernel.Pdf.Function.IPdfFunction.

Implemented in iText.Kernel.Pdf.Function.PdfType3Function, iText.Kernel.Pdf.Function.PdfType0Function, iText.Kernel.Pdf.Function.PdfType2Function, and iText.Kernel.Pdf.Function.PdfType4Function.

◆ CalculateFromByteArray() [1/2]

virtual byte [] iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.CalculateFromByteArray ( byte[]  bytes,
int  offset,
int  length,
int  wordSizeInputLength,
int  wordSizeOutputLength 
)
inlinevirtual

Performs the calculation in bulk on a set of raw data and returns a new set of raw data.

Parameters
bytes The uninterpreted set of data to be transformed
offset Where to start converting the data
length How many of the input bytes should be converted
wordSizeInputLength How many bytes represents one input value
wordSizeOutputLength How many bytes represents one output value
Returns
the transformed result as a raw byte array

Implements iText.Kernel.Pdf.Function.IPdfFunction.

◆ CalculateFromByteArray() [2/2]

virtual byte [] iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.CalculateFromByteArray ( byte[]  bytes,
int  offset,
int  length,
int  wordSizeInputLength,
int  wordSizeOutputLength,
BaseInputOutPutConvertors.IInputConversionFunction  inputConvertor,
BaseInputOutPutConvertors.IOutputConversionFunction  outputConvertor 
)
inlinevirtual

Performs the calculation in bulk on a set of raw data and returns a new set of raw data.

Parameters
bytes The uninterpreted set of data to be transformed
offset Where to start converting the data
length How many of the input bytes should be converted
wordSizeInputLength How many bytes represents one input value
wordSizeOutputLength How many bytes represents one output value
inputConvertor a custom input convertor
outputConvertor a custom output convertor
Returns
the transformed result as a raw byte array

Implements iText.Kernel.Pdf.Function.IPdfFunction.

◆ CheckCompatibilityWithColorSpace()

virtual bool iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.CheckCompatibilityWithColorSpace ( PdfColorSpace  alternateSpace )
inlinevirtual

Chacks wether the output of the function matches in components with the passed by color space.

Parameters
alternateSpace The color space to verify against
Returns
True when compatible

Implements iText.Kernel.Pdf.Function.IPdfFunction.

◆ ClipInput()

virtual double [] iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.ClipInput ( double[]  input )
inlinevirtual

Clip input values to the allowed domain.

Clip input values to the allowed domain.

(see ISO-320001 Table 38)

Parameters
input the input values to be clipped
Returns
the values clipped between the boundaries defined in the domain

Implements iText.Kernel.Pdf.Function.IPdfFunction.

◆ ClipOutput()

virtual double [] iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.ClipOutput ( double[]  input )
inlinevirtual

Clip output values to the allowed range, if there is a range.

Clip output values to the allowed range, if there is a range.

(see ISO-320001 Table 38)

Parameters
input the output values to be clipped
Returns
the values clipped between the boundaries defined in the range

Implements iText.Kernel.Pdf.Function.IPdfFunction.

◆ GetDomain()

virtual double [] iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.GetDomain ( )
inlinevirtual

The valid input domain, input will be clipped to this domain contains a min max pair per input component.

The valid input domain, input will be clipped to this domain contains a min max pair per input component.

(see ISO-320001 Table 38)

Returns
the input domain

Implements iText.Kernel.Pdf.Function.IPdfFunction.

◆ GetFunctionType()

virtual int iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.GetFunctionType ( )
inlinevirtual

The function type, (see ISO-320001 Table 38).

Returns
The function type, either 0, 2, 3 or 4

Implements iText.Kernel.Pdf.Function.IPdfFunction.

◆ GetInputSize()

virtual int iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.GetInputSize ( )
inlinevirtual

The number of input components.

Returns
The number of input components

Implements iText.Kernel.Pdf.Function.IPdfFunction.

◆ GetOutputSize()

virtual int iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.GetOutputSize ( )
inlinevirtual

The number of output components.

Returns
The number of output components

Implements iText.Kernel.Pdf.Function.IPdfFunction.

Reimplemented in iText.Kernel.Pdf.Function.PdfType3Function, and iText.Kernel.Pdf.Function.PdfType2Function.

◆ GetRange()

virtual double [] iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.GetRange ( )
inlinevirtual

the valid output range, output will be clipped to this range contains a min max pair per output component.

the valid output range, output will be clipped to this range contains a min max pair per output component.

(see ISO-320001 Table 38)

Returns
the output range

Implements iText.Kernel.Pdf.Function.IPdfFunction.

◆ IsWrappedObjectMustBeIndirect()

override bool iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.IsWrappedObjectMustBeIndirect ( )
inlinepackagevirtual

Defines if the object behind this wrapper must be an indirect object in the resultant document.

Defines if the object behind this wrapper must be an indirect object in the resultant document.

If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.

Return value of this method shouldn't depend on any logic, it should return always true or false.

Returns
true if in the resultant document the object behind the wrapper must be indirect, otherwise false.

Implements iText.Kernel.Pdf.PdfObjectWrapper< T >.

◆ SetDomain()

virtual void iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.SetDomain ( double[]  value )
inlinevirtual

The valid input domain, input will be clipped to this domain contains a min max pair per input component.

The valid input domain, input will be clipped to this domain contains a min max pair per input component.

(see ISO-320001 Table 38)

Parameters
value the new set of limits

Implements iText.Kernel.Pdf.Function.IPdfFunction.

Reimplemented in iText.Kernel.Pdf.Function.PdfType0Function.

◆ SetRange()

virtual void iText.Kernel.Pdf.Function.AbstractPdfFunction< T >.SetRange ( double[]  value )
inlinevirtual

the valid output range, output will be clipped to this range contains a min max pair per output component.

the valid output range, output will be clipped to this range contains a min max pair per output component.

(see ISO-320001 Table 38)

Parameters
value the new set of limts

Implements iText.Kernel.Pdf.Function.IPdfFunction.

Reimplemented in iText.Kernel.Pdf.Function.PdfType0Function.