Skip to content

Along/across-stroke gradients #2305

Open

Description

@Keavon

There are two directions:

  • Along the stroke

    See this for info about how to approximate this. We can also just split up the stroke into a lot of pieces with solids colors, or with linear gradients aiming to go from the start to end, using greater subdivision where the start and end planes bend more quickly to aim for them to be close to parallel so the linear gradient works.

    Image

  • Across the stroke

    Repeat the stroke many times with increasing thickness. Use the technique described in Stroke alignment #2268 for not mirroring at the centerline.

    Image

Regardless of method or direction, masking is likely necessary to handle end caps properly.

Activity

  1. modified the milestone: Milestone 45 on Feb 18, 2025
  2. moved this from Short-Term to Medium-Term in Task Boardon Feb 18, 2025
  3. krVatsal commented on Apr 1, 2026

    @krVatsal
    Contributor

    Useful reference for mesh gradient rendering and the SVG spec: http://tavmjong.free.fr/SVG/MESH/Mesh.html

  4. changed the title [-]Gradients along strokes[/-] [+]Along-stroke/across-stroke gradients[/+] on Apr 3, 2026
  5. changed the title [-]Along-stroke/across-stroke gradients[/-] [+]Along/across-stroke gradients[/+] on Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GraphicsGPU and graphics programming related

    Projects

    • Status
      Medium-Term

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions