Painting in Qt is usually achieved using class
QPainter
.
Since this class is neither a subclass of
QObject
nor a value class suitable for storing into a Qt variant,
the QtLua class QtLuaPainter
defines a Qt object that
exposes the painting capabilities of Qt in a more flexible way.
Instances of class QtLuaPainter
can target:
qt.QImage
or a qt.QPixmap
.
qt.QtLuaPrinter
.
qt.QWidget
.
Class QtLuaPainter
provides an automatic buffering
capability when it targets a widget. Drawing functions
paint onto an offline image. The class logic ensures
that the widget is automatically refreshed or updated
when appropriate.
Despite these differences, the Qt documentation for the
Qt paint system
contains lots of useful information. In particular, the documentation for class
QPainter
describes how the painter settings affects drawing operations.