summaryrefslogtreecommitdiff
path: root/test/create-from-png.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-05-03 08:33:32 +0000
committerCarl Worth <cworth@cworth.org>2005-05-03 08:33:32 +0000
commit05ccd7685420be7c7213e68462e1fcc4c01bad3c (patch)
tree1a78808e9128fc08b6424c537899ba98e3048a3c /test/create-from-png.c
parent8283381f120c0d5a4d3d770a541a576974cfdf89 (diff)
downloadcairo-05ccd7685420be7c7213e68462e1fcc4c01bad3c.tar.gz
Originally 2005-04-20 Carl Worth <cworth@cworth.org>
Remove cairo_show_surface. Add new cairo_set_source_surface. Remove _cairo_gstate_show_surface. Replace calls to cairo_show_surface with cairo_set_source_surface; cairo_paint. Fix messages to prefer - over _. Fix documentation. Three new tests to exercise set_source_surface more completely, (two of these are expected failures dues to outstanding bugs).
Diffstat (limited to 'test/create-from-png.c')
-rw-r--r--test/create-from-png.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/create-from-png.c b/test/create-from-png.c
index 861801501..f77d906c8 100644
--- a/test/create-from-png.c
+++ b/test/create-from-png.c
@@ -42,7 +42,6 @@ draw (cairo_t *cr, int width, int height)
char *srcdir = getenv ("srcdir");
char *filename;
cairo_surface_t *surface;
- int png_width, png_height;
xasprintf (&filename, "%s/%s", srcdir ? srcdir : ".",
"create-for-png-ref.png");
@@ -55,9 +54,8 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_FAILURE;
}
- png_width = cairo_image_surface_get_width (surface);
- png_height = cairo_image_surface_get_height (surface);
- cairo_show_surface (cr, surface, png_width, png_height);
+ cairo_set_source_surface (cr, surface, 0, 0);
+ cairo_paint (cr);
cairo_surface_destroy (surface);