remove filter and clip_path
This commit is contained in:
parent
e0ae343503
commit
0f251af6a9
3 changed files with 6 additions and 11 deletions
|
@ -48,7 +48,7 @@ class RenderEngine(ABC):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def add_geometry(self, geometry, fill: Optional[FillAttribs] = None, stroke: Optional[StrokeAttribs] = None,
|
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
|
# draw a shapely geometry with a given style
|
||||||
# altitude is the absolute altitude of the upper bound of the element
|
# altitude is the absolute altitude of the upper bound of the element
|
||||||
# height is the height of the element
|
# height is the height of the element
|
||||||
|
@ -66,10 +66,10 @@ class RenderEngine(ABC):
|
||||||
if geometry.is_empty:
|
if geometry.is_empty:
|
||||||
return
|
return
|
||||||
|
|
||||||
self._add_geometry(geometry=geometry, fill=fill, stroke=stroke, filter=filter, clip_path=clip_path,
|
self._add_geometry(geometry=geometry, fill=fill, stroke=stroke,
|
||||||
altitude=altitude, height=heigth, shape_cache_key=shape_cache_key)
|
altitude=altitude, height=height, shape_cache_key=shape_cache_key)
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def _add_geometry(self, geometry, fill: Optional[FillAttribs] = None, stroke: Optional[StrokeAttribs] = None,
|
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
|
pass
|
||||||
|
|
|
@ -219,7 +219,7 @@ class SVGEngine(RenderEngine):
|
||||||
self.altitudes[new_altitude] = new_geometry
|
self.altitudes[new_altitude] = new_geometry
|
||||||
|
|
||||||
def _add_geometry(self, geometry, fill: Optional[FillAttribs] = None, stroke: Optional[StrokeAttribs] = None,
|
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:
|
if fill:
|
||||||
attribs = ' fill="'+(fill.color)+'"'
|
attribs = ' fill="'+(fill.color)+'"'
|
||||||
|
@ -236,11 +236,6 @@ class SVGEngine(RenderEngine):
|
||||||
if stroke.opacity:
|
if stroke.opacity:
|
||||||
attribs += ' stroke-opacity="'+str(stroke.opacity)[:4]+'"'
|
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 geometry is not None:
|
||||||
|
|
||||||
if False:
|
if False:
|
||||||
|
|
|
@ -106,7 +106,7 @@ class ImageRenderer:
|
||||||
walls = bbox.intersection(geoms.walls.union(add_walls))
|
walls = bbox.intersection(geoms.walls.union(add_walls))
|
||||||
|
|
||||||
if walls is not None:
|
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:
|
if not geoms.doors.is_empty:
|
||||||
svg.add_geometry(bbox.intersection(geoms.doors.difference(add_walls)), fill=FillAttribs('#ffffff'),
|
svg.add_geometry(bbox.intersection(geoms.doors.difference(add_walls)), fill=FillAttribs('#ffffff'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue