PdfMeshShading Class

Definition

A shading whose geometry is a mesh given as stream data (Types 4 to 7): triangles (PdfTriangleMeshShading) or patches (PdfPatchMeshShading) with colours at their vertices or corners.

public abstract class PdfMeshShading : PdfShading

Remarks

ISO 32000-2 §8.7.4.5.5 to §8.7.4.5.8, Tables 81 to 85, and §8.9.5.2 (the Decode formula). The data is decoded on first access to the geometry, once however many threads ask; coordinates are kept as doubles (24- and 32-bit coordinates exceed a float's precision). A colour is ColorStride floats: the parametric value t when the shading has a function (pass it to EvaluateFunction(ReadOnlySpan<Single>, Span<Single>) after interpolating), else the components in InterpolationColorSpace (indices of an Indexed space are converted to its base when decoded).

Repairs: field widths outside the sets the tables allow are read as given (1 to 32 bits) with a diagnostic; truncated data keeps the complete triangles or patches before the cut with one MeshDataTruncated diagnostic; see the subclasses for edge flags. Meshes larger than MaxMeshVertices are cut there with a MeshSizeExceeded diagnostic.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (5)