diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-02-13 17:28:31 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-02-13 17:34:04 +0100 |
commit | 34612c400d3b66daf265529d90a3dcd1a8afdbcb (patch) | |
tree | 8b288ef798eb31bac190500f40ef76375a9a6ea5 /test | |
parent | 7ad3aebbe612ef560d4a73f85db226c8e7caa4b2 (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')
-rw-r--r-- | test/clip-device-offset.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/clip-device-offset.c b/test/clip-device-offset.c index eb0e2495..f725b8e9 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; } |