Paint System¶
A system for painting on the screen or on print devices using the same API
Qt’s paint system enables painting on screen and print devices using the same API, and is primarily based on the
QPainter
,QPaintDevice
, andQPaintEngine
classes.
QPainter
is used to perform drawing operations,QPaintDevice
is an abstraction of a two-dimensional space that can be painted on using aQPainter
, andQPaintEngine
provides the interface that the painter uses to draw onto different types of devices. TheQPaintEngine
class is used internally byQPainter
andQPaintDevice
, and is hidden from application programmers unless they create their own device type.The main benefit of this approach is that all painting follows the same painting pipeline making it easy to add support for new features and providing default implementations for unsupported ones.
Topics¶
Classes for Painting¶
These classes provide support for painting onto a paint device.
PySide2.QtGui.QBitmap
The QBitmap class provides monochrome (1-bit depth) pixmaps.
PySide2.QtGui.QIcon
The QIcon class provides scalable icons in different modes and states.
PySide2.QtGui.QIconEngine
The QIconEngine class provides an abstract base class for QIcon renderers.
PySide2.QtGui.QImage
The QImage class provides a hardware-independent image representation that allows direct access to the pixel data, and can be used as a paint device.
PySide2.QtGui.QImageReader
The QImageReader class provides a format independent interface for reading images from files or other devices.
PySide2.QtGui.QImageWriter
The QImageWriter class provides a format independent interface for writing images to files or other devices.
PySide2.QtGui.QPictureIO
The QPictureIO class contains parameters for loading and saving pictures.
PySide2.QtGui.QPixmap
The QPixmap class is an off-screen image representation that can be used as a paint device.
PySide2.QtGui.QGenericMatrix
The QGenericMatrix class is a template class that represents a NxM transformation matrix with N columns and M rows.
PySide2.QtGui.QVector2D
The QVector2D class represents a vector or vertex in 2D space.
PySide2.QtGui.QBrush
The QBrush class defines the fill pattern of shapes drawn by QPainter.
PySide2.QtGui.QGradient
The QGradient class is used in combination with QBrush to specify gradient fills.
PySide2.QtGui.QLinearGradient
The QLinearGradient class is used in combination with QBrush to specify a linear gradient brush.
PySide2.QtGui.QRadialGradient
The QRadialGradient class is used in combination with QBrush to specify a radial gradient brush.
PySide2.QtGui.QConicalGradient
The QConicalGradient class is used in combination with QBrush to specify a conical gradient brush.
PySide2.QtGui.QColor
The QColor class provides colors based on RGB, HSV or CMYK values.
PySide2.QtGui.QColorSpace
The QColorSpace class provides a color space abstraction.
QColorTransform
The QColorTransform class is a transformation between color spaces.
PySide2.QtGui.QMatrix
The QMatrix class specifies 2D transformations of a coordinate system.
PySide2.QtGui.QPagedPaintDevice
The QPagedPaintDevice class represents a paint device that supports multiple pages.
PySide2.QtGui.QPaintDevice
The QPaintDevice class is the base class of objects that can be painted on with QPainter.
PySide2.QtGui.QPaintEngine
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a given platform.
PySide2.QtGui.QPainter
The QPainter class performs low-level painting on widgets and other paint devices.
PySide2.QtGui.QPainterPath
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be constructed and reused.
PySide2.QtGui.QPainterPathStroker
The QPainterPathStroker class is used to generate fillable outlines for a given painter path.
PySide2.QtGui.QPdfWriter
The QPdfWriter class is a class to generate PDFs that can be used as a paint device.
PySide2.QtGui.QPen
The QPen class defines how a QPainter should draw lines and outlines of shapes.
PySide2.QtGui.QPolygon
The QPolygon class provides a vector of points using integer precision.
PySide2.QtGui.QPolygonF
The QPolygonF class provides a vector of points using floating point precision.
PySide2.QtGui.QRegion
The QRegion class specifies a clip region for a painter.
QRgba64
The QRgba64 struct contains a 64-bit RGB color.
PySide2.QtGui.QTransform
The QTransform class specifies 2D transformations of a coordinate system.
PySide2.QtGui.QFont
The QFont class specifies a query for a font used for drawing text.
PySide2.QtGui.QFontMetrics
The QFontMetrics class provides font metrics information.
PySide2.QtGui.QFontMetricsF
The QFontMetricsF class provides font metrics information.
QSupportedWritingSystems
The QSupportedWritingSystems class is used when registering fonts with the internal Qt fontdatabase.
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they are rendered
PySide2.QtCore.QLine
The QLine class provides a two-dimensional vector using integer precision.
PySide2.QtCore.QLineF
The QLineF class provides a two-dimensional vector using floating point precision.
PySide2.QtCore.QMargins
The QMargins class defines the four margins of a rectangle.
PySide2.QtCore.QMarginsF
The QMarginsF class defines the four margins of a rectangle.
PySide2.QtCore.QPoint
The QPoint class defines a point in the plane using integer precision.
PySide2.QtCore.QPointF
The QPointF class defines a point in the plane using floating point precision.
PySide2.QtCore.QRect
The QRect class defines a rectangle in the plane using integer precision.
PySide2.QtCore.QRectF
The QRectF class defines a rectangle in the plane using floating point precision.
PySide2.QtCore.QSize
The QSize class defines the size of a two-dimensional object using integer point precision.
PySide2.QtCore.QSizeF
The QSizeF class defines the size of a two-dimensional object using floating point precision.
PySide2.QtSvg.QSvgGenerator
The QSvgGenerator class provides a paint device that is used to create SVG drawings.
PySide2.QtSvg.QSvgRenderer
The QSvgRenderer class is used to draw the contents of SVG files onto paint devices.
PySide2.QtSvg.QSvgWidget
The QSvgWidget class provides a widget that is used to display the contents of Scalable Vector Graphics (SVG) files.
The QPixmapFilter class provides the basic functionality for pixmap filter classes. Pixmap filter can be for example colorize or blur.
The QPixmapConvolutionFilter class provides convolution filtering for pixmaps.
The QPixmapColorizeFilter class provides colorizing filtering for pixmaps.
The QPixmapDropShadowFilter class is a convenience class for drawing pixmaps with drop shadows.
PySide2.QtWidgets.QStylePainter
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
PySide2.QtWidgets.QColormap
The QColormap class maps device independent QColors to device dependent pixel values.
© 2022 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.