GraphiteEditor / GraphiteEditor/Graphite

Support for SVG filter effects

Offen
#4,308 0 Kommentare 1 Reaktion 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

SVG has support for many filter effects (elements prefixed with `fe`). Documentation is available on [MDN list of SVG elements](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feDropShadow). A filter can be made by composing one or more of these filter effects. For example a glow could be made by combining the [`feMorphology`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feMorphology) to make the element thicker and then the [`feGaussianBlur`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feGaussianBlur) to blur the result. This can allow for powerful graphic effects whilst remaining a vector (useful for exporting and performance). Examples from the Inkscape filter gallery:

Inkscape filter gallery featuring a grid of different filter effects such as oil painting

Filters can also be composed by hand using a filter editor view:

a filter editor, featuring a list of filter effects and the details for a selected effect

This style of approach lends itself well the the existing graphite node graph.

Currently there is implemented a raster based blur and the ability to change the blend mode (this is implemented with the blend mode not a filter effect). However this significantly limits the possibilities compared to Inkscape.

The filter effect must also be implemented in the vello rendering pipeline, attempting to match the SVG rendering in a browser. For efficient SVG output, it should be possible to combine filter effects applied to an element into a single filter that can be reused. However this is not a particular priority given the rest of the SVG output is horrible.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by studying the existing raster-based blur and blend-mode implementation, then trace how filter effects would pass through the Graphite node graph and the vello rendering pipeline. Use the linked MDN SVG element references to compare expected behavior with browser SVG rendering; done requires composed SVG filter effects, matching vello output, and reusable combined filters where practical.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
backend-api-design, computer-graphics
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
28/100

Neue Issues direkt in Ihr Postfach

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