diff --git a/include/mapnik/renderer_common/process_building_symbolizer.hpp b/include/mapnik/renderer_common/process_building_symbolizer.hpp index c324a0e8b..2e888a20a 100644 --- a/include/mapnik/renderer_common/process_building_symbolizer.hpp +++ b/include/mapnik/renderer_common/process_building_symbolizer.hpp @@ -171,6 +171,17 @@ private: return orientation > 0 || (orientation < 0 && render_back_side_); } + template + void cache_outline(VertexSource & vs) + { + double x, y; + vs.rewind(0); + while (unsigned cmd = vs.vertex(&x, &y)) + { + roof_vertices_.push_vertex(x, y, static_cast(cmd)); + } + } + template void render_ground(geometry::polygon const& poly, proj_transform const& prj_trans, @@ -181,8 +192,16 @@ private: vertex_adapter_type va(poly); transform_path_type transformed(rencom_.t_, va, prj_trans); - painter.set_color(base_stroke_color); - paint_outline(transformed, painter); + + if (height_ <= 0) + { + cache_outline(transformed); + } + else + { + painter.set_color(base_stroke_color); + paint_outline(transformed, painter); + } } template @@ -198,6 +217,9 @@ private: template void render_walls(Context & painter) { + if (height_ <= 0) + return; + size_t const size = roof_vertices_.size(); size_t strip_begin = size; size_t wrap_begin = size;