diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-08-21 20:32:50 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-08-21 20:32:50 -0400 |
| commit | 038875f876d79d0f1e971886fe42f5bee4f9f31e (patch) | |
| tree | 296c60d3b490f988802f9bec884eed32dcbf9c0c /lib/elements/stroke.py | |
| parent | f26042f477f1520443b1d9dad0bb88ef3ad7ca47 (diff) | |
autopep8
Diffstat (limited to 'lib/elements/stroke.py')
| -rw-r--r-- | lib/elements/stroke.py | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/lib/elements/stroke.py b/lib/elements/stroke.py index e84d5e79..183ef23b 100644 --- a/lib/elements/stroke.py +++ b/lib/elements/stroke.py @@ -28,44 +28,45 @@ class Stroke(EmbroideryElement): @property @param('running_stitch_length_mm', - _('Running stitch length'), - tooltip=_('Length of stitches in running stitch mode.'), - unit='mm', - type='float', - default=1.5, - sort_index=3) + _('Running stitch length'), + tooltip=_('Length of stitches in running stitch mode.'), + unit='mm', + type='float', + default=1.5, + sort_index=3) def running_stitch_length(self): return max(self.get_float_param("running_stitch_length_mm", 1.5), 0.01) @property - @param('bean_stitch_repeats', - _('Bean stitch number of repeats'), - tooltip=_('Backtrack each stitch this many times. A value of 1 would triple each stitch (forward, back, forward). A value of 2 would quintuple each stitch, etc. Only applies to running stitch.'), - type='int', - default=0, - sort_index=2) + @param( + 'bean_stitch_repeats', + _('Bean stitch number of repeats'), + tooltip=_('Backtrack each stitch this many times. A value of 1 would triple each stitch (forward, back, forward). A value of 2 would quintuple each stitch, etc. Only applies to running stitch.'), + type='int', + default=0, + sort_index=2) def bean_stitch_repeats(self): return self.get_int_param("bean_stitch_repeats", 0) @property @param('zigzag_spacing_mm', - _('Zig-zag spacing (peak-to-peak)'), - tooltip=_('Length of stitches in zig-zag mode.'), - unit='mm', - type='float', - default=0.4, - sort_index=3) + _('Zig-zag spacing (peak-to-peak)'), + tooltip=_('Length of stitches in zig-zag mode.'), + unit='mm', + type='float', + default=0.4, + sort_index=3) @cache def zigzag_spacing(self): return max(self.get_float_param("zigzag_spacing_mm", 0.4), 0.01) @property @param('repeats', - _('Repeats'), - tooltip=_('Defines how many times to run down and back along the path.'), - type='int', - default="1", - sort_index=1) + _('Repeats'), + tooltip=_('Defines how many times to run down and back along the path.'), + type='int', + default="1", + sort_index=1) def repeats(self): return self.get_int_param("repeats", 1) @@ -86,11 +87,11 @@ class Stroke(EmbroideryElement): @property @param('manual_stitch', - _('Manual stitch placement'), - tooltip=_("Stitch every node in the path. Stitch length and zig-zag spacing are ignored."), - type='boolean', - default=False, - sort_index=0) + _('Manual stitch placement'), + tooltip=_("Stitch every node in the path. Stitch length and zig-zag spacing are ignored."), + type='boolean', + default=False, + sort_index=0) def manual_stitch_mode(self): return self.get_boolean_param('manual_stitch') @@ -121,9 +122,9 @@ class Stroke(EmbroideryElement): global warned_about_legacy_running_stitch if not warned_about_legacy_running_stitch: warned_about_legacy_running_stitch = True - print >> sys.stderr, _("Legacy running stitch setting detected!\n\nIt looks like you're using a stroke " + \ - "smaller than 0.5 units to indicate a running stitch, which is deprecated. Instead, please set " + \ - "your stroke to be dashed to indicate running stitch. Any kind of dash will work.") + print >> sys.stderr, _("Legacy running stitch setting detected!\n\nIt looks like you're using a stroke " + + "smaller than 0.5 units to indicate a running stitch, which is deprecated. Instead, please set " + + "your stroke to be dashed to indicate running stitch. Any kind of dash will work.") # still allow the deprecated setting to work in order to support old files return True @@ -174,7 +175,6 @@ class Stroke(EmbroideryElement): return Patch(self.color, stitches) - def to_patches(self, last_patch): patches = [] |
