mistake in simpletransform.applyTransformToNode
When updating an old extension of mine, I think I discovered a small bug in the depreciated simpletransform.applyTransformToNode
Attached is a simple SVG file and a simple extension to reproduce the issue.
According to the transformation matrix in the extension the object (group in this case) should be moved straight down, which it does in v0.92 on Windows, in v1.0beta2_2020-02-26_368ca91-x64 on Windows it gets moved up and to the left a bit. This only happens if the object has an attached transform.
I think the issue is in the order in which the transforms are applied (which I suppose are handled as matrix multiplications internally). From simpletransform.py line 51 (identical in downloaded version and here in the repository)
@deprecate
def applyTransformToNode(mat, node):
"""elem.transform *= Transform(mat)"""
node.transform *= Transform(mat)
If I change that to
@deprecate
def applyTransformToNode(mat, node):
"""elem.transform = Transform(mat) * elem.transform """
node.transform = Transform(mat) * node.transform
everything works as expected.