GraphiteEditor / GraphiteEditor/Graphite

Freeform gradients

Offen
#2,303 0 Kommentare 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

Similar to #2302, we need to find a clever way to generate these within the SVG or SVG + CSS spec. Rasterization is probably the most likely approach here. But here are some ideas:

- Rasterization.
- A point cloud of circles with radial gradients interpolating over alpha, with optional transforms to essentially create 2D Gaussian splats.
- For use cases supporting CSS as part of SVG, we can render quads with linear gradients applied to each edge which generates a quad of a mesh, then the CSS perspective transform would skew the four corners to fit within the mesh adjacent to other quads doing the same thing to build a mesh representing the full freeform gradient.

There are two possible sources of color spread, which can be mixed:
- Point (with a color and radius)

![Image](https://github.com/user-attachments/assets/45268a9d-63ed-4902-8982-b0dccb30edbd)

- Path (with a color interpolated along the path, such as being set at each anchor)

![Image](https://github.com/user-attachments/assets/8f240d5b-7f7f-46ec-a4ab-f5bb52f554a8)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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