diff options
author | Manish Singh <yosh@gimp.org> | 2005-05-17 14:23:10 +0000 |
---|---|---|
committer | Manish Singh <yosh@src.gnome.org> | 2005-05-17 14:23:10 +0000 |
commit | ce168dd2b934b3375dbc0cef2e9fbe0ec3b37e8b (patch) | |
tree | ceee909dd6ea193483d7b06adc2dc6b3e70de367 /examples | |
parent | a1d091f8b9fa18792c6d989a5eb7c8bad1c87258 (diff) | |
download | pango-ce168dd2b934b3375dbc0cef2e9fbe0ec3b37e8b.tar.gz |
update for new cairo_xlib_surface API.
Tue May 17 07:21:53 2005 Manish Singh <yosh@gimp.org>
* examples/cairoview.c: update for new cairo_xlib_surface API.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cairoview.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/examples/cairoview.c b/examples/cairoview.c index c31c012f..7b4ad1d7 100644 --- a/examples/cairoview.c +++ b/examples/cairoview.c @@ -132,6 +132,7 @@ update () Pixmap pixmap; GC gc; pixman_box16_t *extents; + int width, height; int n_rects; pixman_box16_t *rects; XRectangle *xrects; @@ -140,13 +141,15 @@ update () /* Create a temporary pixmap and a Cairo context pointing to it */ extents = pixman_region_extents (update_region); - pixmap = XCreatePixmap (display, window, - extents->x2 - extents->x1, - extents->y2 - extents->y1, + width = extents->x2 - extents->x1; + height = extents->y2 - extents->y1; + + pixmap = XCreatePixmap (display, window, width, height, DefaultDepth (display, screen)); - surface = cairo_xlib_surface_create_with_visual (display, - pixmap, - DefaultVisual (display, screen)); + + surface = cairo_xlib_surface_create (display, pixmap, + DefaultVisual (display, screen), + width, height); cr = render_data.cr = cairo_create (surface); |