summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2021-10-11 11:11:26 +0200
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2021-10-11 13:32:33 +0200
commitfc1e1878743bcaac0c81a4748a00d0042cc15815 (patch)
tree6c79f7a8ce359ed051d71fd2858e610d9725a9ff /src
parent4059c11bb33a2d575ddf9fb85e077fa5b53b5657 (diff)
downloadqtsvg-fc1e1878743bcaac0c81a4748a00d0042cc15815.tar.gz
Fix text x/y when the length is not in pixels
Fixes: QTBUG-97421 Pick-to: 6.2 Change-Id: I41f3cbf8e747530a67fe5074a988ba49aeb43b8e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/svg/qsvghandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 300979e..714df49 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -3349,7 +3349,9 @@ static QSvgNode *createTextNode(QSvgNode *parent,
//### editable and rotate not handled
QSvgHandler::LengthType type;
qreal nx = parseLength(x.toString(), type, handler);
+ nx = convertToPixels(nx, true, type);
qreal ny = parseLength(y.toString(), type, handler);
+ ny = convertToPixels(ny, true, type);
QSvgNode *text = new QSvgText(parent, QPointF(nx, ny));
return text;