Code

check for cairo version
authortheadib <theadib@users.sourceforge.net>
Wed, 26 Dec 2007 22:02:12 +0000 (22:02 +0000)
committertheadib <theadib@users.sourceforge.net>
Wed, 26 Dec 2007 22:02:12 +0000 (22:02 +0000)
src/extension/internal/cairo-ps-out.cpp
src/extension/internal/cairo-render-context.cpp

index 5681fda5e8da23e56869b409a77d997ebdf4c057..475f4d973add8516a552fa3a23c7bc738ed11227 100644 (file)
@@ -164,7 +164,7 @@ CairoPsOutput::init (void)
                        "<id>org.inkscape.print.ps.cairo</id>\n"
                        "<param name=\"PSlevel\" gui-text=\"" N_("Restrict to PS level") "\" type=\"enum\" >\n"
                                "<item value='PS3'>" N_("PostScript 3") "</item>\n"
-#if (CAIRO_VERSION >= 010502)
+#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 5, 2)
                 "<item value='PS2'>" N_("PostScript level 2") "</item>\n"
 #endif
             "</param>\n"
index 228f596dd375ca89bad540c6396ef1f7f93e289d..9a2cab829c9884bcf7ca30a9fe0aeca6c30e7c60 100644 (file)
@@ -693,7 +693,7 @@ CairoRenderContext::setupSurface(double width, double height)
 #ifdef CAIRO_HAS_PS_SURFACE
         case CAIRO_SURFACE_TYPE_PS:
             surface = cairo_ps_surface_create_for_stream(Inkscape::Extension::Internal::_write_callback, _stream, width, height);
-#if (CAIRO_VERSION >= 010502)
+#if (CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 5, 2))
             cairo_ps_surface_restrict_to_level (surface, (cairo_ps_level_t)_ps_level);
 #endif
             break;