diff options
| author | Kaalleen <reni@allenka.de> | 2022-01-30 15:48:51 +0100 |
|---|---|---|
| committer | Kaalleen <reni@allenka.de> | 2022-05-04 19:06:44 +0200 |
| commit | 3d1600ed039c9078bcb4a28328ab60eb96994dfd (patch) | |
| tree | 57a6d51e108747daa354762ccab8b635e283e7a7 /lib/elements/clone.py | |
| parent | 82216b184c669d6dea26672e5c0771146e62ca39 (diff) | |
* autofill to fillstitch
* remove too complex warning for fillstitch
* some marker adjustments
Diffstat (limited to 'lib/elements/clone.py')
| -rw-r--r-- | lib/elements/clone.py | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/lib/elements/clone.py b/lib/elements/clone.py index 15e7591c..3f133471 100644 --- a/lib/elements/clone.py +++ b/lib/elements/clone.py @@ -5,18 +5,20 @@ from math import atan, degrees +<<<<<<< HEAD from ..commands import is_command, is_command_symbol +======= +import inkex + +from ..commands import is_command_symbol +>>>>>>> c69b6f5a (* autofill to fillstitch) from ..i18n import _ from ..svg.path import get_node_transform from ..svg.svg import find_elements -from ..svg.tags import (EMBROIDERABLE_TAGS, INKSTITCH_ATTRIBS, - SVG_POLYLINE_TAG, SVG_USE_TAG, XLINK_HREF) +from ..svg.tags import (EMBROIDERABLE_TAGS, INKSTITCH_ATTRIBS, SVG_USE_TAG, + XLINK_HREF) from ..utils import cache -from .auto_fill import AutoFill from .element import EmbroideryElement, param -from .polyline import Polyline -from .satin_column import SatinColumn -from .stroke import Stroke from .validation import ObjectTypeWarning, ValidationWarning @@ -67,28 +69,8 @@ class Clone(EmbroideryElement): return self.get_float_param('angle', 0) def clone_to_element(self, node): - # we need to determine if the source element is polyline, stroke, fill or satin - element = EmbroideryElement(node) - - if node.tag == SVG_POLYLINE_TAG: - return [Polyline(node)] - - elif element.get_boolean_param("satin_column") and self.get_clone_style("stroke", self.node): - return [SatinColumn(node)] - else: - elements = [] - if element.get_style("fill", "black") and not element.get_style("stroke", 1) == "0": - # if element.get_boolean_param("auto_fill", True): - elements.append(AutoFill(node)) - # else: - # elements.append(Fill(node)) - if element.get_style("stroke", self.node) is not None: - if not is_command(element.node): - elements.append(Stroke(node)) - if element.get_boolean_param("stroke_first", False): - elements.reverse() - - return elements + from .utils import node_to_elements + return node_to_elements(node) def to_stitch_groups(self, last_patch=None): patches = [] |
