diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2023-05-21 22:57:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-21 22:57:02 +0200 |
| commit | c56800e40b93087240c9ffec458e48f0444648c1 (patch) | |
| tree | 32361f5cfd28c43f0dd502406281cf8484cf924a /lib/stitches/ripple_stitch.py | |
| parent | 11e225c919805a581a805adb9ec7254322ee96ba (diff) | |
| parent | cc7dfcf3e4fdfc8be5f7653fa5432f1ffa12f3c9 (diff) | |
Merge pull request #2297 from inkstitch/kaalleen/various-fixes
Diffstat (limited to 'lib/stitches/ripple_stitch.py')
| -rw-r--r-- | lib/stitches/ripple_stitch.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/stitches/ripple_stitch.py b/lib/stitches/ripple_stitch.py index 40a522eb..90dc7cbc 100644 --- a/lib/stitches/ripple_stitch.py +++ b/lib/stitches/ripple_stitch.py @@ -235,8 +235,8 @@ def _adjust_helper_lines_for_grid(stroke, helper_lines, skip_start, skip_end): if stroke.join_style == 0 and (stroke.reverse and count % 2 != 0): count += 1 - elif (stroke.join_style == 1 and ((stroke.reverse and skip_end % 2 != 0) or - (not stroke.reverse and skip_start % 2 != 0))): + elif (stroke.join_style == 1 and ((stroke.reverse and (count + skip_start) % 2 != 0) or + (not stroke.reverse and skip_start % 2 != 0))): count += 1 if count % 2 != 0: @@ -246,14 +246,15 @@ def _adjust_helper_lines_for_grid(stroke, helper_lines, skip_start, skip_end): def _do_grid(stroke, helper_lines, skip_start, skip_end): helper_lines = _adjust_helper_lines_for_grid(stroke, helper_lines, skip_start, skip_end) + grid = [] for i, helper in enumerate(helper_lines): end = len(helper) - skip_end points = helper[skip_start:end] - if i % 2 == 0: - points.reverse() if stroke.reverse: points.reverse() - yield from points + grid.append(points) + grid = _get_staggered_stitches(stroke, grid, 0) + return grid def _get_guided_helper_lines(stroke, outline, max_distance): |
