Merge pull request #113 from EmbroidePy/issue112

pec extra-write bug
pull/114/head 1.4.27
tatarize 2021-03-02 15:47:12 -08:00 zatwierdzone przez GitHub
commit 311a2045b0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 9 dodań i 3 usunięć

Wyświetl plik

@ -590,6 +590,11 @@ class EmbPattern:
Any prepended thread change command to the merging pattern is suppressed.
:param pattern: pattern to add to current pattern
:param dx: position change of the added pattern x
:param dy: position change of the added pattern y
:param sx: scale of the added pattern x
:param sy: scale of the added pattern y
:param rotate: rotation of the added pattern
:return:
"""
if isinstance(pattern, str):

Wyświetl plik

@ -133,8 +133,9 @@ def pec_encode(pattern, f):
xx += dx
yy += dy
if data == STITCH:
if jumping and dx != 0 and dy != 0:
f.write(b'\x00\x00')
if jumping:
if dx != 0 and dy != 0:
f.write(b'\x00\x00')
jumping = False
if -64 < dx < 63 and -64 < dy < 63:
f.write(bytes(bytearray([dx & MASK_07_BIT, dy & MASK_07_BIT])))

Wyświetl plik

@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="pyembroidery",
version="1.4.26",
version="1.4.27",
author="Tatarize",
author_email="tatarize@gmail.com",
description="Embroidery IO library",