Click or drag to resize

PdfiumFPDFShadingPattern_SetParams Method

Set parameters to the specified shading pattern of type 4-7.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntax
public static bool FPDFShadingPattern_SetParams(
	IntPtr hPattern,
	int? bitsPerCoordinate = null,
	int? bitsPerComponent = null,
	int? bitsPerVal = null,
	float[] decode = null,
	byte[] data = null
)

Parameters

hPattern  IntPtr
Handle to the pattern object.
bitsPerCoordinate  NullableInt32  (Optional)
The number of bits used to represent each vertex / geometric coordinate. Valid values are 1, 2, 4, 8, 12, 16, 24, and 32.
bitsPerComponent  NullableInt32  (Optional)
The number of bits used to represent each color component. Valid values are 1, 2, 4, 8, 12, and 16.
bitsPerVal  NullableInt32  (Optional)
Depends on shading type.
decode  Single  (Optional)
An array of numbers specifying how to map coordinates and color components into the appropriate ranges of values.
data  Byte  (Optional)
An array of bytes that contains a sequence of vertex coordinates and color data that defines the triangle mesh.

Return Value

Boolean
true on success; false otherwise.
Remarks

bitsPerVal depends on type of shading:

  • FreeFormGouraudTriangleMeshShading - the number of bits used to represent the edge flag for each vertex. Valid values are 2, 4, and 8, but only the least significant 2 bits in each flag value are used. Valid values for the edge flag are 0, 1, and 2.
  • LatticeFormGouraudTriangleMeshShading - the number of vertices in each row of the lattice; the value must be greater than or equal to 2. The number of rows need not be specified.
  • CoonsPatchMeshShading and TensorProductPatchMeshShading - the number of bits used to represent the edge flag for each patch. Valid values of BitsPerFlag are 2, 4, and 8, but only the least significant 2 bits in each flag value are used. Valid values for the edge flag are 0, 1, 2, and 3.
See Also