summaryrefslogtreecommitdiff
path: root/lib/elements/fill.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/elements/fill.py')
-rw-r--r--lib/elements/fill.py62
1 files changed, 32 insertions, 30 deletions
diff --git a/lib/elements/fill.py b/lib/elements/fill.py
index 394f523e..626573e6 100644
--- a/lib/elements/fill.py
+++ b/lib/elements/fill.py
@@ -5,7 +5,7 @@ from .element import param, EmbroideryElement, Patch
from ..i18n import _
from ..svg import PIXELS_PER_MM
from ..utils import cache
-from ..stitches import running_stitch, auto_fill, legacy_fill
+from ..stitches import legacy_fill
class Fill(EmbroideryElement):
@@ -16,21 +16,21 @@ class Fill(EmbroideryElement):
@property
@param('auto_fill',
- _('Manually routed fill stitching'),
- tooltip=_('AutoFill is the default method for generating fill stitching.'),
- type='toggle',
- inverse=True,
- default=True)
+ _('Manually routed fill stitching'),
+ tooltip=_('AutoFill is the default method for generating fill stitching.'),
+ type='toggle',
+ inverse=True,
+ default=True)
def auto_fill(self):
return self.get_boolean_param('auto_fill', True)
@property
@param('angle',
- _('Angle of lines of stitches'),
- tooltip=_('The angle increases in a counter-clockwise direction. 0 is horizontal. Negative angles are allowed.'),
- unit='deg',
- type='float',
- default=0)
+ _('Angle of lines of stitches'),
+ tooltip=_('The angle increases in a counter-clockwise direction. 0 is horizontal. Negative angles are allowed.'),
+ unit='deg',
+ type='float',
+ default=0)
@cache
def angle(self):
return math.radians(self.get_float_param('angle', 0))
@@ -41,21 +41,23 @@ class Fill(EmbroideryElement):
return self.get_style("fill", "#000000")
@property
- @param('flip',
- _('Flip fill (start right-to-left)'),
- tooltip=_('The flip option can help you with routing your stitch path. When you enable flip, stitching goes from right-to-left instead of left-to-right.'),
- type='boolean',
- default=False)
+ @param(
+ 'flip',
+ _('Flip fill (start right-to-left)'),
+ tooltip=_('The flip option can help you with routing your stitch path. '
+ 'When you enable flip, stitching goes from right-to-left instead of left-to-right.'),
+ type='boolean',
+ default=False)
def flip(self):
return self.get_boolean_param("flip", False)
@property
@param('row_spacing_mm',
- _('Spacing between rows'),
- tooltip=_('Distance between rows of stitches.'),
- unit='mm',
- type='float',
- default=0.25)
+ _('Spacing between rows'),
+ tooltip=_('Distance between rows of stitches.'),
+ unit='mm',
+ type='float',
+ default=0.25)
def row_spacing(self):
return max(self.get_float_param("row_spacing_mm", 0.25), 0.1 * PIXELS_PER_MM)
@@ -65,20 +67,20 @@ class Fill(EmbroideryElement):
@property
@param('max_stitch_length_mm',
- _('Maximum fill stitch length'),
- tooltip=_('The length of each stitch in a row. Shorter stitch may be used at the start or end of a row.'),
- unit='mm',
- type='float',
- default=3.0)
+ _('Maximum fill stitch length'),
+ tooltip=_('The length of each stitch in a row. Shorter stitch may be used at the start or end of a row.'),
+ unit='mm',
+ type='float',
+ default=3.0)
def max_stitch_length(self):
return max(self.get_float_param("max_stitch_length_mm", 3.0), 0.1 * PIXELS_PER_MM)
@property
@param('staggers',
- _('Stagger rows this many times before repeating'),
- tooltip=_('Setting this dictates how many rows apart the stitches will be before they fall in the same column position.'),
- type='int',
- default=4)
+ _('Stagger rows this many times before repeating'),
+ tooltip=_('Setting this dictates how many rows apart the stitches will be before they fall in the same column position.'),
+ type='int',
+ default=4)
def staggers(self):
return self.get_int_param("staggers", 4)