Class PdfShading.TensorProductPatchMesh
- Namespace
- iText.Kernel.Pdf.Colorspace
- Assembly
- itext.kernel.dll
The class that extends PdfShading class and is in charge of Shading Dictionary with Tensor-Product Patch mesh type.
public class PdfShading.TensorProductPatchMesh : PdfShading
- Inheritance
-
PdfShading.TensorProductPatchMesh
- Inherited Members
Remarks
The class that extends PdfShading class and is in charge of Shading Dictionary with Tensor-Product Patch mesh type. This type of shading is identical to PdfShading.CoonsPatchMesh , except that it's based on a bicubic tensor-product patch defined by 16 control points. For the format of data stream, that defines patches, see ISO-320001 Table 86.
Constructors
TensorProductPatchMesh(PdfColorSpace, int, int, int, float[])
Creates the new instance of the class.
public TensorProductPatchMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int bitsPerFlag, float[] decode)
Parameters
cs
PdfColorSpacethe PdfColorSpace object in which colour values shall be expressed. The special Pattern space isn't excepted.
bitsPerCoordinate
intthe number of bits used to represent each vertex coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32.
bitsPerComponent
intthe number of bits used to represent each colour component. The value shall be 1, 2, 4, 8, 12, or 16.
bitsPerFlag
intthe 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
float[]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.
TensorProductPatchMesh(PdfColorSpace, int, int, int, PdfArray)
Creates the new instance of the class.
public TensorProductPatchMesh(PdfColorSpace cs, int bitsPerCoordinate, int bitsPerComponent, int bitsPerFlag, PdfArray decode)
Parameters
cs
PdfColorSpacethe PdfColorSpace object in which colour values shall be expressed. The special Pattern space isn't excepted.
bitsPerCoordinate
intthe number of bits used to represent each vertex coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32.
bitsPerComponent
intthe number of bits used to represent each colour component. The value shall be 1, 2, 4, 8, 12, or 16.
bitsPerFlag
intthe 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
PdfArraythe 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.
TensorProductPatchMesh(PdfStream)
Creates the new instance of the class from the existing PdfStream.
protected TensorProductPatchMesh(PdfStream pdfStream)
Parameters
pdfStream
PdfStreamfrom which this PdfShading.TensorProductPatchMesh will be created
Methods
GetBitsPerComponent()
Gets the number of bits used to represent each colour component.
public virtual int GetBitsPerComponent()
Returns
- int
the number of bits. Can be 1, 2, 4, 8, 12, or 16.
GetBitsPerCoordinate()
Gets the number of bits used to represent each vertex coordinate.
public virtual int GetBitsPerCoordinate()
Returns
- int
the number of bits. Can be 1, 2, 4, 8, 12, 16, 24, or 32.
GetBitsPerFlag()
Gets the number of bits used to represent the edge flag for each vertex.
public virtual int GetBitsPerFlag()
Returns
- int
the number of bits. Can be 2, 4 or 8.
Remarks
Gets the number of bits used to represent the edge flag for each vertex. But only the least significant 2 bits in each flag value shall be used. The valid flag values are 0, 1, 2 or 3.
GetDecode()
Gets the PdfArray of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.
public virtual PdfArray GetDecode()
Returns
Remarks
Gets 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.
SetBitsPerComponent(int)
Sets the number of bits used to represent each colour component.
public virtual void SetBitsPerComponent(int bitsPerComponent)
Parameters
bitsPerComponent
intthe number of bits to be set. Shall be 1, 2, 4, 8, 12, or 16.
SetBitsPerCoordinate(int)
Sets the number of bits used to represent each vertex coordinate.
public virtual void SetBitsPerCoordinate(int bitsPerCoordinate)
Parameters
bitsPerCoordinate
intthe number of bits to be set. Shall be 1, 2, 4, 8, 12, 16, 24, or 32.
SetBitsPerFlag(int)
Sets the number of bits used to represent the edge flag for each vertex.
public virtual void SetBitsPerFlag(int bitsPerFlag)
Parameters
bitsPerFlag
intthe number of bits to be set. Shall be 2, 4 or 8.
Remarks
Sets the number of bits used to represent the edge flag for each vertex. But only the least significant 2 bits in each flag value shall be used. The valid flag values are 0, 1, 2 or 3.
SetDecode(float[])
Sets the
float[]
of numbers specifying how to map vertex coordinates and colour components
into the appropriate ranges of values.
public virtual void SetDecode(float[] decode)
Parameters
decode
float[]the
float[]
of Decode object to set.
Remarks
Sets the
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.
SetDecode(PdfArray)
Sets the PdfArray of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values.
public virtual void SetDecode(PdfArray decode)
Parameters
Remarks
Sets 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.