aboutsummaryrefslogtreecommitdiffstats
path: root/test/pugl_cairo_test.c
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 /test/pugl_cairo_test.c
parent2495d2deb77c8474d7bbe467a0d033909ee3263c (diff)
downloadpugl-c74ce3f88af02a140e16375b3b750e9a7d87a527.tar.gz
pugl-c74ce3f88af02a140e16375b3b750e9a7d87a527.tar.bz2
pugl-c74ce3f88af02a140e16375b3b750e9a7d87a527.zip
Cairo Test: Preserve clip rectangle for background fill
Diffstat (limited to 'test/pugl_cairo_test.c')
-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