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
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 Summary
ConstructorsConstructorDescriptionPdfAxialShading(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
Modifier and TypeMethodDescriptionfinal voidsetCoords(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, setExtendMethods inherited from class com.itextpdf.kernel.pdf.colorspace.shading.AbstractPdfShading
flush, getColorSpace, getFunction, getShadingType, isWrappedObjectMustBeIndirect, makeShading, setFunction, setFunctionMethods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
Constructor Details
-
PdfAxialShading
Creates the new instance of the class from the existingPdfDictionary.- Parameters:
-
pdfDictionary- from which thisPdfAxialShadingwill 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- thePdfColorSpaceobject 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- thefloat[]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- 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- thePdfColorSpaceobject 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- thefloat[]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- thefloat[]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
Creates the new instance of the class.- Parameters:
-
cs- thePdfColorSpaceobject in which colour values shall be expressed. The special Pattern space isn't excepted -
coords- thePdfArrayof 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- theIPdfFunctionobject, that is used to calculate color transitions
-
PdfAxialShading
Creates the new instance of the class.- Parameters:
-
cs- thePdfColorSpaceobject in which colour values shall be expressed. The special Pattern space isn't excepted -
coords- thePdfArrayof 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- thePdfArrayof 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- theIPdfFunctionobject, that is used to calculate color transitions
-
-
Method Details
-
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
-