[poppler] poppler/test: gtk-cairo-test.cc,1.2,1.3

Kristian Hogsberg krh at freedesktop.org
Thu May 12 14:26:27 PDT 2005


Update of /cvs/poppler/poppler/test
In directory gabe:/tmp/cvs-serv6598/test

Modified Files:
	gtk-cairo-test.cc 
Log Message:
2005-05-12  Kristian Høgsberg  <krh at redhat.com>

        * poppler/CairoOutputDev.cc:
        * poppler/CairoOutputDevX.cc:
        * poppler/CairoOutputDevImage.cc:
        * test/gtk-cairo-test.cc: Update to latest cairo changes, patch
        from Jens Taprogge (#3281)



Index: gtk-cairo-test.cc
===================================================================
RCS file: /cvs/poppler/poppler/test/gtk-cairo-test.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gtk-cairo-test.cc	5 Mar 2005 04:37:14 -0000	1.2
+++ gtk-cairo-test.cc	12 May 2005 21:26:25 -0000	1.3
@@ -85,10 +85,9 @@
   Drawable xid;
   GdkGC *gc;
   GdkColor white;
+  cairo_surface_t *surface;
   int w, h;
 
-  cairo = cairo_create ();
-
   w = state ? (int)(state->getPageWidth() + 0.5) : 1;
   h = state ? (int)(state->getPageHeight() + 0.5) : 1;
 
@@ -113,7 +112,10 @@
     display = gdk_x11_drawable_get_xdisplay (pixmap);
     xid = gdk_x11_drawable_get_xid (pixmap);
 
-    cairo_set_target_drawable (cairo, display, xid);
+    surface = cairo_xlib_surface_create_for_pixmap_with_visual(display, xid,
+							       DefaultVisual(display, DefaultScreen(display)));
+    cairo = cairo_create (surface);
+    cairo_surface_destroy (surface);
   }
 }
 



More information about the poppler mailing list