public static class PdfShading.CoonsPatchMesh extends PdfShading
PdfShading
class and is in charge of Shading Dictionary with Coons Patch mesh type. This type of shading is constructed from one or more colour patches, each bounded by four cubic Bézier curves. Degenerate Bézier curves are allowed and are useful for certain graphical effects. At least one complete patch shall be specified. The shape of patch is defined by 12 control points. Colours are specified for each corner of the unit square, and bilinear interpolation is used to fill in colours over the entire unit square. Coordinates are mapped from the unit square into a four-sided patch whose sides are not necessarily linear. The mapping is continuous: the corners of the unit square map to corners of the patch and the sides of the unit square map to sides of the patch. For the format of data stream, that defines patches (see ISO-320001 Table 85). If the shading dictionary contains a Function entry, the colour data for each corner of a patch shall be specified by a single parametric value t rather than by n separate colour components c1...cn.
PdfShading.Axial, PdfShading.CoonsPatchMesh, PdfShading.FreeFormGouraudShadedTriangleMesh, PdfShading.FunctionBased, PdfShading.LatticeFormGouraudShadedTriangleMesh, PdfShading.Radial, PdfShading.TensorProductPatchMesh
Constructor and Description |
---|
CoonsPatchMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int bitsPerFlag, float[] decode)
Creates the new instance of the class.
|
CoonsPatchMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int bitsPerFlag, PdfArray decode)
Creates the new instance of the class.
|
CoonsPatchMesh(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.
|
int |
getBitsPerFlag()
Gets the number of bits used to represent the edge flag for each vertex.
|
PdfArray |
getDecode()
Gets the PdfArray of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.
|
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 |
setBitsPerFlag(int bitsPerFlag)
Sets the number of bits used to represent the edge flag for each vertex.
|
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.
|
flush, getColorSpace, getFunction, getShadingType, isWrappedObjectMustBeIndirect, makeShading, setFunction, setFunction
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public CoonsPatchMesh(PdfStream pdfStream)
PdfShading.makeShading(PdfDictionary)
instead.
PdfStream
object.
pdfStream
- PdfStream
from which the instance is created.
public CoonsPatchMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int bitsPerFlag, 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.
bitsPerFlag
- the number of bits used to represent the edge flag for each vertex. The value of BitsPerFlag shall be 2, 4, or 8, but only the least significant 2 bits in each flag value shall be used. The value for the edge flag shall be 0, 1, 2 or 3.
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 CoonsPatchMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int bitsPerFlag, 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.
bitsPerFlag
- the number of bits used to represent the edge flag for each vertex. The value of BitsPerFlag shall be 2, 4, or 8, but only the least significant 2 bits in each flag value shall be used. The value for the edge flag shall be 0, 1, 2 or 3.
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 getBitsPerFlag()
public void setBitsPerFlag(int bitsPerFlag)
bitsPerFlag
- the number of bits to be set. Shall be 2, 4 or 8.
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.