diff options
Diffstat (limited to 'src/quick/scenegraph/util/qsgdefaultimagenode.cpp')
-rw-r--r-- | src/quick/scenegraph/util/qsgdefaultimagenode.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/quick/scenegraph/util/qsgdefaultimagenode.cpp b/src/quick/scenegraph/util/qsgdefaultimagenode.cpp index 6afe591dca..63773887a0 100644 --- a/src/quick/scenegraph/util/qsgdefaultimagenode.cpp +++ b/src/quick/scenegraph/util/qsgdefaultimagenode.cpp @@ -173,33 +173,4 @@ bool QSGDefaultImageNode::ownsTexture() const return m_ownsTexture; } -void QSGDefaultImageNode::rebuildGeometry(QSGGeometry *g, - QSGTexture *texture, - const QRectF &rect, - QRectF sourceRect, - TextureCoordinatesTransformMode texCoordMode) -{ - if (!texture) - return; - - if (!sourceRect.width() || !sourceRect.height()) { - QSize ts = texture->textureSize(); - sourceRect = QRectF(0, 0, ts.width(), ts.height()); - } - - // Maybe transform the texture coordinates - if (texCoordMode.testFlag(QSGImageNode::MirrorHorizontally)) { - float tmp = sourceRect.left(); - sourceRect.setLeft(sourceRect.right()); - sourceRect.setRight(tmp); - } - if (texCoordMode.testFlag(QSGImageNode::MirrorVertically)) { - float tmp = sourceRect.top(); - sourceRect.setTop(sourceRect.bottom()); - sourceRect.setBottom(tmp); - } - - QSGGeometry::updateTexturedRectGeometry(g, rect, texture->convertToNormalizedSourceRect(sourceRect)); -} - QT_END_NAMESPACE |