Enable clipping for cairo 1.6.0 and later.
This commit is contained in:
parent
d4d4dab25b
commit
889f36b8df
1 changed files with 7 additions and 5 deletions
|
@ -482,11 +482,13 @@ namespace mapnik
|
||||||
std::clog << "start map processing bbox="
|
std::clog << "start map processing bbox="
|
||||||
<< map.getCurrentExtent() << "\n";
|
<< map.getCurrentExtent() << "\n";
|
||||||
#endif
|
#endif
|
||||||
#ifdef CAIRO_CLIP
|
|
||||||
Envelope<double> bounds = t_.forward(t_.extent());
|
if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 6, 0))
|
||||||
context_->rectangle(bounds.minx(), bounds.miny(), bounds.maxx(), bounds.maxy());
|
{
|
||||||
context_->clip();
|
Envelope<double> bounds = t_.forward(t_.extent());
|
||||||
#endif
|
context_->rectangle(bounds.minx(), bounds.miny(), bounds.maxx(), bounds.maxy());
|
||||||
|
context_->clip();
|
||||||
|
}
|
||||||
|
|
||||||
boost::optional<Color> bg = m_.background();
|
boost::optional<Color> bg = m_.background();
|
||||||
if (bg)
|
if (bg)
|
||||||
|
|
Loading…
Reference in a new issue