Class PdfType2Function

All Implemented Interfaces:

public class PdfType2Function extends AbstractPdfFunction<PdfDictionary>
This class represents Pdf type 2 function that defines an exponential interpolation of one input value to n output values.

For more info see ISO 32000-1, section 7.10.3 "Type 2 (Exponential Interpolation) Functions".

  • Constructor Details

    • PdfType2Function

      public PdfType2Function (PdfDictionary dict)
      Instantiates a new PdfType2Function instance based on passed PdfDictionary instance.
      dict - the function dictionary
    • PdfType2Function

      public PdfType2Function (double[] domain, double[] range, double[] c0, double[] c1, int n)
  • Method Details

    • calculate

      public double[] calculate (double[] input)
      Description copied from interface: IPdfFunction
      Calculates one set of input components to one set of output components.
      input - The input values size must contain IPdfFunction.getInputSize() items
      an array the size of IPdfFunction.getOutputSize() items containing the result
    • getOutputSize

      public final int getOutputSize()
      Gets output size of function.

      If Range field is absent, the size of C0 array will be returned.

      Specified by:
      getOutputSize in interface IPdfFunction
      getOutputSize in class AbstractPdfFunction<PdfDictionary>
      output size of function
    • getC0

      public final double[] getC0()
      Gets values of C0 array.
      the values of C0 array
    • setC0

      public final void setC0 (double[] value)
      Sets values of C0 array.
      value - the values of C0 array
    • getC1

      public final double[] getC1()
      Gets values of C1 array.
      the values of C1 array
    • setC1

      public final void setC1 (double[] value)
      Sets values of C1 array.
      value - the values of C1 array
    • getN

      public final double getN()
      Gets value of N field.
      the value of N field
    • setN

      public final void setN (int value)
      sets value of N field.
      value - the value of N field
    • isWrappedObjectMustBeIndirect

      protected boolean isWrappedObjectMustBeIndirect()
      Description copied from class: PdfObjectWrapper
      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.
      Specified by:
      isWrappedObjectMustBeIndirect in class PdfObjectWrapper<PdfDictionary>
      true if in the resultant document the object behind the wrapper must be indirect, otherwise false.