From e52d50fd7746c4d906b4886e437dc96a5c783950 Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Tue, 21 Aug 2012 14:04:36 +0200 Subject: [PATCH] Document QSGTexture. Task-number: QTBUG-23192 Change-Id: I4a91dfaa0aa80d3cdc6c785fcaefdeafe60a2149 Reviewed-by: Gunnar Sletta --- src/quick/scenegraph/util/qsgtexture.cpp | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp index facf077..98378ca 100644 --- a/src/quick/scenegraph/util/qsgtexture.cpp +++ b/src/quick/scenegraph/util/qsgtexture.cpp @@ -247,6 +247,14 @@ static void qt_debug_remove_texture(QSGTexture* texture) neighboring texels. */ +/*! + \fn QSGTexture::QSGTexture(QSGTexturePrivate &dd) + \internal + */ + +/*! + Constructs the QSGTexture base class. + */ QSGTexture::QSGTexture() : QObject(*(new QSGTexturePrivate)) { @@ -255,6 +263,9 @@ QSGTexture::QSGTexture() #endif } +/*! + Destroys the QSGTexture. + */ QSGTexture::~QSGTexture() { #ifndef QT_NO_DEBUG @@ -276,6 +287,14 @@ QSGTexture::~QSGTexture() */ /*! + \fn QRectF QSGTexture::convertToNormalizedSourceRect(const QRectF &rect) const + + Returns \a rect converted to normalized coordinates. + + \sa normalizedTextureSubRect() + */ + +/*! This function returns a copy of the current texture which is removed from its atlas. @@ -322,7 +341,11 @@ bool QSGTexture::isAtlasTexture() const \warning This function can only be called from the rendering thread. */ +/*! + \fn QSize QSGTexture::textureSize() const + Returns the size of the texture. + */ /*! Returns the rectangle inside textureSize() that this texture @@ -337,6 +360,12 @@ QRectF QSGTexture::normalizedTextureSubRect() const } /*! + \fn bool QSGTexture::hasAlphaChannel() const + + Returns true if the texture data contains an alpha channel. + */ + +/*! \fn bool QSGTexture::hasMipmaps() const Returns true if the texture data contains mipmap levels. @@ -380,6 +409,9 @@ void QSGTexture::setFiltering(QSGTexture::Filtering filter) } } +/*! + Returns the sampling mode to be used for this texture. + */ QSGTexture::Filtering QSGTexture::filtering() const { return (QSGTexture::Filtering) d_func()->filterMode; @@ -400,6 +432,9 @@ void QSGTexture::setHorizontalWrapMode(WrapMode hwrap) } } +/*! + Returns the horizontal wrap mode to be used for this texture. + */ QSGTexture::WrapMode QSGTexture::horizontalWrapMode() const { return (QSGTexture::WrapMode) d_func()->horizontalWrap; @@ -407,6 +442,9 @@ QSGTexture::WrapMode QSGTexture::horizontalWrapMode() const +/*! + Sets the vertical wrap mode to be used for the upcoming bind() call to \a vwrap + */ void QSGTexture::setVerticalWrapMode(WrapMode vwrap) { Q_D(QSGTexture); @@ -416,6 +454,9 @@ void QSGTexture::setVerticalWrapMode(WrapMode vwrap) } } +/*! + Returns the vertical wrap mode to be used for this texture. + */ QSGTexture::WrapMode QSGTexture::verticalWrapMode() const { return (QSGTexture::WrapMode) d_func()->verticalWrap; -- 2.7.4