This commit is contained in:
Laura Klünder 2017-10-20 12:12:45 +02:00
parent 05982b2364
commit 34fffafa3f

View file

@ -138,7 +138,7 @@ class SVGImage:
return re.sub(r'L (-?([0-9]+)(.[0-9]+)?,(-?[0-9]+)(.[0-9]+)?) L', r'L \1 ', data) return re.sub(r'L (-?([0-9]+)(.[0-9]+)?,(-?[0-9]+)(.[0-9]+)?) L', r'L \1 ', data)
def _geometry_to_svg(self, geom): def _geometry_to_svg(self, geom):
# scale and move geometry geometry and create svg code for it # scale and move geometry and create svg code for it
if isinstance(geom, Polygon): if isinstance(geom, Polygon):
return ('<path d="' + return ('<path d="' +
' '.join((('M %.1f %.1f L'+(' %.1f %.1f'*(len(ring.coords)-1))+' z') % ' '.join((('M %.1f %.1f L'+(' %.1f %.1f'*(len(ring.coords)-1))+' z') %