Class PdfAxialShading
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
-
- com.itextpdf.kernel.pdf.colorspace.shading.AbstractPdfShading
-
- com.itextpdf.kernel.pdf.colorspace.shading.AbstractPdfShadingBlend
-
- com.itextpdf.kernel.pdf.colorspace.shading.PdfAxialShading
-
public class PdfAxialShading extends AbstractPdfShadingBlend
The class that extendsAbstractPdfShading
andAbstractPdfShadingBlend
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 Summary
Constructors Constructor Description PdfAxialShading(PdfColorSpace cs, float x0, float y0, float[] color0, float x1, float y1, float[] color1)
Creates the new instance of the class.PdfAxialShading(PdfColorSpace cs, float x0, float y0, float[] color0, float x1, float y1, float[] color1, boolean[] extend)
Creates the new instance of the class.PdfAxialShading(PdfColorSpace cs, PdfArray coords, IPdfFunction function)
Creates the new instance of the class.PdfAxialShading(PdfColorSpace cs, PdfArray coords, PdfArray domain, IPdfFunction function)
Creates the new instance of the class.PdfAxialShading(PdfDictionary pdfDictionary)
Creates the new instance of the class from the existingPdfDictionary
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.-
Methods inherited from class com.itextpdf.kernel.pdf.colorspace.shading.AbstractPdfShadingBlend
getCoords, getDomain, getExtend, setCoords, setDomain, setDomain, setExtend, setExtend
-
Methods inherited from class com.itextpdf.kernel.pdf.colorspace.shading.AbstractPdfShading
flush, getColorSpace, getFunction, getShadingType, isWrappedObjectMustBeIndirect, makeShading, setFunction, setFunction
-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
-
-
-
Constructor Detail
-
PdfAxialShading
public PdfAxialShading(PdfDictionary pdfDictionary)
Creates the new instance of the class from the existingPdfDictionary
.- Parameters:
pdfDictionary
- from which thisPdfAxialShading
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
- thePdfColorSpace
object in which colour values shall be expressed. The special Pattern space isn't exceptedx0
- the start coordinate of X axis expressed in the shading's target coordinate spacey0
- the start coordinate of Y axis expressed in the shading's target coordinate spacecolor0
- thefloat[]
that represents the color in the start pointx1
- the end coordinate of X axis expressed in the shading's target coordinate spacey1
- the end coordinate of Y axis expressed in the shading's target coordinate spacecolor1
- thefloat[]
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
- thePdfColorSpace
object in which colour values shall be expressed. The special Pattern space isn't exceptedx0
- the start coordinate of X axis expressed in the shading's target coordinate spacey0
- the start coordinate of Y axis expressed in the shading's target coordinate spacecolor0
- thefloat[]
that represents the color in the start pointx1
- the end coordinate of X axis expressed in the shading's target coordinate spacey1
- the end coordinate of Y axis expressed in the shading's target coordinate spacecolor1
- thefloat[]
that represents the color in the end pointextend
- 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
- thePdfColorSpace
object in which colour values shall be expressed. The special Pattern space isn't exceptedcoords
- thePdfArray
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 spacefunction
- theIPdfFunction
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
- thePdfColorSpace
object in which colour values shall be expressed. The special Pattern space isn't exceptedcoords
- thePdfArray
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 spacedomain
- thePdfArray
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 functionfunction
- theIPdfFunction
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 sety0
- the start coordinate of Y axis to be setx1
- the end coordinate of X axis to be sety1
- the end coordinate of Y axis to be set
-
-