Class PdfLatticeFormGouraudShadedTriangleShading
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
-
- com.itextpdf.kernel.pdf.colorspace.shading.AbstractPdfShading
-
- com.itextpdf.kernel.pdf.colorspace.shading.AbstractPdfShadingMesh
-
- com.itextpdf.kernel.pdf.colorspace.shading.PdfLatticeFormGouraudShadedTriangleShading
-
public class PdfLatticeFormGouraudShadedTriangleShading extends AbstractPdfShadingMesh
The class that extendsAbstractPdfShading
andAbstractPdfShadingMesh
classes and is in charge of Shading Dictionary with lattice-form Gouraud-shaded triangle mesh type.This type is similar to
PdfFreeFormGouraudShadedTriangleShading
but instead of using free-form geometry, the vertices are arranged in a pseudorectangular lattice, which is topologically equivalent to a rectangular grid. The vertices are organized into rows, which need not be geometrically linear.The verticals data in stream is similar to
PdfFreeFormGouraudShadedTriangleShading
, except there is no edge flag.
-
-
Constructor Summary
Constructors Constructor Description PdfLatticeFormGouraudShadedTriangleShading(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int verticesPerRow, float[] decode)
Creates the new instance of the class.PdfLatticeFormGouraudShadedTriangleShading(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int verticesPerRow, PdfArray decode)
Creates the new instance of the class.PdfLatticeFormGouraudShadedTriangleShading(PdfStream pdfStream)
Creates the new instance of the class from the existingPdfStream
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getVerticesPerRow()
Gets the number of vertices in each row of the lattice.void
setVerticesPerRow(int verticesPerRow)
Sets the number of vertices in each row of the lattice.-
Methods inherited from class com.itextpdf.kernel.pdf.colorspace.shading.AbstractPdfShadingMesh
getBitsPerComponent, getBitsPerCoordinate, getDecode, setBitsPerComponent, setBitsPerCoordinate, setDecode, setDecode
-
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
-
PdfLatticeFormGouraudShadedTriangleShading
public PdfLatticeFormGouraudShadedTriangleShading(PdfStream pdfStream)
Creates the new instance of the class from the existingPdfStream
.- Parameters:
pdfStream
- from which thisPdfLatticeFormGouraudShadedTriangleShading
will be created
-
PdfLatticeFormGouraudShadedTriangleShading
public PdfLatticeFormGouraudShadedTriangleShading(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int verticesPerRow, float[] decode)
Creates the new instance of the class.- Parameters:
cs
- thePdfColorSpace
object in which colour values shall be expressed. The special Pattern space isn't exceptedbitsPerCoordinate
- the number of bits used to represent each vertex coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32bitsPerComponent
- the number of bits used to represent each colour component. The value shall be 1, 2, 4, 8, 12, or 16verticesPerRow
- the number of vertices in each row of the lattice (shall be > 1). The number of rows need not be specifieddecode
- theint[]
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
-
PdfLatticeFormGouraudShadedTriangleShading
public PdfLatticeFormGouraudShadedTriangleShading(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int verticesPerRow, PdfArray decode)
Creates the new instance of the class.- Parameters:
cs
- thePdfColorSpace
object in which colour values shall be expressed. The special Pattern space isn't exceptedbitsPerCoordinate
- the number of bits used to represent each vertex coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32bitsPerComponent
- the number of bits used to represent each colour component. The value shall be 1, 2, 4, 8, 12, or 16verticesPerRow
- the number of vertices in each row of the lattice (shall be > 1). The number of rows need not be specifieddecode
- 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
-
-
Method Detail
-
getVerticesPerRow
public int getVerticesPerRow()
Gets the number of vertices in each row of the lattice.- Returns:
- the number of vertices. Can only be greater than 1
-
setVerticesPerRow
public final void setVerticesPerRow(int verticesPerRow)
Sets the number of vertices in each row of the lattice. The number of rows need not be specified.- Parameters:
verticesPerRow
- the number of vertices to be set. Shall be greater than 1
-
-