cast elevation to float so we can multiply it with floats
This commit is contained in:
parent
75682dda97
commit
4216998ec6
1 changed files with 1 additions and 1 deletions
|
@ -193,7 +193,7 @@ class SVGImage:
|
||||||
|
|
||||||
def add_shadow(self, geometry, elevation, clip_path=None):
|
def add_shadow(self, geometry, elevation, clip_path=None):
|
||||||
# add a shadow for the given geometry with the given elevation and, optionally, a clip path
|
# add a shadow for the given geometry with the given elevation and, optionally, a clip path
|
||||||
elevation = min(elevation, 2)
|
elevation = float(min(elevation, 2))
|
||||||
blur_radius = elevation / 3 * 0.25
|
blur_radius = elevation / 3 * 0.25
|
||||||
|
|
||||||
shadow_geom = translate(geometry.buffer(blur_radius),
|
shadow_geom = translate(geometry.buffer(blur_radius),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue