Skip to content
Myr

render: clear the current cairo path before drawing the border

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This works around an issue where librsvg sometimes leaves an open cairo path when rendering SVG icons, resulting in a very weird looking border, and old buffer content not being erased. Closes #47

authored by Daniel Eklöf · committed by Daniel Eklöf · parent 74c24aa · Browse files · 2 files+6 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+6 added−0 removed

  • other:+6 added−0 removed

2 files+6 added−0 removed

modified:CHANGELOG.md+5 added
18 unmodified lines
19### Changed20### Deprecated21### Removed22### Fixed2324* Graphical corruption triggered by the “gerbview” SVG icon, from25 KiCAD (https://codeberg.org/dnkl/fuzzel/issues/47).262728### Security29### Contributors3031
180 unmodified lines
modified:render.c+1 added
99 unmodified lines
100 const double from_degree = M_PI / 180;101 const double radius = render->options.border_radius;102103 /* Path describing an arc:ed rectangle */104 cairo_new_path(buf->cairo);105 cairo_arc(buf->cairo, b + w - radius, b + h - radius, radius,106 0.0 * from_degree, 90.0 * from_degree);107 cairo_arc(buf->cairo, b + radius, b + h - radius, radius,108 90.0 * from_degree, 180.0 * from_degree);
501 unmodified lines