Skip to content

Gradient spread methods #27

Description

@Herschel

It would be useful if CanvasGradient allowed specifying a spread method, which determines how the gradient is rendered outside the [0.0, 1.0] stop range:

  • Pad (current default, gradient stop is clamped to [0.0, 1.0])
  • Repeat (gradient repeats in the same order past the edges, i.e. colors at [1.0, 2.0] would be the same as [0.0, 1.0]
  • Reflect (gradient colors repeat in reverse past the edges, i.e. colors at [1.0, 2.0] would be the reverse of [0.0, 1.0]

This would give canvas parity with spreadMethod in SVG and SpreadMethod going back to Flash.

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