[cairo-commit] xsvg/src xsvg.c,1.30,1.31

Carl Worth commit at pdx.freedesktop.org
Wed Jun 1 13:47:49 PDT 2005


Committed by: cworth

Update of /cvs/cairo/xsvg/src
In directory gabe:/tmp/cvs-serv25439/src

Modified Files:
	xsvg.c 
Log Message:

        * src/xsvg.c: (win_full), (win_init), (win_grow_pixmap),
        (win_reconfigure_fit_mode), (toggle_fit_cb): Synch up with cairo
        0.5.0 API changes. Make gcc 4.0 happy with regard to signedness of
        pointer parameters.


Index: xsvg.c
===================================================================
RCS file: /cvs/cairo/xsvg/src/xsvg.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- xsvg.c	12 May 2005 18:35:55 -0000	1.30
+++ xsvg.c	1 Jun 2005 20:47:46 -0000	1.31
@@ -35,11 +35,13 @@
 
 #include <cairo.h>
 #include <cairo-xlib.h>
+#include <cairo-xlib-xrender.h>
 
 #include <svg-cairo.h>
 
 #include "args.h"
 #include <X11/Xatom.h>
+#include <X11/Xutil.h>
 
 /* XXX: The cursor code doesn't seem to be working, (and someone
  * couldn't get it to compile on Solaris), so I'm just disabling it
@@ -369,7 +371,7 @@
     XWindowChanges  changes;
     XSizeHints	    *hints = XAllocSizeHints();
     unsigned long   mask;
-    int		    width, height;
+    unsigned int    width, height;
     
     hints->flags = PSize | PWinGravity;
     mask = CWWidth | CWHeight;
@@ -561,9 +563,10 @@
 	}
     }
 
-    surface = cairo_xlib_surface_create_for_pixmap_with_visual (dpy,
-								win->pix,
-								win->visual);
+    surface = cairo_xlib_surface_create (dpy,
+					 win->pix,
+					 win->visual,
+					 win->width, win->height);
     win->cr = cairo_create (surface);
     cairo_surface_destroy (surface);
     /* XXX: This probably doesn't need to be here (eventually) */
@@ -638,9 +641,10 @@
     XFreePixmap(win->dpy, win->pix);
     win->pix = new;
     cairo_destroy (win->cr);
-    surface = cairo_xlib_surface_create_for_pixmap_with_visual (win->dpy,
-								win->pix,
-								win->visual);
+    surface = cairo_xlib_surface_create (win->dpy,
+					 win->pix,
+					 win->visual,
+					 win->width, win->height);
     win->cr = cairo_create (surface);
     cairo_surface_destroy (surface);
     win->needs_refresh = 1;
@@ -678,7 +682,7 @@
 static void
 win_reconfigure_fit_mode (win_t *win, unsigned int width, unsigned int height)
 {
-    int dflt_width, dflt_height;
+    unsigned int dflt_width, dflt_height;
     int has_grown = 0;
 
     if (width > win->width || height > win->height)
@@ -892,7 +896,7 @@
     win->fit_mode = !win->fit_mode;
 
     if (win->fit_mode) {
-        int dflt_width, dflt_height;
+        unsigned int dflt_width, dflt_height;
 
         svg_cairo_get_size (win->svgc, &dflt_width, &dflt_height);
         win->zoom = MIN ((double) win->width / (double) dflt_width, (double) win->height / (double) dflt_height);




More information about the cairo-commit mailing list