fix code formatting

pull/1897/head
George Steel 2022-11-11 00:20:59 -05:00
rodzic e1d9677ea0
commit 9237d19f0c
1 zmienionych plików z 27 dodań i 15 usunięć

Wyświetl plik

@ -143,6 +143,7 @@ class SatinColumn(EmbroideryElement):
def pull_compensation_percent(self): def pull_compensation_percent(self):
# pull compensation as a percentage of the width # pull compensation as a percentage of the width
return self.get_float_param("pull_compensation_percent", 0) return self.get_float_param("pull_compensation_percent", 0)
@property @property
@param( @param(
'pull_compensation_mm', 'pull_compensation_mm',
@ -195,14 +196,15 @@ class SatinColumn(EmbroideryElement):
@property @property
@param('contour_underlay_inset_percent', @param('contour_underlay_inset_percent',
_('Inset distance (proportional)'), _('Inset distance (proportional)'),
tooltip=_('Shrink the outline by a proportion of the column width, to prevent the underlay from showing around the outside of the satin column.'), tooltip=_('Shrink the outline by a proportion of the column width, '
'to prevent the underlay from showing around the outside of the satin column.'),
group=_('Contour Underlay'), group=_('Contour Underlay'),
unit='%', type='float', default=0, unit='%', type='float', default=0,
sort_index=3) sort_index=3)
def contour_underlay_inset_percent(self): def contour_underlay_inset_percent(self):
# how far inside the edge of the column to stitch the underlay # how far inside the edge of the column to stitch the underlay
return min(100, max(0, self.get_float_param("contour_underlay_inset_percent", 0))) return min(100, max(0, self.get_float_param("contour_underlay_inset_percent", 0)))
@property @property
@param('contour_underlay_inset_balance', @param('contour_underlay_inset_balance',
_('Inset balance'), _('Inset balance'),
@ -228,21 +230,22 @@ class SatinColumn(EmbroideryElement):
@property @property
@param('center_walk_underlay_repeats', @param('center_walk_underlay_repeats',
_('Repeats'), _('Repeats'),
tooltip=_('For an odd number of repeats, this will reverse the direction the satin column is stitched, causing stitching to both begin and end at the start point.'), tooltip=_('For an odd number of repeats, this will reverse the direction the satin column is stitched, '
group=_('Center-Walk Underlay'), 'causing stitching to both begin and end at the start point.'),
type='int', default=2, group=_('Center-Walk Underlay'),
sort_index=2) type='int', default=2,
sort_index=2)
def center_walk_underlay_repeats(self): def center_walk_underlay_repeats(self):
return max(self.get_int_param("center_walk_underlay_repeats", 2), 1) return max(self.get_int_param("center_walk_underlay_repeats", 2), 1)
@property @property
@param('center_walk_underlay_balance', @param('center_walk_underlay_balance',
_('Balance'), _('Balance'),
tooltip=_('Position of underlay from between the rails (50% is centered), consistent with the Balance parameter for contour underlay.'), tooltip=_('Position of underlay from between the rails (50% is centered), consistent with the Balance parameter for contour underlay.'),
group=_('Center-Walk Underlay'), group=_('Center-Walk Underlay'),
type='float', unit='%', default=50, type='float', unit='%', default=50,
sort_index=3) sort_index=3)
def center_walk_underlay_balance(self): def center_walk_underlay_balance(self):
return min(100, max(0, self.get_float_param("center_walk_underlay_balance", 50))) return min(100, max(0, self.get_float_param("center_walk_underlay_balance", 50)))
@ -909,8 +912,12 @@ class SatinColumn(EmbroideryElement):
patch = StitchGroup(color=self.color) patch = StitchGroup(color=self.color)
# pull compensation is automatically converted from mm to pixels by get_float_param # pull compensation is automatically converted from mm to pixels by get_float_param
sides = self.plot_points_on_rails(self.zigzag_spacing, self.pull_compensation, self.pull_compensation_percent/100, sides = self.plot_points_on_rails(
self.pull_compensation_balance/100) self.zigzag_spacing,
self.pull_compensation,
self.pull_compensation_percent/100,
self.pull_compensation_balance/100
)
if self.max_stitch_length: if self.max_stitch_length:
return self.do_split_stitch(patch, sides) return self.do_split_stitch(patch, sides)
@ -940,7 +947,12 @@ class SatinColumn(EmbroideryElement):
patch = StitchGroup(color=self.color) patch = StitchGroup(color=self.color)
sides = self.plot_points_on_rails(self.zigzag_spacing, self.pull_compensation, self.pull_compensation_percent/100, self.pull_compensation_balance/100) sides = self.plot_points_on_rails(
self.zigzag_spacing,
self.pull_compensation,
self.pull_compensation_percent/100,
self.pull_compensation_balance/100
)
# "left" and "right" here are kind of arbitrary designations meaning # "left" and "right" here are kind of arbitrary designations meaning
# a point from the first and second rail respectively # a point from the first and second rail respectively