Paint System
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.
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
- Paint Devices and Backends
- Drawing and Filling
- Coordinate System
- Reading and Writing Image Files
Classes for Painting
These classes provide support for painting onto a paint device.
Template class that represents a NxM transformation matrix with N columns and M rows | |
Defines the four margins of a rectangle | |
Defines the four margins of a rectangle | |
Struct contains a 64-bit RGB color | |
Convenience class for drawing QStyle elements inside a widget |