Class AbstractPdfShadingMesh
java.lang.Object
com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
com.itextpdf.kernel.pdf.colorspace.shading.AbstractPdfShading
com.itextpdf.kernel.pdf.colorspace.shading.AbstractPdfShadingMesh
- Direct Known Subclasses:
AbstractPdfShadingMeshWithFlags
,PdfLatticeFormGouraudShadedTriangleShading
The PdfShadingMesh class which extends
AbstractPdfShading
and represents shadings which are based on a mesh,
with BitsPerCoordinate, BitsPerComponent and Decode fields in the PDF object.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractPdfShadingMesh
(PdfDictionary pdfObject) Constructor for PdfShadingBlend object using a PdfDictionary.protected
AbstractPdfShadingMesh
(PdfDictionary pdfObject, int type, PdfColorSpace colorSpace) Constructor for PdfShadingBlend object using a PdfDictionary, shading type and color space. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the number of bits used to represent each colour component.int
Gets the number of bits used to represent each vertex coordinate.Gets thePdfArray
of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.final void
setBitsPerComponent
(int bitsPerComponent) Sets the number of bits used to represent each colour component.final void
setBitsPerCoordinate
(int bitsPerCoordinate) Sets the number of bits used to represent each vertex coordinate.final void
setDecode
(float[] decode) Sets thefloat[]
of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.final void
Sets thePdfArray
of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.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 Details
-
AbstractPdfShadingMesh
Constructor for PdfShadingBlend object using a PdfDictionary.- Parameters:
pdfObject
- input PdfDictionary
-
AbstractPdfShadingMesh
Constructor for PdfShadingBlend object using a PdfDictionary, shading type and color space.- Parameters:
pdfObject
- input PdfDictionarytype
- shading typecolorSpace
- color space
-
-
Method Details
-
getBitsPerCoordinate
public int getBitsPerCoordinate()Gets the number of bits used to represent each vertex coordinate.- Returns:
- the number of bits. Can be 1, 2, 4, 8, 12, 16, 24, or 32
-
setBitsPerCoordinate
public final void setBitsPerCoordinate(int bitsPerCoordinate) Sets the number of bits used to represent each vertex coordinate.- Parameters:
bitsPerCoordinate
- the number of bits to be set. Shall be 1, 2, 4, 8, 12, 16, 24, or 32
-
getBitsPerComponent
public int getBitsPerComponent()Gets the number of bits used to represent each colour component.- Returns:
- the number of bits. Can be 1, 2, 4, 8, 12, or 16
-
setBitsPerComponent
public final void setBitsPerComponent(int bitsPerComponent) Sets the number of bits used to represent each colour component.- Parameters:
bitsPerComponent
- the number of bits to be set. Shall be 1, 2, 4, 8, 12, or 16
-
getDecode
Gets thePdfArray
of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values. The ranges shall be specified as follows: [x_min x_max y_min y_max c1_min c1_max … cn_min cn_max]. Only one pair of color values shall be specified if a Function entry is present.- Returns:
- the
PdfArray
Decode object
-
setDecode
public final void setDecode(float[] decode) Sets thefloat[]
of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values. The ranges shall be specified as follows: [x_min x_max y_min y_max c1_min c1_max … cn_min cn_max]. Only one pair of color values shall be specified if a Function entry is present.- Parameters:
decode
- thefloat[]
of Decode object to set
-
setDecode
Sets thePdfArray
of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values. The ranges shall be specified as follows: [x_min x_max y_min y_max c1_min c1_max … cn_min cn_max]. Only one pair of color values shall be specified if a Function entry is present.- Parameters:
decode
- thePdfArray
Decode object to set
-