Skip to content

feat: Shading patterns and gradients (ISO 32000-2 §8.7.4) (Block F) #29

@ralflang

Description

@ralflang

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions