QSGImageNode Class
The QSGImageNode class is provided for convenience to easily draw textured content using the QML scene graph. More...
| Header: | #include <QSGImageNode> |
| qmake: | QT += quick |
| Since: | Qt 5.8 |
| Inherits: | QSGGeometryNode |
This class was introduced in Qt 5.8.
Public Types
| enum | TextureCoordinatesTransformFlag { NoTransform, MirrorHorizontally, MirrorVertically } |
| flags | TextureCoordinatesTransformMode |
Static Public Members
| void | rebuildGeometry(QSGGeometry *g, QSGTexture *texture, const QRectF &rect, QRectF sourceRect, QSGImageNode::TextureCoordinatesTransformMode texCoordMode) |
Additional Inherited Members
- 2 public functions inherited from QSGGeometryNode
- 1 public function inherited from QSGBasicGeometryNode
- 10 public functions inherited from QSGNode
Detailed Description
Warning: The image node class must have a texture before being added to the scene graph to be rendered.
Member Type Documentation
enum QSGImageNode::TextureCoordinatesTransformFlag
flags QSGImageNode::TextureCoordinatesTransformMode
The TextureCoordinatesTransformFlag enum is used to specify the mode used to generate texture coordinates for a textured quad.
| Constant | Value | Description |
|---|---|---|
QSGImageNode::NoTransform | 0x00 | Texture coordinates are oriented with window coordinates i.e. with origin at top-left. |
QSGImageNode::MirrorHorizontally | 0x01 | Texture coordinates are inverted in the horizontal axis with respect to window coordinates |
QSGImageNode::MirrorVertically | 0x02 | Texture coordinates are inverted in the vertical axis with respect to window coordinates |
The TextureCoordinatesTransformMode type is a typedef for QFlags<TextureCoordinatesTransformFlag>. It stores an OR combination of TextureCoordinatesTransformFlag values.
Member Function Documentation
[static] void QSGImageNode::rebuildGeometry(QSGGeometry *g, QSGTexture *texture, const QRectF &rect, QRectF sourceRect, QSGImageNode::TextureCoordinatesTransformMode texCoordMode)
Updates the geometry g with the texture, the coordinates in rect, and the texture coordinates from sourceRect.
g is assumed to be a triangle strip of four vertices of type QSGGeometry::TexturedPoint2D.
texCoordMode is used for normalizing the sourceRect.