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 , and QPaintEngine classes.

QPainter is used to perform drawing operations, QPaintDevice is an abstraction of a two-dimensional space that can be painted on using a QPainter , and QPaintEngine provides the interface that the painter uses to draw onto different types of devices. The QPaintEngine class is used internally by QPainter and QPaintDevice , and is hidden from application programmers unless they create their own device type.

../_images/paintsystem-core.png

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.

Classes for Painting

These classes provide support for painting onto a paint device.

QBitmap

QIcon

QIconEngine

QImage

QImageReader

QImageWriter

QPictureIO

QPixmap

QGenericMatrix

QVector2D

QBrush

QGradient

QLinearGradient

QRadialGradient

QConicalGradient

QColor

QMatrix

QPagedPaintDevice

QPaintDevice

QPaintEngine

QPainter

QPainterPath

QPainterPathStroker

QPdfWriter

QPen

QPolygon

QPolygonF

QRegion

QRgba64

QTransform

QFont

QFontMetrics

QFontMetricsF

QSupportedWritingSystems

QPlatformFontDatabase

QLine

QLineF

QMargins

QMarginsF

QPoint

QPointF

QRect

QRectF

QSize

QSizeF

QSvgGenerator

QSvgRenderer

QSvgWidget

QPixmapFilter

QPixmapConvolutionFilter

QPixmapColorizeFilter

QPixmapDropShadowFilter

QStylePainter

QColormap