public static class PdfShading.LatticeFormGouraudShadedTriangleMesh extends PdfShading
PdfShading
class and is in charge of Shading Dictionary with lattice-form Gouraud-shaded triangle mesh type. This type is similar to PdfShading.FreeFormGouraudShadedTriangleMesh
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 PdfShading.FreeFormGouraudShadedTriangleMesh
, except there is no edge flag.
PdfShading.Axial, PdfShading.CoonsPatchMesh, PdfShading.FreeFormGouraudShadedTriangleMesh, PdfShading.FunctionBased, PdfShading.LatticeFormGouraudShadedTriangleMesh, PdfShading.Radial, PdfShading.TensorProductPatchMesh
Constructor and Description |
---|
LatticeFormGouraudShadedTriangleMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int verticesPerRow, float[] decode)
Creates the new instance of the class.
|
LatticeFormGouraudShadedTriangleMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int verticesPerRow, PdfArray decode)
Creates the new instance of the class.
|
LatticeFormGouraudShadedTriangleMesh(PdfStream pdfStream)
Deprecated.
Intended only for private use. You should use
PdfShading.makeShading(PdfDictionary) instead.
|
Modifier and Type | Method and Description |
---|---|
int |
getBitsPerComponent()
Gets the number of bits used to represent each colour component.
|
int |
getBitsPerCoordinate()
Gets the number of bits used to represent each vertex coordinate.
|
PdfArray |
getDecode()
Gets the PdfArray of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.
|
int |
getVerticesPerRow()
Gets the number of vertices in each row of the lattice.
|
void |
setBitsPerComponent(int bitsPerComponent)
Sets the number of bits used to represent each colour component.
|
void |
setBitsPerCoordinate(int bitsPerCoordinate)
Sets the number of bits used to represent each vertex coordinate.
|
void |
setDecode(float[] decode)
Sets the float[] of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.
|
void |
setDecode(PdfArray decode)
Sets the PdfArray of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.
|
void |
setVerticesPerRow(int verticesPerRow)
Sets the number of vertices in each row of the lattice.
|
flush, getColorSpace, getFunction, getShadingType, isWrappedObjectMustBeIndirect, makeShading, setFunction, setFunction
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public LatticeFormGouraudShadedTriangleMesh(PdfStream pdfStream)
PdfShading.makeShading(PdfDictionary)
instead.
PdfStream
object.
pdfStream
- PdfStream
from which the instance is created.
public LatticeFormGouraudShadedTriangleMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int verticesPerRow, float[] decode)
cs
- the PdfColorSpace
object in which colour values shall be expressed. The special Pattern space isn't excepted.
bitsPerCoordinate
- the number of bits used to represent each vertex coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32.
bitsPerComponent
- the number of bits used to represent each colour component. The value shall be 1, 2, 4, 8, 12, or 16.
verticesPerRow
- the number of vertices in each row of the lattice (shall be > 1). The number of rows need not be specified.
decode
- the int[]
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.
public LatticeFormGouraudShadedTriangleMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int verticesPerRow, PdfArray decode)
cs
- the PdfColorSpace
object in which colour values shall be expressed. The special Pattern space isn't excepted.
bitsPerCoordinate
- the number of bits used to represent each vertex coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32.
bitsPerComponent
- the number of bits used to represent each colour component. The value shall be 1, 2, 4, 8, 12, or 16.
verticesPerRow
- the number of vertices in each row of the lattice (shall be > 1). The number of rows need not be specified.
decode
- the PdfArray
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.
public int getBitsPerCoordinate()
public void setBitsPerCoordinate(int bitsPerCoordinate)
bitsPerCoordinate
- the number of bits to be set. Shall be 1, 2, 4, 8, 12, 16, 24, or 32.
public int getBitsPerComponent()
public void setBitsPerComponent(int bitsPerComponent)
bitsPerComponent
- the number of bits to be set. Shall be 1, 2, 4, 8, 12, or 16.
public int getVerticesPerRow()
public void setVerticesPerRow(int verticesPerRow)
verticesPerRow
- the number of vertices to be set. Shall be greater than 1.
public PdfArray getDecode()
PdfArray
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.
PdfArray
Decode object.
public void setDecode(float[] decode)
float[]
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.
decode
- the float[]
of Decode object to set.
public void setDecode(PdfArray decode)
PdfArray
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.
decode
- the PdfArray
Decode object to set.
Copyright © 1998–2018 iText Group NV. All rights reserved.