From c74ce3f88af02a140e16375b3b750e9a7d87a527 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 18 Feb 2020 23:27:24 +0100 Subject: Cairo Test: Preserve clip rectangle for background fill --- test/pugl_cairo_test.c | 3 +-- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.1