diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2023-05-08 17:21:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-08 17:21:51 +0200 |
| commit | b3141a24b68c452c6731c5b25e77ebeaf7d40e4d (patch) | |
| tree | 99f809690ef86d7ac021293c1e89408a1e20cd13 /lib/elements/gradient_fill.py | |
| parent | 59ac45d3212fdfa4615a671738cfa1d970e02782 (diff) | |
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
Diffstat (limited to 'lib/elements/gradient_fill.py')
| -rw-r--r-- | lib/elements/gradient_fill.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: |
