Canvas: remove dangling cairo path in Arc or ConstraintPacker if fill was requested but not outline

This commit is contained in:
Paul Davis 2020-07-11 23:57:31 -06:00
parent 1d96bad59f
commit f118b3ab53
2 changed files with 10 additions and 2 deletions

View file

@ -80,7 +80,11 @@ Arc::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) const
if (fill()) { if (fill()) {
setup_fill_context (context); setup_fill_context (context);
context->fill_preserve (); if (outline()) {
context->fill_preserve ();
} else {
context->fill ();
}
} }
if (outline()) { if (outline()) {

View file

@ -756,7 +756,11 @@ ConstraintPacker::render (Rect const & area, Cairo::RefPtr<Cairo::Context> conte
setup_fill_context (context); setup_fill_context (context);
context->rectangle (draw.x0, draw.y0, draw.width(), draw.height()); context->rectangle (draw.x0, draw.y0, draw.width(), draw.height());
context->fill_preserve (); if (outline()) {
context->fill_preserve ();
} else {
context->fill ();
}
} }
if (outline()) { if (outline()) {