diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 6 | ||||
-rw-r--r-- | examples/cairoview.c | 15 |
3 files changed, 19 insertions, 8 deletions
@@ -1,3 +1,7 @@ +Tue May 17 07:21:53 2005 Manish Singh <yosh@gimp.org> + + * examples/cairoview.c: update for new cairo_xlib_surface API. + 2005-05-16 Owen Taylor <otaylor@redhat.com> * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_glyph_extents): @@ -13,7 +17,7 @@ include Xutil.h, since Xutil.h doesn't include Xlib.h on some platforms. (#304317, Damien Carbery) -Fri May 13 23:54:29 2005 <yosh@gimp.org> +Fri May 13 23:54:29 2005 Manish Singh <yosh@gimp.org> * examples/cairoview.c: #include Xutil.h explicitly, update for renamed cairo API. diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index e09e9586..00f5bb94 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,7 @@ +Tue May 17 07:21:53 2005 Manish Singh <yosh@gimp.org> + + * examples/cairoview.c: update for new cairo_xlib_surface API. + 2005-05-16 Owen Taylor <otaylor@redhat.com> * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_glyph_extents): @@ -13,7 +17,7 @@ include Xutil.h, since Xutil.h doesn't include Xlib.h on some platforms. (#304317, Damien Carbery) -Fri May 13 23:54:29 2005 <yosh@gimp.org> +Fri May 13 23:54:29 2005 Manish Singh <yosh@gimp.org> * examples/cairoview.c: #include Xutil.h explicitly, update for renamed cairo API. 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); |