Enable clipping for cairo 1.6.0 and later.

This commit is contained in:
Tom Hughes 2008-04-19 23:22:03 +00:00
parent d4d4dab25b
commit 889f36b8df

View file

@ -482,11 +482,13 @@ namespace mapnik
std::clog << "start map processing bbox="
<< map.getCurrentExtent() << "\n";
#endif
#ifdef CAIRO_CLIP
if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 6, 0))
{
Envelope<double> bounds = t_.forward(t_.extent());
context_->rectangle(bounds.minx(), bounds.miny(), bounds.maxx(), bounds.maxy());
context_->clip();
#endif
}
boost::optional<Color> bg = m_.background();
if (bg)