diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-04-25 09:40:04 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-04-25 09:40:04 +0200 |
commit | b334a92493c9e4956b0fc631610857d1b1cf5f6d (patch) | |
tree | bdc85d9b49f4b8d666b34e4d87abf629f579f1e2 /examples/quick/scenegraph | |
parent | 0eeb7ada04cc81d0ab1b61747bdf92fd7c33e1ec (diff) | |
parent | 27079f9168463b5b27aeb2d1f93f867bf714e71a (diff) |
Merge remote-tracking branch 'origin/dev' into wip/scenegraphng
Change-Id: If2e7c1cf0f1522f6052bbc3e3636ef62bef1b4db
Diffstat (limited to 'examples/quick/scenegraph')
-rw-r--r-- | examples/quick/scenegraph/customgeometry/beziercurve.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/quick/scenegraph/customgeometry/beziercurve.cpp b/examples/quick/scenegraph/customgeometry/beziercurve.cpp index ca3c6f524b..750ff6aa3b 100644 --- a/examples/quick/scenegraph/customgeometry/beziercurve.cpp +++ b/examples/quick/scenegraph/customgeometry/beziercurve.cpp @@ -152,7 +152,7 @@ QSGNode *BezierCurve::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) //! [7] //! [8] - QRectF bounds = boundingRect(); + QSizeF itemSize = size(); QSGGeometry::Point2D *vertices = geometry->vertexDataAsPoint2D(); for (int i = 0; i < m_segmentCount; ++i) { qreal t = i / qreal(m_segmentCount - 1); @@ -163,8 +163,8 @@ QSGNode *BezierCurve::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) + 3 * invt * t * t * m_p3 + t * t * t * m_p4; - float x = bounds.x() + pos.x() * bounds.width(); - float y = bounds.y() + pos.y() * bounds.height(); + float x = pos.x() * itemSize.width(); + float y = pos.y() * itemSize.height(); vertices[i].set(x, y); } |