diff options
author | Robert O'Callahan <rocallahan@novell.com> | 2006-06-21 15:47:03 +1200 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2006-06-25 11:23:43 +0200 |
commit | ddead8e0612162e121868ba561498b8565112f8b (patch) | |
tree | b1b66367a5c9144f1a1dcfc2cb7ca50cc42c93c9 /test/xlib-surface.c | |
parent | 113bef399a2ca27f4c49a3d917ac1e6075449616 (diff) |
Surface size getters for xlib
When accessing the underlying drawable etc of an xlib surface, it is
also helpful to be able to get the width and height without a server
round trip. This patch provides those functions.
Diffstat (limited to 'test/xlib-surface.c')
-rw-r--r-- | test/xlib-surface.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/xlib-surface.c b/test/xlib-surface.c index 71797816..f12e4908 100644 --- a/test/xlib-surface.c +++ b/test/xlib-surface.c @@ -124,9 +124,14 @@ do_test (Display *dpy, DefaultVisual (dpy, screen), SIZE, SIZE); - if (set_size) + if (set_size) { cairo_xlib_surface_set_size (surface, SIZE, SIZE); + if (cairo_xlib_surface_get_width (surface) != SIZE || + cairo_xlib_surface_get_height (surface) != SIZE) + return 0; + } + draw_pattern (surface); test_surface = cairo_image_surface_create_for_data (test_data, |