|qmake:||QT += 3drender|
This class was introduced in Qt 5.8.
|virtual void||paint(QPainter *painter) = 0|
A QPaintedTextureImage provides a way to specify a texture image (and thus an OpenGL texture) through a QPainter. The width and height of the texture image can be specified through the width and height or size properties.
A QPaintedTextureImage must be subclassed and the virtual paint() function implemented. Each time update() is called on the QPaintedTextureImage, the paint() function is invoked and the resulting image is uploaded.
The QPaintedTextureImage must be attached to some QAbstractTexture.
This property holds the height of the texture image. The height must be greater than or equal to 1.
size : QSize
This property holds the size of the texture image.
This property holds the width of the texture image. The width must be greater than or equal to 1.
Member Function Documentation
Sets the height (h) of the texture image. Triggers an update, if the size changes.
Note: Setter function for property height.
See also height().
[slot] void QPaintedTextureImage::setSize(QSize size)
Sets the width and height of the texture image. Triggers an update, if the size changes.
Note: Setter function for property size.
See also size().
Sets the width (w) of the texture image. Triggers an update, if the size changes.
Note: Setter function for property width.
See also width().
[pure virtual protected] void QPaintedTextureImage::paint(QPainter *painter)
Paints the texture image with the specified QPainter object painter.
void QPaintedTextureImage::update(const QRect &rect = QRect())
Schedules the painted texture's paint() function to be called, which in turn uploads the new image to the GPU. Parameter rect is currently unused.
© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.