Skip to content

Support per-stop opacity on SVG gradient strokes #82

@rowland

Description

@rowland

Context

The recent SVG gradient work now renders varying stop opacity for gradient fills by building a grayscale soft mask. Gradient strokes still fall back to constant stroke opacity when stop alpha varies, so stroke:url(#...) plus stop-opacity is not yet faithful.

Current behavior

  • gradient fills: varying stop alpha supported
  • gradient strokes: varying stop alpha collapses to a single stroke alpha and logs a warning

Why this matters

This is now the most obvious remaining gap inside the gradient/opacity work itself. It is narrower than the old umbrella opacity issue and deserves its own follow-up.

Scope

  • Add a stroke-aware soft-mask path for SVG gradient strokes, or another vector-first equivalent
  • Preserve current stroke width, cap, join, dash, and transform behavior
  • Keep fallback behavior deterministic when a stroke case is still not representable

Acceptance

  • stroke:url(#g) with varying stop-opacity renders with visibly changing alpha along the stroked geometry
  • covered for common shape/path cases
  • add focused regression tests for stroke gradients with stop alpha

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