summaryrefslogtreecommitdiff
path: root/test/clip-device-offset.c
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-02-13 17:28:31 +0100
committerAndrea Canciani <ranma42@gmail.com>2011-02-13 17:34:04 +0100
commit34612c400d3b66daf265529d90a3dcd1a8afdbcb (patch)
tree8b288ef798eb31bac190500f40ef76375a9a6ea5 /test/clip-device-offset.c
parent7ad3aebbe612ef560d4a73f85db226c8e7caa4b2 (diff)
test: Fix clip-device-offset
The test was incorrectly translating the "target" of the context instead of the "group target" (i.e. the current destination). "cairo-test-suite -a" runs the tests on similar surfaces created using cairo_push_group (), thus without this change the device-offset did not affect the real destination surface. Fixes clip-device-offset.
Diffstat (limited to 'test/clip-device-offset.c')
-rw-r--r--test/clip-device-offset.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/clip-device-offset.c b/test/clip-device-offset.c
index eb0e24950..f725b8e93 100644
--- a/test/clip-device-offset.c
+++ b/test/clip-device-offset.c
@@ -54,8 +54,8 @@ draw (cairo_t *cr, int width, int height)
cairo_pattern_t *source;
double old_x, old_y;
- cairo_surface_get_device_offset (cairo_get_target (cr), &old_x, &old_y);
- cairo_surface_set_device_offset (cairo_get_target (cr), old_x+5, old_y+5);
+ cairo_surface_get_device_offset (cairo_get_group_target (cr), &old_x, &old_y);
+ cairo_surface_set_device_offset (cairo_get_group_target (cr), old_x+5, old_y+5);
source = create_green_source ();
cairo_set_source (cr, source);
@@ -66,7 +66,7 @@ draw (cairo_t *cr, int width, int height)
cairo_clip (cr);
cairo_paint (cr);
- cairo_surface_set_device_offset (cairo_get_target (cr), old_x, old_y);
+ cairo_surface_set_device_offset (cairo_get_group_target (cr), old_x, old_y);
return CAIRO_TEST_SUCCESS;
}