This merge request should solve issues like https://github.com/sozi-projects/Sozi/issues/647.
In fact, if the svgElement (e.g. an <image>) is a descendant of an inner <svg> element, svgElement.getCTM() returns a transformation matrix with respect to the viewport of the latter, while layerGroup.getCTM() provides one against the outermost <svg>'s viewport, leading to a unexpected transformations.
By using getScreenCTM(), the returned matrix refers always to the document's viewport.
Hello.
This merge request should solve issues like https://github.com/sozi-projects/Sozi/issues/647. In fact, if the
svgElement
(e.g. an<image>
) is a descendant of an inner<svg>
element,svgElement.getCTM()
returns a transformation matrix with respect to the viewport of the latter, whilelayerGroup.getCTM()
provides one against the outermost<svg>
's viewport, leading to a unexpected transformations. By usinggetScreenCTM()
, the returned matrix refers always to the document's viewport.