Class PdfAxialShading


  • public class PdfAxialShading
    extends AbstractPdfShadingBlend
    The class that extends AbstractPdfShading and AbstractPdfShadingBlend classes 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 Detail

      • PdfAxialShading

        public PdfAxialShading​(PdfDictionary pdfDictionary)
        Creates the new instance of the class from the existing PdfDictionary.
        Parameters:
        pdfDictionary - from which this PdfAxialShading will be created
      • PdfAxialShading

        public PdfAxialShading​(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
      • PdfAxialShading

        public PdfAxialShading​(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
      • PdfAxialShading

        public PdfAxialShading​(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
      • PdfAxialShading

        public PdfAxialShading​(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 Detail

      • setCoords

        public final 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