Skip to content

simpletransform.py: wrong order of matrix multiplication

Jens Kober requested to merge jenskober/extensions:patch-1 into master

originally posted as #188 (closed)

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). With the merge request, everything works as expected.

testApplyTransformToNode.inx

testApplyTransformToNode.py

test.svg

Merge request reports