From b3141a24b68c452c6731c5b25e77ebeaf7d40e4d Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Mon, 8 May 2023 17:21:51 +0200 Subject: Gradient blocks (#2275) * remove underlay * set start and end commands for consecutive blocks with the same color * keep previous params * add option for manual input of end_row_spacing --- lib/elements/gradient_fill.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/elements/gradient_fill.py') diff --git a/lib/elements/gradient_fill.py b/lib/elements/gradient_fill.py index 5ac49c4e..18443368 100644 --- a/lib/elements/gradient_fill.py +++ b/lib/elements/gradient_fill.py @@ -5,7 +5,7 @@ from shapely import geometry as shgeo from shapely.affinity import affine_transform, rotate from shapely.ops import split -from ..svg import get_correction_transform +from ..svg import PIXELS_PER_MM, get_correction_transform def gradient_shapes_and_attributes(element, shape): @@ -63,7 +63,7 @@ def gradient_shapes_and_attributes(element, shape): shape_rest.append(poly) shape = shgeo.MultiPolygon(shape_rest) previous_color = color - end_row_spacing = element.row_spacing * 2 + end_row_spacing = element.row_spacing / PIXELS_PER_MM * 2 # add left over shape(s) if shape: if offset_outside_shape: -- cgit v1.2.3