summaryrefslogtreecommitdiff
path: root/lib/svg/path.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2023-07-30 10:49:25 -0400
committerGitHub <noreply@github.com>2023-07-30 10:49:25 -0400
commit9c090170941e00a6c6265e3a6999ca240fb73052 (patch)
tree748e9bdda3acbf145c8ddb2ba7595be1975f6e56 /lib/svg/path.py
parent96df68c46f495de0f63d36b5130e7dfdc773198a (diff)
parent74e93834c094351a398dd46d01c40d197f8fe9af (diff)
Merge pull request #2418 from inkstitch/lexelby/convert-to-satin-join
produce only one satin from convert to satin
Diffstat (limited to 'lib/svg/path.py')
-rw-r--r--lib/svg/path.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/svg/path.py b/lib/svg/path.py
index 6c2cbe35..878d2a7c 100644
--- a/lib/svg/path.py
+++ b/lib/svg/path.py
@@ -53,11 +53,18 @@ def get_node_transform(node):
def get_correction_transform(node, child=False):
- """Get a transform to apply to new siblings or children of this SVG node"""
+ """Get a transform to apply to new siblings or children of this SVG node
- # if we want to place our new nodes in the same group/layer as this node,
- # then we'll need to factor in the effects of any transforms set on
- # the parents of this node.
+ Arguments:
+ child (boolean) -- whether the new nodes we're going to add will be
+ children of node (child=True) or siblings of node
+ (child=False)
+
+ This allows us to add a new child node that has its path specified in
+ absolute coordinates. The correction transform will undo the effects of
+ the parent's and ancestors' transforms so that absolute coordinates
+ work properly.
+ """
if child:
transform = get_node_transform(node)