diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index caa0da6a8..7fda28312 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -482,11 +482,13 @@ namespace mapnik std::clog << "start map processing bbox=" << map.getCurrentExtent() << "\n"; #endif -#ifdef CAIRO_CLIP - Envelope bounds = t_.forward(t_.extent()); - context_->rectangle(bounds.minx(), bounds.miny(), bounds.maxx(), bounds.maxy()); - context_->clip(); -#endif + + if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 6, 0)) + { + Envelope bounds = t_.forward(t_.extent()); + context_->rectangle(bounds.minx(), bounds.miny(), bounds.maxx(), bounds.maxy()); + context_->clip(); + } boost::optional bg = m_.background(); if (bg)