summaryrefslogtreecommitdiff
path: root/examples/cairosimple.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@src.gnome.org>2005-04-02 04:16:14 +0000
committerCarl Worth <cworth@src.gnome.org>2005-04-02 04:16:14 +0000
commite194e2dc04020e3a7c261956ccdb0f6d3af6668f (patch)
treeac74b5b4ea82e2bc00210ca5e773d6049a5fb3bd /examples/cairosimple.c
parent92ba7627b38754c33071f3ff94ce1851f0ef2813 (diff)
downloadpango-e194e2dc04020e3a7c261956ccdb0f6d3af6668f.tar.gz
Update to track removal of cairo_set_target_png from cairo.
* examples/cairosimple.c: (main): Update to track removal of cairo_set_target_png from cairo.
Diffstat (limited to 'examples/cairosimple.c')
-rw-r--r--examples/cairosimple.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/cairosimple.c b/examples/cairosimple.c
index 49528995..9de60a5c 100644
--- a/examples/cairosimple.c
+++ b/examples/cairosimple.c
@@ -73,15 +73,17 @@ int main (int argc, char **argv)
}
cr = cairo_create();
- cairo_set_target_png (cr, f,
- CAIRO_FORMAT_ARGB32,
- 2 * RADIUS, 2 * RADIUS);
+ cairo_set_target_image_no_data (cr,
+ CAIRO_FORMAT_ARGB32,
+ 2 * RADIUS, 2 * RADIUS);
cairo_set_rgb_color (cr, 1.0, 1.0, 1.0);
cairo_rectangle (cr, 0, 0, 2 * RADIUS, 2 * RADIUS);
cairo_fill (cr);
draw_text (cr);
+ cairo_surface_write_png (cairo_get_target_surface (cr), f);
+
cairo_destroy (cr);
fclose (f);