Skip to content

Support SVG radial gradients that become elliptical under transforms #81

@rowland

Description

@rowland

Context

The SVG parser now understands radialGradient, and the renderer can resolve radial gradients in the circle-preserving cases. It still rejects radial gradients that become elliptical after gradientTransform, object transforms, or similar non-uniform scaling, because the current PDF path does not yet have the right representation for those cases.

Current behavior

  • radial gradients parse and simple cases can resolve
  • non-uniformly transformed radial gradients warn/fall back instead of rendering as SVG expects

Why this matters

This is the main remaining writer-side gap for broad SVG gradient parity after the linear-gradient work landed.

Scope

  • Add the PDF-side representation needed for transformed radial shadings (likely shading/pattern matrix support or an equivalent approach)
  • Wire that through SVG radial gradient resolution
  • Cover gradientUnits and gradientTransform interactions in the common cases

Acceptance

  • SVG radialGradient renders correctly for non-uniform transform cases that produce elliptical output
  • common userSpaceOnUse and objectBoundingBox cases are covered
  • add renderer tests proving the transformed radial path instead of fallback behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions