GraphiteEditor / GraphiteEditor/Graphite

Along/across-stroke gradients

Offen
#2,305 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Graphics
Vorherrschende Sprache
Rust
Sterne
27.2k
Forks
1.3k
Ø Merge
20 Std. 5 Min.
Gemergte PRs (30 T.)
57

Beschreibung

There are two directions:

- Along the stroke

[See this](https://dev.to/uuuuuulala/gradient-along-svg-path-with-gsap-kl4) 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](https://github.com/user-attachments/assets/70d8def3-b751-4bd2-84a7-e140471f66ab)

- Across the stroke

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

![Image](https://github.com/user-attachments/assets/e77de12c-42fa-41e2-b37c-0a6c2ac12991)

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by reviewing the two proposed approaches in this issue and the technique described in #2268. Decide how along-stroke and across-stroke gradients should be represented, including subdivision, repeated strokes, and masking for end caps. Done means both directions render correctly without centerline mirroring or end-cap artifacts.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
computer-graphics
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.