summaryrefslogtreecommitdiff
path: root/test/mask.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-05-06 13:23:41 +0000
committerCarl Worth <cworth@cworth.org>2005-05-06 13:23:41 +0000
commitd6fc5ee5e97f60972ec80fcfc52f0cf8b780d2a9 (patch)
tree9adec3ec1e637a1cca92ba8e36f3aac661217d74 /test/mask.c
parentcea1de7579fad18ca6c9ec9bb29660970ec283b3 (diff)
Remove cairo_set_target_surface and all other backend-specific cairo_set_target functions. Require a cairo_surface_t* to call cairo_create.
Port to use new cairo_create interface. Rewrite all tests that were using cairo_set_target_surface to instead create a temporary cairo_t, (eventually to be replaced with cairo_begin_group).
Diffstat (limited to 'test/mask.c')
-rw-r--r--test/mask.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/mask.c b/test/mask.c
index 45765a67..d306c26e 100644
--- a/test/mask.c
+++ b/test/mask.c
@@ -73,11 +73,10 @@ mask_polygon (cairo_t *cr, int x, int y)
cairo_surface_t *mask_surface;
cairo_t *cr2;
- mask_surface = cairo_surface_create_similar (cairo_get_target_surface (cr),
+ mask_surface = cairo_surface_create_similar (cairo_get_target (cr),
CAIRO_FORMAT_A8,
WIDTH, HEIGHT);
- cr2 = cairo_create ();
- cairo_set_target_surface (cr2, mask_surface);
+ cr2 = cairo_create (mask_surface);
cairo_save (cr2);
cairo_set_source_rgba (cr2, 0, 0, 0, 0); /* transparent */
@@ -196,11 +195,10 @@ draw (cairo_t *cr, int width, int height)
/* Some of our drawing is unbounded, so we draw each test to
* a temporary surface and copy over.
*/
- tmp_surface = cairo_surface_create_similar (cairo_get_target_surface (cr),
+ tmp_surface = cairo_surface_create_similar (cairo_get_target (cr),
CAIRO_FORMAT_ARGB32,
IMAGE_WIDTH, IMAGE_HEIGHT);
- cr2 = cairo_create ();
- cairo_set_target_surface (cr2, tmp_surface);
+ cr2 = cairo_create (tmp_surface);
tmp_pattern = cairo_pattern_create_for_surface (tmp_surface);
cairo_set_source (cr, tmp_pattern);