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
ConstructorsModifierConstructorDescriptionprotectedAbstractPdfShadingMesh(PdfDictionary pdfObject) Constructor for PdfShadingBlend object using a PdfDictionary.protectedAbstractPdfShadingMesh(PdfDictionary pdfObject, int type, PdfColorSpace colorSpace) Constructor for PdfShadingBlend object using a PdfDictionary, shading type and color space. -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of bits used to represent each colour component.intGets the number of bits used to represent each vertex coordinate.Gets thePdfArrayof numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.final voidsetBitsPerComponent(int bitsPerComponent) Sets the number of bits used to represent each colour component.final voidsetBitsPerCoordinate(int bitsPerCoordinate) Sets the number of bits used to represent each vertex coordinate.final voidsetDecode(float[] decode) Sets thefloat[]of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.final voidSets thePdfArrayof 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, setFunctionMethods 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 PdfDictionary -
type- shading type -
colorSpace- 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 thePdfArrayof 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
PdfArrayDecode 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 thePdfArrayof 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- thePdfArrayDecode object to set
-