summaryrefslogtreecommitdiff
path: root/lib/extensions
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2021-10-10 09:33:20 +0200
committerGitHub <noreply@github.com>2021-10-10 09:33:20 +0200
commita7a3e012b7dc25ea7c511da424c52e4aeaccd01d (patch)
tree8ca6717c399c92e9aa8f45b2c3195b00852aa0b7 /lib/extensions
parent6aad316fdf8806575adfce5ce9ef8f7863853693 (diff)
Do not render clipPath and mask (#1379)
* Ignore clipPath and mask * Render polygons
Diffstat (limited to 'lib/extensions')
-rw-r--r--lib/extensions/base.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/extensions/base.py b/lib/extensions/base.py
index cc2fea53..a065b5cc 100644
--- a/lib/extensions/base.py
+++ b/lib/extensions/base.py
@@ -20,7 +20,8 @@ from ..i18n import _
from ..patterns import is_pattern
from ..svg import generate_unique_id
from ..svg.tags import (CONNECTOR_TYPE, EMBROIDERABLE_TAGS, INKSCAPE_GROUPMODE,
- NOT_EMBROIDERABLE_TAGS, SVG_DEFS_TAG, SVG_GROUP_TAG)
+ NOT_EMBROIDERABLE_TAGS, SVG_CLIPPATH_TAG, SVG_DEFS_TAG,
+ SVG_GROUP_TAG, SVG_MASK_TAG)
SVG_METADATA_TAG = inkex.addNS("metadata", "svg")
@@ -146,7 +147,9 @@ class InkstitchExtension(inkex.Effect):
if (node.tag in EMBROIDERABLE_TAGS or node.tag == SVG_GROUP_TAG) and element.get_style('display', 'inline') is None:
return []
- if node.tag == SVG_DEFS_TAG:
+ # defs, masks and clippaths can contain embroiderable elements
+ # but should never be rendered directly.
+ if node.tag in [SVG_DEFS_TAG, SVG_MASK_TAG, SVG_CLIPPATH_TAG]:
return []
# command connectors with a fill color set, will glitch into the elements list