Shading Patterns and Gradients
Implement axial (linear) and radial gradient shadings (Type 2, Type 3).
Shading dictionary references a color space and defines a function mapping positions to colors.
Type 2 (axial): two endpoints + color function.
Type 3 (radial): two circles + color function.
ContentStreamBuilder: shade(Shading $shading) emitting sh operator.
PdfWriter: linearGradient() / radialGradient() convenience methods.
PdfSerializer emits /Shading dictionary in page resources or as pattern.
Tests: axial gradient between two colors, radial gradient, multi-stop gradients via stitching function.
Shading Patterns and Gradients
Implement axial (linear) and radial gradient shadings (Type 2, Type 3).
Shading dictionary references a color space and defines a function mapping positions to colors.
Type 2 (axial): two endpoints + color function.
Type 3 (radial): two circles + color function.
ContentStreamBuilder:
shade(Shading $shading)emittingshoperator.PdfWriter:
linearGradient()/radialGradient()convenience methods.PdfSerializer emits /Shading dictionary in page resources or as pattern.
Tests: axial gradient between two colors, radial gradient, multi-stop gradients via stitching function.