Qt3DRender.QPaintedTextureImage¶
Synopsis¶
Signals¶
def
heightChanged
(w)def
sizeChanged
(size)def
widthChanged
(w)
Detailed Description¶
A
QPaintedTextureImage
provides a way to specify a texture image (and thus an OpenGL texture) through aQPainter
. 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 virtualpaint()
function implemented. Each timeupdate()
is called on theQPaintedTextureImage
, thepaint()
function is invoked and the resulting image is uploaded.The
QPaintedTextureImage
must be attached to someQAbstractTexture
.
-
class
PySide2.Qt3DRender.Qt3DRender.
QPaintedTextureImage
([parent=None])¶ - Parameters
parent –
QNode
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
height
()¶ - Return type
int
See also
setHeight()
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
heightChanged
(w)¶ - Parameters
w –
int
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
paint
(painter)¶ - Parameters
painter –
QPainter
Paints the texture image with the specified
QPainter
objectpainter
.
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
setHeight
(h)¶ - Parameters
h –
int
Sets the height (
h
) of the texture image. Triggers an update, if the size changes.See also
height()
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
setSize
(size)¶ - Parameters
size –
QSize
Sets the width and height of the texture image. Triggers an update, if the
size
changes.See also
size()
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
setWidth
(w)¶ - Parameters
w –
int
Sets the width (
w
) of the texture image. Triggers an update, if the size changes.See also
width()
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
size
()¶ - Return type
QSize
See also
setSize()
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
sizeChanged
(size)¶ - Parameters
size –
QSize
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
update
([rect=QRect()])¶ - Parameters
rect –
QRect
Schedules the painted texture’s
paint()
function to be called, which in turn uploads the new image to the GPU. Parameterrect
is currently unused.
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
width
()¶ - Return type
int
See also
setWidth()
-
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
widthChanged
(w)¶ - Parameters
w –
int
© 2018 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.