summaryrefslogtreecommitdiff
path: root/lib/elements/element.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2021-08-07 10:57:53 -0400
committerLex Neva <github.com@lexneva.name>2021-08-07 10:57:53 -0400
commitc1e6558f7852def419adfbeb087b2194e6030a2c (patch)
tree31d25ceb4aa01a6909859c5a769517bd73d47543 /lib/elements/element.py
parenta5d7ffaffd0b73b5848b7d55ea1f571ea94fd5a7 (diff)
rename Patch to StitchGroup
Diffstat (limited to 'lib/elements/element.py')
-rw-r--r--lib/elements/element.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py
index dc466fbf..bcb59bf4 100644
--- a/lib/elements/element.py
+++ b/lib/elements/element.py
@@ -20,7 +20,7 @@ from ..svg.tags import (EMBROIDERABLE_TAGS, INKSCAPE_LABEL, INKSTITCH_ATTRIBS,
from ..utils import Point, cache
-class Patch:
+class StitchGroup:
"""A raw collection of stitches with attached instructions."""
def __init__(self, color=None, stitches=None, trim_after=False, stop_after=False, tie_modus=0, stitch_as_is=False):
@@ -32,10 +32,10 @@ class Patch:
self.stitch_as_is = stitch_as_is
def __add__(self, other):
- if isinstance(other, Patch):
- return Patch(self.color, self.stitches + other.stitches)
+ if isinstance(other, StitchGroup):
+ return StitchGroup(self.color, self.stitches + other.stitches)
else:
- raise TypeError("Patch can only be added to another Patch")
+ raise TypeError("StitchGroup can only be added to another StitchGroup")
def __len__(self):
# This method allows `len(patch)` and `if patch:
@@ -45,7 +45,7 @@ class Patch:
self.stitches.append(stitch)
def reverse(self):
- return Patch(self.color, self.stitches[::-1])
+ return StitchGroup(self.color, self.stitches[::-1])
class Param(object):