remove filter and clip_path

This commit is contained in:
Laura Klünder 2017-11-05 13:30:45 +01:00
parent e0ae343503
commit 0f251af6a9
3 changed files with 6 additions and 11 deletions

View file

@ -48,7 +48,7 @@ class RenderEngine(ABC):
pass
def add_geometry(self, geometry, fill: Optional[FillAttribs] = None, stroke: Optional[StrokeAttribs] = None,
filter=None, clip_path=None, altitude=None, heigth=None, shape_cache_key=None):
altitude=None, height=None, shape_cache_key=None):
# draw a shapely geometry with a given style
# altitude is the absolute altitude of the upper bound of the element
# height is the height of the element
@ -66,10 +66,10 @@ class RenderEngine(ABC):
if geometry.is_empty:
return
self._add_geometry(geometry=geometry, fill=fill, stroke=stroke, filter=filter, clip_path=clip_path,
altitude=altitude, height=heigth, shape_cache_key=shape_cache_key)
self._add_geometry(geometry=geometry, fill=fill, stroke=stroke,
altitude=altitude, height=height, shape_cache_key=shape_cache_key)
@abstractmethod
def _add_geometry(self, geometry, fill: Optional[FillAttribs] = None, stroke: Optional[StrokeAttribs] = None,
filter=None, clip_path=None, altitude=None, height=None, shape_cache_key=None):
altitude=None, height=None, shape_cache_key=None):
pass

View file

@ -219,7 +219,7 @@ class SVGEngine(RenderEngine):
self.altitudes[new_altitude] = new_geometry
def _add_geometry(self, geometry, fill: Optional[FillAttribs] = None, stroke: Optional[StrokeAttribs] = None,
filter=None, clip_path=None, altitude=None, height=None, shape_cache_key=None):
altitude=None, height=None, shape_cache_key=None):
if fill:
attribs = ' fill="'+(fill.color)+'"'
@ -236,11 +236,6 @@ class SVGEngine(RenderEngine):
if stroke.opacity:
attribs += ' stroke-opacity="'+str(stroke.opacity)[:4]+'"'
if filter:
attribs += ' filter="url(#'+filter+')"'
if clip_path:
attribs += ' clip-path="url(#'+clip_path+')"'
if geometry is not None:
if False:

View file

@ -106,7 +106,7 @@ class ImageRenderer:
walls = bbox.intersection(geoms.walls.union(add_walls))
if walls is not None:
svg.add_geometry(walls, heigth=default_height, fill=FillAttribs('#aaaaaa'))
svg.add_geometry(walls, height=default_height, fill=FillAttribs('#aaaaaa'))
if not geoms.doors.is_empty:
svg.add_geometry(bbox.intersection(geoms.doors.difference(add_walls)), fill=FillAttribs('#ffffff'),