fix cairo_renderer usage in demo/viewer + revert aac69d0b34
This commit is contained in:
parent
9a1639a1d6
commit
eabba25948
2 changed files with 4 additions and 1 deletions
|
@ -533,9 +533,11 @@ void render_cairo(mapnik::Map const& map, double scaling_factor, QPixmap & pix)
|
|||
#ifdef HAVE_CAIRO
|
||||
mapnik::cairo_surface_ptr image_surface(cairo_image_surface_create(CAIRO_FORMAT_ARGB32,map.width(),map.height()),
|
||||
mapnik::cairo_surface_closer());
|
||||
mapnik::cairo_renderer<mapnik::cairo_surface_ptr> renderer(map, image_surface, scaling_factor);
|
||||
mapnik::cairo_ptr cairo = mapnik::create_context(image_surface);
|
||||
if (cairo)
|
||||
{
|
||||
mapnik::auto_cpu_timer t(std::clog, "rendering took: ");
|
||||
mapnik::cairo_renderer<mapnik::cairo_ptr> renderer(map, cairo, scaling_factor);
|
||||
renderer.apply();
|
||||
}
|
||||
image_32 buf(image_surface);
|
||||
|
|
|
@ -226,6 +226,7 @@ void cairo_renderer<T>::render_marker(pixel_position const& pos,
|
|||
}
|
||||
|
||||
template class cairo_renderer<cairo_ptr>;
|
||||
|
||||
}
|
||||
|
||||
#endif // HAVE_CAIRO
|
||||
|
|
Loading…
Reference in a new issue