GraphiteEditor / GraphiteEditor/Graphite
Support for SVG filter effects
- Lingua principale
- Rust
- Stelle
- 27.2k
- Fork
- 1.3k
- Merge medio
- 20h 5m
- PR unite (30g)
- 57
Descrizione
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:
Filters can also be composed by hand using a filter editor view:
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- backend-api-design, computer-graphics
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 28/100