mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
fix cairo_renderer usage in demo/viewer + revert aac69d0b34203f856070cfe5bf909fbf84853b7f
This commit is contained in:
parent
9a1639a1d6
commit
eabba25948
@ -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…
x
Reference in New Issue
Block a user