QSGSimpleTextureNode Class

The QSGSimpleTextureNode class is provided for convenience to easily draw textured content using the QML scene graph. More...

#include <QSGSimpleTextureNode>

Inherits: QSGGeometryNode.

Public Functions

QSGSimpleTextureNode()
QSGTexture::Filtering filtering() const
QRectF rect() const
void setFiltering(QSGTexture::Filtering filtering)
void setRect(const QRectF & r)
void setRect(qreal x, qreal y, qreal w, qreal h)
void setTexture(QSGTexture * texture)
QSGTexture * texture() const

Detailed Description

The QSGSimpleTextureNode class is provided for convenience to easily draw textured content using the QML scene graph.

Warning: The simple texture node class must have a texture before being added to the scene graph to be rendered.

Member Function Documentation

QSGSimpleTextureNode::QSGSimpleTextureNode()

Constructs a new simple texture node

QSGTexture::Filtering QSGSimpleTextureNode::filtering() const

Returns the filtering currently set on this texture node

See also setFiltering().

QRectF QSGSimpleTextureNode::rect() const

Returns the target rect of this texture node.

See also setRect().

void QSGSimpleTextureNode::setFiltering(QSGTexture::Filtering filtering)

Sets the filtering to be used for this texture node to filtering.

For smooth scaling, use QSGTexture::Linear; for normal scaling, use QSGTexture::Nearest.

See also filtering().

void QSGSimpleTextureNode::setRect(const QRectF & r)

Sets the target rect of this texture node to r.

See also rect().

void QSGSimpleTextureNode::setRect(qreal x, qreal y, qreal w, qreal h)

This is an overloaded function.

Sets the rectangle of this texture node to begin at (x, y) and have width w and height h.

void QSGSimpleTextureNode::setTexture(QSGTexture * texture)

Sets the texture of this texture node to texture.

Warning: A texture node must have a texture before being added to the scenegraph to be rendered.

See also texture().

QSGTexture * QSGSimpleTextureNode::texture() const

Returns the texture for this texture node

See also setTexture().