diff --git a/io_curve_svg/import_svg.py b/io_curve_svg/import_svg.py index 1b62ac1ec8db8f33a42e241b94b8de549cafb75e..740dd8172ab6b052b581cf6a7a8ebde242b6290b 100644 --- a/io_curve_svg/import_svg.py +++ b/io_curve_svg/import_svg.py @@ -1749,7 +1749,15 @@ class SVGGeometrySVG(SVGGeometryContainer): rect = SVGRectFromNode(self._node, self._context) - self._pushMatrix(self.getNodeMatrix()) + matrix = self.getNodeMatrix() + + # Better Inkscape compatibility: match document origin with + # 3D space origin. + if self._node.getAttribute('inkscape:version'): + document_height = float(self._node.getAttribute('height')) + matrix = matrix * Matrix.Translation([0.0, -document_height , 0.0]) + + self._pushMatrix(matrix) self._pushRect(rect) super()._doCreateGeom(False)