PdfShading
A PDF shading (ISO 32000-1 §8.7.4). Shadings define smooth color transitions used as fills via the sh content-stream operator or via a shading pattern referenced by SCN/scn.
KitePDF v0.0.x renders:
Type 2 axial — a linear gradient between two points
Type 3 radial — a radial gradient between two circles
Types 1 (function-based), 4 (free-form Gouraud), 5 (lattice-form Gouraud), 6 (Coons patch), and 7 (tensor-product patch) parse to Unsupported and render as the background color (or transparent if none); they're called out in the README as future work.
Inheritors
Types
Type 3 radial shading. Gradient between two circles: (x0, y0, r0) and (x1, y1, r1) with t running across domain.
Shading type we don't render; falls back to background (or transparent).
Properties
Optional /Background colour — used for regions outside the shading domain when Extend is false on the relevant side. Per spec the background is in colorSpace; we eager-convert to RGB.
The shading's colour space (DeviceGray / DeviceRGB / DeviceCMYK / Indexed).
Functions
Sample a PdfShading.Axial or PdfShading.Radial at evenly-spaced stops between domain[0] and domain[1]. Returns parallel t and RGB arrays the backend uses to build a gradient brush.