summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-09 03:02:49 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-09 03:02:49 +0100
commit0c023adada49bab1098e7df274ad7889828ef439 (patch)
tree225ada9b3f3fe127cb767b217223926f9c4f88df
parentfbad8e7701708c07bfbae73e6c3158fd9e560ee7 (diff)
parenta91a65632c4d830070e1ca9bbda7e355f1459414 (diff)
downloadqtsvg-0c023adada49bab1098e7df274ad7889828ef439.tar.gz
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ieb656507bd67b147559c922ec0c7076e4b8b835a
-rw-r--r--src/svg/qsvggraphics.cpp10
-rw-r--r--src/svg/qsvggraphics_p.h4
-rw-r--r--src/svg/qsvghandler.cpp8
3 files changed, 11 insertions, 11 deletions
diff --git a/src/svg/qsvggraphics.cpp b/src/svg/qsvggraphics.cpp
index 5b273af..12f2349 100644
--- a/src/svg/qsvggraphics.cpp
+++ b/src/svg/qsvggraphics.cpp
@@ -121,14 +121,14 @@ void QSvgArc::draw(QPainter *p, QSvgExtraStates &states)
}
QSvgImage::QSvgImage(QSvgNode *parent, const QImage &image,
- const QRect &bounds)
+ const QRectF &bounds)
: QSvgNode(parent), m_image(image),
m_bounds(bounds)
{
- if (m_bounds.width() == 0)
- m_bounds.setWidth(m_image.width());
- if (m_bounds.height() == 0)
- m_bounds.setHeight(m_image.height());
+ if (m_bounds.width() == 0.0)
+ m_bounds.setWidth(static_cast<qreal>(m_image.width()));
+ if (m_bounds.height() == 0.0)
+ m_bounds.setHeight(static_cast<qreal>(m_image.height()));
}
void QSvgImage::draw(QPainter *p, QSvgExtraStates &states)
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
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 0468bbe..dd31965 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -2792,10 +2792,10 @@ static QSvgNode *createImageNode(QSvgNode *parent,
QSvgNode *img = new QSvgImage(parent,
image,
- QRect(int(nx),
- int(ny),
- int(nwidth),
- int(nheight)));
+ QRectF(nx,
+ ny,
+ nwidth,
+ nheight));
return img;
}