def
heightChanged
(w)
def
sizeChanged
(size)
def
widthChanged
(w)
A
QPaintedTextureImageprovides 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
QPaintedTextureImagemust be subclassed and the virtualpaint()function implemented. Each timeupdate()is called on theQPaintedTextureImage,paint()function is invoked and the resulting image is uploaded.
QPaintedTextureImagemust be attached to someQAbstractTexture.
PySide2.Qt3DRender.Qt3DRender.
QPaintedTextureImage
(
[
parent=None
]
)
¶
parent
–
QNode
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
height
(
)
¶
int
另请参阅
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
heightChanged
(
w
)
¶
w
–
int
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
paint
(
painter
)
¶
painter
–
QPainter
Paints the texture image with the specified
QPainter
object
painter
.
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
setHeight
(
h
)
¶
h
–
int
Sets the height (
h
) of the texture image. Triggers an update, if the size changes.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
setSize
(
size
)
¶
size
–
QSize
Sets the width and height of the texture image. Triggers an update, if the
size
改变。
另请参阅
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
setWidth
(
w
)
¶
w
–
int
Sets the width (
w
) of the texture image. Triggers an update, if the size changes.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
sizeChanged
(
size
)
¶
size
–
QSize
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
update
(
[
rect=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.
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
width
(
)
¶
int
另请参阅
PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.
widthChanged
(
w
)
¶
w
–
int