diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2021-08-16 19:40:44 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-16 19:40:44 -0400 |
| commit | 3ebc238561dd2403b19a56a0f3147c70eb4ebe3d (patch) | |
| tree | c7e4c618335fac2196d42e03f26c3c2ad2a4251d /lib/elements/pattern.py | |
| parent | 5a7b7276759b6fb4c85891b13d9ee7a2da8150ab (diff) | |
| parent | b49f7d28314f30727f9f963bddb795b88a95f2bd (diff) | |
Merge pull request #1254 from inkstitch/kaalleen/satin-patterns
Satin pattern and split stitch
Diffstat (limited to 'lib/elements/pattern.py')
| -rw-r--r-- | lib/elements/pattern.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/elements/pattern.py b/lib/elements/pattern.py new file mode 100644 index 00000000..4b92d366 --- /dev/null +++ b/lib/elements/pattern.py @@ -0,0 +1,33 @@ +# Authors: see git history +# +# Copyright (c) 2010 Authors +# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. + +import inkex + +from ..i18n import _ +from .element import EmbroideryElement +from .validation import ObjectTypeWarning + + +class PatternWarning(ObjectTypeWarning): + name = _("Pattern Element") + description = _("This element will not be embroidered. " + "It will appear as a pattern applied to objects in the same group as it. " + "Objects in sub-groups will be ignored.") + steps_to_solve = [ + _("To disable pattern mode, remove the pattern marker:"), + _('* Open the Fill and Stroke panel (Objects > Fill and Stroke)'), + _('* Go to the Stroke style tab'), + _('* Under "Markers" choose the first (empty) option in the first dropdown list.') + ] + + +class PatternObject(EmbroideryElement): + + def validation_warnings(self): + repr_point = next(inkex.Path(self.parse_path()).end_points) + yield PatternWarning(repr_point) + + def to_stitch_groups(self, last_patch): + return [] |
