[mapserver-commits] r10728 - sandbox/mapserver6

svn at osgeo.org svn at osgeo.org
Sun Nov 14 13:52:01 EST 2010


Author: tamas
Date: 2010-11-14 10:52:01 -0800 (Sun, 14 Nov 2010)
New Revision: 10728

Modified:
   sandbox/mapserver6/mapcairo.c
Log:
Make Win32 surface creation conditional to the CAIRO_HAS_WIN32_SURFACE setting.

Modified: sandbox/mapserver6/mapcairo.c
===================================================================
--- sandbox/mapserver6/mapcairo.c	2010-11-14 18:29:08 UTC (rev 10727)
+++ sandbox/mapserver6/mapcairo.c	2010-11-14 18:52:01 UTC (rev 10728)
@@ -552,13 +552,22 @@
                     r->outputStream,
                     width,height);
         } else if(!strcasecmp(format->driver,"cairo/winGDI") && format->device) {
+#if CAIRO_HAS_WIN32_SURFACE
 			r->outputStream = NULL;
             r->surface = cairo_win32_surface_create(format->device);
+#else
+            msSetError(MS_RENDERERERR, "Cannot create cairo image. Cairo was not compiled with support for the win32 backend.",
+	         "msImageCreateCairo()");
+#endif
         } else if(!strcasecmp(format->driver,"cairo/winGDIPrint") && format->device) {
+#if CAIRO_HAS_WIN32_SURFACE
 			r->outputStream = NULL;
             r->surface = cairo_win32_printing_surface_create(format->device);
-        }
-		else {
+#else
+            msSetError(MS_RENDERERERR, "Cannot create cairo image. Cairo was not compiled with support for the win32 backend.",
+	         "msImageCreateCairo()");
+#endif
+        } else {
             r->outputStream = NULL;
 			r->surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
 		}



More information about the mapserver-commits mailing list