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
public abstract class AbstractPdfShadingMesh extends AbstractPdfShading
The PdfShadingMesh class which extendsAbstractPdfShadingand represents shadings which are based on a mesh, with BitsPerCoordinate, BitsPerComponent and Decode fields in the PDF object.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPdfShadingMesh(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBitsPerComponent()Gets the number of bits used to represent each colour component.intgetBitsPerCoordinate()Gets the number of bits used to represent each vertex coordinate.PdfArraygetDecode()Gets thePdfArrayof numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.voidsetBitsPerComponent(int bitsPerComponent)Sets the number of bits used to represent each colour component.voidsetBitsPerCoordinate(int bitsPerCoordinate)Sets the number of bits used to represent each vertex coordinate.voidsetDecode(float[] decode)Sets thefloat[]of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.voidsetDecode(PdfArray decode)Sets 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, setFunction
-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
-
-
-
Constructor Detail
-
AbstractPdfShadingMesh
protected AbstractPdfShadingMesh(PdfDictionary pdfObject)
Constructor for PdfShadingBlend object using a PdfDictionary.- Parameters:
pdfObject- input PdfDictionary
-
AbstractPdfShadingMesh
protected AbstractPdfShadingMesh(PdfDictionary pdfObject, int type, PdfColorSpace colorSpace)
Constructor for PdfShadingBlend object using a PdfDictionary, shading type and color space.- Parameters:
pdfObject- input PdfDictionarytype- shading typecolorSpace- color space
-
-
Method Detail
-
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
public PdfArray 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
public final void setDecode(PdfArray decode)
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
-
-