summaryrefslogtreecommitdiffstats
path: root/src/svg/qsvggraphics_p.h
diff options
context:
space:
mode:
authorDavid Crémoux <cremoux.david@sanalevim.net>2019-02-01 11:54:25 +0300
committerEirik Aavitsland <eirik.aavitsland@qt.io>2019-02-06 12:36:12 +0000
commita91a65632c4d830070e1ca9bbda7e355f1459414 (patch)
tree1f47b068f5691ae8c359d761613deef43030b3a1 /src/svg/qsvggraphics_p.h
parent74f7566527c6ed3c47fac873e90942f2834d248f (diff)
Fix QSvgRenderer incorrect render of svg:image
The bounds of QSvgImage are integer based (QRect) which cause rounding issues when decimals values are used to define image (image shifted and with incorrect size). Changing the bounds to QRectF solves the issue. Fixes: QTBUG-73445 Change-Id: I49828e2c0b1917ec878844d520aac182581c23fb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/svg/qsvggraphics_p.h')
-rw-r--r--src/svg/qsvggraphics_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svg/qsvggraphics_p.h b/src/svg/qsvggraphics_p.h
index 6e5b9d6..1138d1a 100644
--- a/src/svg/qsvggraphics_p.h
+++ b/src/svg/qsvggraphics_p.h
@@ -104,13 +104,13 @@ class Q_SVG_PRIVATE_EXPORT QSvgImage : public QSvgNode
{
public:
QSvgImage(QSvgNode *parent, const QImage &image,
- const QRect &bounds);
+ const QRectF &bounds);
void draw(QPainter *p, QSvgExtraStates &states) override;
Type type() const override;
QRectF bounds(QPainter *p, QSvgExtraStates &states) const override;
private:
QImage m_image;
- QRect m_bounds;
+ QRectF m_bounds;
};
class Q_SVG_PRIVATE_EXPORT QSvgLine : public QSvgNode