From fc1e1878743bcaac0c81a4748a00d0042cc15815 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 11 Oct 2021 11:11:26 +0200 Subject: 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 --- src/svg/qsvghandler.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; -- cgit v1.2.1