Skip to content

Commit 311a204

Browse files
authored
Merge pull request #113 from EmbroidePy/issue112
pec extra-write bug
2 parents d52b213 + 8e8f0e2 commit 311a204

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

pyembroidery/EmbPattern.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,11 @@ def add_pattern(self, pattern, dx=None, dy=None, sx=None, sy=None, rotate=None):
590590
Any prepended thread change command to the merging pattern is suppressed.
591591
592592
:param pattern: pattern to add to current pattern
593+
:param dx: position change of the added pattern x
594+
:param dy: position change of the added pattern y
595+
:param sx: scale of the added pattern x
596+
:param sy: scale of the added pattern y
597+
:param rotate: rotation of the added pattern
593598
:return:
594599
"""
595600
if isinstance(pattern, str):

pyembroidery/PecWriter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ def pec_encode(pattern, f):
133133
xx += dx
134134
yy += dy
135135
if data == STITCH:
136-
if jumping and dx != 0 and dy != 0:
137-
f.write(b'\x00\x00')
136+
if jumping:
137+
if dx != 0 and dy != 0:
138+
f.write(b'\x00\x00')
138139
jumping = False
139140
if -64 < dx < 63 and -64 < dy < 63:
140141
f.write(bytes(bytearray([dx & MASK_07_BIT, dy & MASK_07_BIT])))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="pyembroidery",
8-
version="1.4.26",
8+
version="1.4.27",
99
author="Tatarize",
1010
author_email="[email protected]",
1111
description="Embroidery IO library",

0 commit comments

Comments
 (0)