Class PdfShading.Axial
java.lang.Object
com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
com.itextpdf.kernel.pdf.colorspace.PdfShading
com.itextpdf.kernel.pdf.colorspace.PdfShading.Axial
- Enclosing class:
- 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.itextpdf.kernel.pdf.colorspace.PdfShading
PdfShading.Axial, PdfShading.CoonsPatchMesh, PdfShading.FreeFormGouraudShadedTriangleMesh, PdfShading.FunctionBased, PdfShading.LatticeFormGouraudShadedTriangleMesh, PdfShading.Radial, PdfShading.TensorProductPatchMesh -
Constructor Summary
ConstructorsModifierConstructorDescriptionAxial(PdfColorSpace cs, float x0, float y0, float[] color0, float x1, float y1, float[] color1) Creates the new instance of the class.Axial(PdfColorSpace cs, float x0, float y0, float[] color0, float x1, float y1, float[] color1, boolean[] extend) Creates the new instance of the class.Axial(PdfColorSpace cs, PdfArray coords, IPdfFunction function) Creates the new instance of the class.Axial(PdfColorSpace cs, PdfArray coords, PdfArray domain, IPdfFunction function) Creates the new instance of the class.protectedAxial(PdfDictionary pdfDictionary) Creates the new instance of the class from the existingPdfDictionary. -
Method Summary
Modifier and TypeMethodDescriptionGets the Coords object - aPdfArrayof 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.Gets thePdfArrayof twofloat[t0, t1] that represent the limiting values of a parametric variable t, that becomes an input of color function(s).Gets thePdfArrayof twobooleanthat specified whether to extend the shading beyond the starting and ending points of the axis, respectively.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.voidSets the Choords object with 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.voidsetDomain(float t0, float t1) Sets the Domain with the array of twofloat[t0, t1] that represent the limiting values of a parametric variable t, that becomes an input of color function(s).voidSets the Domain with thePdfArrayof twofloat[t0, t1] that represent the limiting values of a parametric variable t, that becomes an input of color function(s).voidsetExtend(boolean extendStart, boolean extendEnd) Sets the Extend object with the twobooleanvalue.voidSets the Extend object with thePdfArrayof twoboolean.Methods inherited from class com.itextpdf.kernel.pdf.colorspace.PdfShading
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
-
Axial
Creates the new instance of the class from the existingPdfDictionary.- Parameters:
-
pdfDictionary- from which thisPdfShading.Axialwill 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- 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.
-
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- 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.
-
Axial
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.
-
Axial
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
-
getCoords
Gets the Coords object - aPdfArrayof 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
PdfArrayCoords 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
Sets the Choords object with 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.- Parameters:
-
coords- the ChordsPdfArrayto be set.
-
getDomain
Gets thePdfArrayof twofloat[t0, t1] that represent the limiting values of a parametric variable t, that becomes an input of color function(s).- Returns:
-
the
PdfArrayof Domain object ([0.0 1.0] by default)
-
setDomain
public void setDomain(float t0, float t1) Sets the Domain with the array of twofloat[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
Sets the Domain with thePdfArrayof twofloat[t0, t1] that represent the limiting values of a parametric variable t, that becomes an input of color function(s).- Parameters:
-
domain- thePdfArraythat represents domain
-
getExtend
Gets thePdfArrayof twobooleanthat specified whether to extend the shading beyond the starting and ending points of the axis, respectively.- Returns:
-
the
PdfArrayof Extended object ([false false] by default)
-
setExtend
public void setExtend(boolean extendStart, boolean extendEnd) Sets the Extend object with the twobooleanvalue.- 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
Sets the Extend object with thePdfArrayof twoboolean. 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- thePdfArrayrepresenting Extend object
-