[cairo-commit] test/clip-group-shapes.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Mar 2 00:41:33 PST 2010
test/clip-group-shapes.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit d91bab565c54205f8dd7aa8a9de819dc4bc3551c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Mar 2 08:12:52 2010 +0000
test: Remove the double-clip from clip-group-shapes
A push/pop is an implicit save/restore, so a clip applied inside the
group is temporary, whereas a clip applied outside affects both the
geometry inside *and* the application of the group when painted. So
reset the clip afterwards to get the desired behaviour.
diff --git a/test/clip-group-shapes.c b/test/clip-group-shapes.c
index 72eff9f..aefaa55 100644
--- a/test/clip-group-shapes.c
+++ b/test/clip-group-shapes.c
@@ -60,8 +60,7 @@ clip_and_paint (cairo_t *cr,
if (GENERATE_REF) {
do_clip (cr, w, h);
cairo_paint (cr);
- }
- else {
+ } else {
if (clip_where == CLIP_OUTSIDE_GROUP)
do_clip (cr, w, h);
cairo_push_group (cr); {
@@ -70,6 +69,8 @@ clip_and_paint (cairo_t *cr,
cairo_paint (cr);
}
cairo_pop_group_to_source (cr);
+ if (clip_where == CLIP_OUTSIDE_GROUP)
+ cairo_reset_clip (cr);
cairo_paint (cr);
}
}
More information about the cairo-commit
mailing list