Expand description
Function-based shading pattern.
A PDF Type 1 shading applies an arbitrary function f(x, y) → colour.
The function is supplied as a trait object from pdf_bridge; this module
wraps it in the Pattern interface.
The function receives pixel centres in device space and returns an RGB triple already in device colour space. Any colour-space conversion is the caller’s responsibility — this type only forwards the closure’s output.
§Panics
The closure itself must not panic. Panics inside the closure propagate
through fill_span to the rasterizer caller.
Structs§
- Function
Pattern - A shading pattern driven by an arbitrary
f(x, y) → [R, G, B]closure.