Class Function

java.lang.Object
org.jfree.pdf.internal.PDFObject
org.jfree.pdf.function.Function
Direct Known Subclasses:
ExponentialInterpolationFunction, StitchingFunction

public abstract class Function extends PDFObject
A PDF function object. For the PDFGraphics2D class, only EXPONENTIAL_INTERPOLATION and STITCHING are used so far (to support gradient paint implementations).
  • Field Details

    • functionType

      private final FunctionType functionType
      The function type.
    • domain

      private double[] domain
      The function domain.
    • dictionary

      protected Dictionary dictionary
      The function dictionary.
  • Constructor Details

    • Function

      protected Function(int number, FunctionType functionType)
      Creates a new function.
      Parameters:
      number - the PDF object number.
      functionType - the function type (null not permitted).
  • Method Details

    • getFunctionType

      public FunctionType getFunctionType()
      Returns the function type.
      Returns:
      The function type (never null).
    • getDomain

      public double[] getDomain()
      Returns the function domain.
      Returns:
      The function domain (never null).
    • setDomain

      public void setDomain(double[] domain)
      Sets the domain for the function.
      Parameters:
      domain - the domain (null not permitted).
    • getObjectBytes

      public byte[] getObjectBytes()
      Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.
      Specified by:
      getObjectBytes in class PDFObject
      Returns:
      A byte array.