Class PdfShading.FunctionBased

Enclosing class:
PdfShading

public static class PdfShading.FunctionBased extends PdfShading
The class that extends PdfShading class and is in charge of Shading Dictionary with function-based type, that defines color at every point in the domain by a specified mathematical function.
  • Constructor Details

    • FunctionBased

      protected FunctionBased (PdfDictionary pdfDictionary)
      Creates the new instance of the class from the existing PdfDictionary.
      Parameters:
      pdfDictionary - from which this PdfShading.FunctionBased will be created
    • FunctionBased

      public FunctionBased (PdfColorSpace colorSpace, IPdfFunction function)
      Creates the new instance of the class.
      Parameters:
      colorSpace - the PdfColorSpace object in which colour values shall be expressed.
      function - the IPdfFunction, that is used to calculate color transitions.
    • FunctionBased

      public FunctionBased (PdfObject colorSpace, IPdfFunction function)
      Creates the new instance of the class.
      Parameters:
      colorSpace - the PdfObject, that represents color space in which colour values shall be expressed.
      function - the IPdfFunction, that is used to calculate color transitions.
  • Method Details

    • getDomain

      public PdfArray getDomain()
      Gets the PdfArray domain rectangle object that establishes an internal coordinate space for the shading that is independent of the target coordinate space in which it shall be painted.
      Returns:
      PdfArray domain rectangle.
    • setDomain

      public void setDomain (float xmin, float xmax, float ymin, float ymax)
      Sets the PdfArray domain rectangle object that establishes an internal coordinate space for the shading that is independent of the target coordinate space in which it shall be painted.
      Parameters:
      xmin - the Xmin coordinate of rectangle.
      xmax - the Xmax coordinate of rectangle.
      ymin - the Ymin coordinate of rectangle.
      ymax - the Ymax coordinate of rectangle.
    • setDomain

      public void setDomain (PdfArray domain)
      Sets the PdfArray domain rectangle object that establishes an internal coordinate space for the shading that is independent of the target coordinate space in which it shall be painted.
      Parameters:
      domain - the PdfArray domain rectangle object to be set.
    • getMatrix

      public PdfArray getMatrix()
      Gets the PdfArray of floats that represents the transformation matrix that maps the domain rectangle into a corresponding figure in the target coordinate space.
      Returns:
      the PdfArray of transformation matrix (identical matrix by default).
    • setMatrix

      public void setMatrix (float[] matrix)
      Sets the array of floats that represents the transformation matrix that maps the domain rectangle into a corresponding figure in the target coordinate space.
      Parameters:
      matrix - the float[] of transformation matrix to be set.
    • setMatrix

      public void setMatrix (PdfArray matrix)
      Sets the array of floats that represents the transformation matrix that maps the domain rectangle into a corresponding figure in the target coordinate space.
      Parameters:
      matrix - the PdfArray transformation matrix object to be set.