GraphiteEditor / GraphiteEditor/Graphite
Graphite reads clip_path but ignores usvg::Group::mask()
- Vorherrschende Sprache
- Rust
- Sterne
- 27.2k
- Forks
- 1.3k
- Ø Merge
- 20 Std. 5 Min.
- Gemergte PRs (30 T.)
- 57
Beschreibung
## Description
Graphite’s SVG importer reads resolved clip paths from `usvg::Group::clip_path()`, but
it never reads resolved masks from `usvg::Group::mask()`.
When `usvg` parses an element with `mask="url(#mask-id)"`, it places the resolved mask
on a generated `usvg::Group`. Graphite recursively imports that group’s visible
children while silently discarding its mask. Consequently, the unmasked source artwork
is imported.
## Reproduction
Import `HameronsDocs/usvg-group-mask-import-debug.svg`.
The fixture deliberately contains only:
- One solid blue rectangle.
- One circular SVG mask.
- `mask-type="alpha"` to exclude luminance-mask behavior from this issue.
- No gradients, transforms, strokes, clip paths, filters, or fill-rule dependencies.
```svg
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start by importing HameronsDocs/usvg-group-mask-import-debug.svg and trace the SVG importer’s handling of usvg::Group::clip_path() alongside usvg::Group::mask(). Done means the circular alpha mask is preserved so the blue rectangle is clipped to the circle rather than importing the unmasked artwork.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- computer-graphics
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 65/100