[mapserver-commits] r10725 - sandbox/mapserver6

svn at osgeo.org svn at osgeo.org
Sun Nov 14 12:24:10 EST 2010


Author: tamas
Date: 2010-11-14 09:24:10 -0800 (Sun, 14 Nov 2010)
New Revision: 10725

Modified:
   sandbox/mapserver6/mapcairo.c
   sandbox/mapserver6/mapoutput.c
Log:
Add GDI direct printing support (CAIRO/WINGDIPRINT)

Modified: sandbox/mapserver6/mapcairo.c
===================================================================
--- sandbox/mapserver6/mapcairo.c	2010-11-14 15:36:55 UTC (rev 10724)
+++ sandbox/mapserver6/mapcairo.c	2010-11-14 17:24:10 UTC (rev 10725)
@@ -554,6 +554,9 @@
         } else if(!strcasecmp(format->driver,"cairo/winGDI") && format->device) {
 			r->outputStream = NULL;
             r->surface = cairo_win32_surface_create(format->device);
+        } else if(!strcasecmp(format->driver,"cairo/winGDIPrint") && format->device) {
+			r->outputStream = NULL;
+            r->surface = cairo_win32_printing_surface_create(format->device);
         }
 		else {
             r->outputStream = NULL;

Modified: sandbox/mapserver6/mapoutput.c
===================================================================
--- sandbox/mapserver6/mapoutput.c	2010-11-14 15:36:55 UTC (rev 10724)
+++ sandbox/mapserver6/mapoutput.c	2010-11-14 17:24:10 UTC (rev 10725)
@@ -225,6 +225,14 @@
         format->extension = strdup("");
         format->renderer = MS_RENDER_WITH_CAIRO_RASTER;
     }
+    if( strcasecmp(driver,"CAIRO/WINGDIPRINT") == 0 )
+    {
+        format = msAllocOutputFormat( map, "cairowinGDIPrint", driver );
+        format->mimetype = strdup("");
+        format->imagemode = MS_IMAGEMODE_RGB;
+        format->extension = strdup("");
+        format->renderer = MS_RENDER_WITH_CAIRO_RASTER;
+    }
 #endif
 #endif
 



More information about the mapserver-commits mailing list