if stroke and fill color are identical, only draw buffered fill

This commit is contained in:
Laura Klünder 2017-11-07 00:26:59 +01:00
parent 1fd7c51c21
commit b5a83f08b9

View file

@ -73,6 +73,10 @@ class OpenGLEngine(RenderEngine):
def _add_geometry(self, geometry, fill=None, stroke=None, altitude=None, height=None, shape_cache_key=None):
if fill is not None:
if stroke is not None and fill.color == stroke.color:
geometry = geometry.buffer(max(stroke.width, (stroke.min_px or 0) / self.scale),
cap_style=CAP_STYLE.flat, join_style=JOIN_STYLE.mitre)
stroke = None
self.vertices.append(self._create_geometry(geometry, self.hex_to_rgb(fill.color)))
if stroke is not None and stroke.color.startswith('#'):