aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-02-18 23:27:24 +0100
committerDavid Robillard <d@drobilla.net>2020-02-18 23:27:24 +0100
commitc74ce3f88af02a140e16375b3b750e9a7d87a527 (patch)
treec34aa0d78c7d345a0525a8653e668f35d5ae7ae2
parent2495d2deb77c8474d7bbe467a0d033909ee3263c (diff)
Cairo Test: Preserve clip rectangle for background fill
-rw-r--r--test/pugl_cairo_test.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/pugl_cairo_test.c b/test/pugl_cairo_test.c
index 22f54a4..8e44bb2 100644
--- a/test/pugl_cairo_test.c
+++ b/test/pugl_cairo_test.c
@@ -134,7 +134,7 @@ onDisplay(PuglView* view, const PuglEventExpose* event)
cairo_t* cr = (cairo_t*)puglGetContext(view);
cairo_rectangle(cr, event->x, event->y, event->width, event->height);
- cairo_clip(cr);
+ cairo_clip_preserve(cr);
// Draw background
const PuglRect frame = puglGetFrame(view);
@@ -145,7 +145,6 @@ onDisplay(PuglView* view, const PuglEventExpose* event)
} else {
cairo_set_source_rgb(cr, 0, 0, 0);
}
- cairo_rectangle(cr, 0, 0, width, height);
cairo_fill(cr);
// Scale to view size