Use the texture atlas height to compute y coordinates
authorGunnar Sletta <gunnar.sletta@nokia.com>
Mon, 5 Dec 2011 09:24:28 +0000 (10:24 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 5 Dec 2011 11:52:53 +0000 (12:52 +0100)
Change-Id: Ib0266ef6a46f58fe2c2892b8be297efe2f85aa98
Reviewed-by: aavit <qt_aavit@ovi.com>
src/quick/items/qquickninepatchnode.cpp

index 2974725..9724d83 100644 (file)
@@ -271,7 +271,7 @@ void QQuickNinePatchNode::fillRow(QSGGeometry::TexturedPoint2D *&v, float y, flo
                                const QRectF &tsr,   // texture sub rect, for atlasses
                                const QSize &ts)     // texture size in pixels
 {
-    ty = tsr.y() + ty * tsr.width();
+    ty = tsr.y() + ty * tsr.height();
 
     float tw = ts.width();
     float rightBorder = tw - m_innerRect.right();