diff options
| author | Kaalleen <reni@allenka.de> | 2021-06-28 20:05:50 +0200 |
|---|---|---|
| committer | Kaalleen <reni@allenka.de> | 2021-06-28 20:05:50 +0200 |
| commit | ecacb9829e9c2b7050486707211f9d176aafdf75 (patch) | |
| tree | f6f30f9707a9c3f603ce896b0b95dbe5c4b13dc1 /lib/elements/utils.py | |
| parent | 2f54ff2a436f2774bfdc730b6e95c43f18ed81ac (diff) | |
pattern markers
Diffstat (limited to 'lib/elements/utils.py')
| -rw-r--r-- | lib/elements/utils.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/elements/utils.py b/lib/elements/utils.py index 78dace6a..cd87cec8 100644 --- a/lib/elements/utils.py +++ b/lib/elements/utils.py @@ -3,16 +3,16 @@ # Copyright (c) 2010 Authors # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. -from ..commands import group_commands, is_command -from ..svg.tags import (EMBROIDERABLE_TAGS, INKSTITCH_ATTRIBS, SVG_IMAGE_TAG, - SVG_PATH_TAG, SVG_POLYLINE_TAG, SVG_TEXT_TAG) +from ..commands import is_command +from ..svg.tags import (EMBROIDERABLE_TAGS, SVG_IMAGE_TAG, SVG_PATH_TAG, + SVG_POLYLINE_TAG, SVG_TEXT_TAG) from .auto_fill import AutoFill from .clone import Clone, is_clone from .element import EmbroideryElement from .empty_d_object import EmptyDObject from .fill import Fill from .image import ImageObject -from .pattern import PatternObject +from .pattern import PatternObject, is_pattern from .polyline import Polyline from .satin_column import SatinColumn from .stroke import Stroke @@ -29,8 +29,7 @@ def node_to_elements(node): # noqa: C901 elif node.tag == SVG_PATH_TAG and not node.get('d', ''): return [EmptyDObject(node)] - # TODO: exclude fills - elif group_commands(node, 'pattern_group') and not node.get(INKSTITCH_ATTRIBS['satin_column']): + elif is_pattern(node): return [PatternObject(node)] elif node.tag in EMBROIDERABLE_TAGS: |
