QPaintedTextureImage

A QAbstractTextureImage that can be written through a QPainter . More

Synopsis

Functions

Virtual functions

Slots

Signals

Detailed Description

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 .

class PySide2.Qt3DRender.QPaintedTextureImage([parent=None])
Parameters

parentPySide2.Qt3DCore.QNode

PySide2.Qt3DRender.QPaintedTextureImage.height()
Return type

int

This property holds the height of the texture image. The height must be greater than or equal to 1.

PySide2.Qt3DRender.QPaintedTextureImage.heightChanged(w)
Parameters

w – int

PySide2.Qt3DRender.QPaintedTextureImage.paint(painter)
Parameters

painterPySide2.QtGui.QPainter

Paints the texture image with the specified QPainter object painter .

PySide2.Qt3DRender.QPaintedTextureImage.setHeight(h)
Parameters

h – int

This property holds the height of the texture image. The height must be greater than or equal to 1.

PySide2.Qt3DRender.QPaintedTextureImage.setSize(size)
Parameters

sizePySide2.QtCore.QSize

This property holds the size of the texture image.

See also

height width

PySide2.Qt3DRender.QPaintedTextureImage.setWidth(w)
Parameters

w – int

This property holds the width of the texture image. The width must be greater than or equal to 1.

PySide2.Qt3DRender.QPaintedTextureImage.size()
Return type

PySide2.QtCore.QSize

This property holds the size of the texture image.

See also

height width

PySide2.Qt3DRender.QPaintedTextureImage.sizeChanged(size)
Parameters

sizePySide2.QtCore.QSize

PySide2.Qt3DRender.QPaintedTextureImage.update([rect=QRect()])
Parameters

rectPySide2.QtCore.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.QPaintedTextureImage.width()
Return type

int

This property holds the width of the texture image. The width must be greater than or equal to 1.

PySide2.Qt3DRender.QPaintedTextureImage.widthChanged(w)
Parameters

w – int