Class PdfShading.Axial

Enclosing class:
PdfShading

public static class PdfShading.Axial extends PdfShading
The class that extends PdfShading class and is in charge of Shading Dictionary with axial type, that define a colour blend that varies along a linear axis between two endpoints and extends indefinitely perpendicular to that axis.
  • Constructor Details

    • Axial

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

      public Axial (PdfColorSpace cs, float x0, float y0, float[] color0, float x1, float y1, float[] color1)
      Creates the new instance of the class.
      Parameters:
      cs - the PdfColorSpace object in which colour values shall be expressed. The special Pattern space isn't excepted.
      x0 - the start coordinate of X axis expressed in the shading's target coordinate space.
      y0 - the start coordinate of Y axis expressed in the shading's target coordinate space.
      color0 - the float[] that represents the color in the start point.
      x1 - the end coordinate of X axis expressed in the shading's target coordinate space.
      y1 - the end coordinate of Y axis expressed in the shading's target coordinate space.
      color1 - the float[] that represents the color in the end point.
    • Axial

      public Axial (PdfColorSpace cs, float x0, float y0, float[] color0, float x1, float y1, float[] color1, boolean[] extend)
      Creates the new instance of the class.
      Parameters:
      cs - the PdfColorSpace object in which colour values shall be expressed. The special Pattern space isn't excepted.
      x0 - the start coordinate of X axis expressed in the shading's target coordinate space.
      y0 - the start coordinate of Y axis expressed in the shading's target coordinate space.
      color0 - the float[] that represents the color in the start point.
      x1 - the end coordinate of X axis expressed in the shading's target coordinate space.
      y1 - the end coordinate of Y axis expressed in the shading's target coordinate space.
      color1 - the float[] that represents the color in the end point.
      extend - the array of two booleans that specified whether to extend the shading beyond the starting and ending points of the axis, respectively.
    • Axial

      public Axial (PdfColorSpace cs, PdfArray coords, IPdfFunction function)
      Creates the new instance of the class.
      Parameters:
      cs - the PdfColorSpace object in which colour values shall be expressed. The special Pattern space isn't excepted.
      coords - the PdfArray of four numbers [x0 y0 x1 y1] that specified the starting and the endings coordinates of thew axis, expressed in the shading's target coordinate space.
      function - the IPdfFunction object, that is used to calculate color transitions.
    • Axial

      public Axial (PdfColorSpace cs, PdfArray coords, PdfArray domain, IPdfFunction function)
      Creates the new instance of the class.
      Parameters:
      cs - the PdfColorSpace object in which colour values shall be expressed. The special Pattern space isn't excepted.
      coords - the PdfArray of four numbers [x0 y0 x1 y1] that specified the starting and the endings coordinates of thew axis, expressed in the shading's target coordinate space.
      domain - the PdfArray of two numbers [t0 t1] specifying the limiting values of a parametric variable t which is considered to vary linearly between these two values and becomes the input argument to the colour function.
      function - the IPdfFunction object, that is used to calculate color transitions.
  • Method Details

    • getCoords

      public PdfArray getCoords()
      Gets the Coords object - a PdfArray of four numbers [x0 y0 x1 y1] that specified the starting and the endings coordinates of thew axis, expressed in the shading's target coordinate space.
      Returns:
      the PdfArray Coords object.
    • setCoords

      public void setCoords (float x0, float y0, float x1, float y1)
      Sets the Choords object with the four params expressed in the shading's target coordinate space.
      Parameters:
      x0 - the start coordinate of X axis to be set.
      y0 - the start coordinate of Y axis to be set.
      x1 - the end coordinate of X axis to be set.
      y1 - the end coordinate of Y axis to be set.
    • setCoords

      public void setCoords (PdfArray coords)
      Sets the Choords object with the PdfArray of four numbers [x0 y0 x1 y1], that specified the starting and the endings coordinates of thew axis, expressed in the shading's target coordinate space.
      Parameters:
      coords - the Chords PdfArray to be set.
    • getDomain

      public PdfArray getDomain()
      Gets the PdfArray of two float [t0, t1] that represent the limiting values of a parametric variable t, that becomes an input of color function(s).
      Returns:
      the PdfArray of Domain object ([0.0 1.0] by default)
    • setDomain

      public void setDomain (float t0, float t1)
      Sets the Domain with the array of two float [t0, t1] that represent the limiting values of a parametric variable t, that becomes an input of color function(s).
      Parameters:
      t0 - first limit of variable t
      t1 - second limit of variable t
    • setDomain

      public void setDomain (PdfArray domain)
      Sets the Domain with the PdfArray of two float [t0, t1] that represent the limiting values of a parametric variable t, that becomes an input of color function(s).
      Parameters:
      domain - the PdfArray that represents domain
    • getExtend

      public PdfArray getExtend()
      Gets the PdfArray of two boolean that specified whether to extend the shading beyond the starting and ending points of the axis, respectively.
      Returns:
      the PdfArray of Extended object ([false false] by default)
    • setExtend

      public void setExtend (boolean extendStart, boolean extendEnd)
      Sets the Extend object with the two boolean value.
      Parameters:
      extendStart - if true will extend shading beyond the starting point of Coords
      extendEnd - if true will extend shading beyond the ending point of Coords
    • setExtend

      public void setExtend (PdfArray extend)
      Sets the Extend object with the PdfArray of two boolean. If first is true shading will extend beyond the starting point of Coords. If second is true shading will extend beyond the ending point of Coords.
      Parameters:
      extend - the PdfArray representing Extend object