diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2025-02-03 22:37:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-03 22:37:36 +0100 |
| commit | 497fbcfab5734aac889f15b72384a6a8631fffa4 (patch) | |
| tree | 1f1a690a6108d7e4e0fac599d4e554edae9db6f9 /lib/svg | |
| parent | e1c6d8c5956c7c3c5e158c1f7415edd5bc1a0cc1 (diff) | |
Add debug variable to enable sew stack elements (#3476)
Diffstat (limited to 'lib/svg')
| -rw-r--r-- | lib/svg/clip.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/svg/clip.py b/lib/svg/clip.py index 65ca4602..b8c97894 100644 --- a/lib/svg/clip.py +++ b/lib/svg/clip.py @@ -11,6 +11,14 @@ from ..utils import ensure_multi_polygon from .tags import SVG_GROUP_TAG, SVG_PATH_TAG +def get_clips(node): + clips = [] + for element in node.iterancestors(SVG_GROUP_TAG): + if element.clip is not None: + clips.append(element.clip) + return clips + + def get_clip_path(node): # get clip and apply node transform clip = _clip_paths(node) |
