Paint System
Qt的绘图系统支持在屏幕和打印设备上使用相同的API, 主要基于 QPainter, QPaintDevice, QPaintEngine.
QPainter 执行绘图操作, QPaintDevice 是 QPainter绘图的二维抽象空间类, QPaintEngine 提供不同类型设备的绘制接口. QPaintEngine 由 QPainter 和 QPaintDevice内部使用, 对开发人员隐藏, 除非他们创建自己的设备类型.
这种方法的主要好处是所有绘制都遵循相同的绘制管道, 从而可以轻松添加对新功能的支持, 并为不受支持的功能提供默认实现.
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.
Two-dimensional vector using integer precision | |
Two-dimensional vector using floating point precision | |
Defines the four margins of a rectangle | |
Defines the four margins of a rectangle | |
Defines a point in the plane using integer precision | |
Defines a point in the plane using floating point precision | |
Defines a rectangle in the plane using integer precision | |
Defines a rectangle in the plane using floating point precision | |
Defines the size of a two-dimensional object using integer point precision | |
Defines the size of a two-dimensional object using floating point precision | |
Monochrome (1-bit depth) pixmaps | |
Scalable icons in different modes and states | |
Abstract base class for QIcon renderers | |
Hardware-independent image representation that allows direct access to the pixel data, and can be used as a paint device | |
Format independent interface for reading images from files or other devices | |
Format independent interface for writing images to files or other devices | |
Off-screen image representation that can be used as a paint device | |
Template class that represents a NxM transformation matrix with N columns and M rows | |
Represents a vector or vertex in 2D space | |
Defines the fill pattern of shapes drawn by QPainter | |
Used in combination with QBrush to specify a conical gradient brush | |
Used in combination with QBrush to specify gradient fills | |
Used in combination with QBrush to specify a linear gradient brush | |
Used in combination with QBrush to specify a radial gradient brush | |
Colors based on RGB, HSV or CMYK values | |
Represents a paintdevice that supports multiple pages | |
The base class of objects that can be painted on with QPainter | |
Abstract definition of how QPainter draws to a given device on a given platform | |
Performs low-level painting on widgets and other paint devices | |
Container for painting operations, enabling graphical shapes to be constructed and reused | |
Used to generate fillable outlines for a given painter path | |
Class to generate PDFs that can be used as a paint device | |
Defines how a QPainter should draw lines and outlines of shapes | |
Vector of points using integer precision | |
Vector of points using floating point precision | |
Specifies a clip region for a painter | |
Struct contains a 64-bit RGB color | |
Specifies 2D transformations of a coordinate system | |
Specifies a font used for drawing text | |
Font metrics information | |
Font metrics information | |
Makes it possible to customize how fonts are discovered and how they are rendered | |
Used when registering fonts with the internal Qt fontdatabase | |
Convenience class for drawing QStyle elements inside a widget | |
Maps device independent QColors to device dependent pixel values | |
Paint device that is used to create SVG drawings | |
Used to draw the contents of SVG files onto paint devices | |
Widget that is used to display the contents of Scalable Vector Graphics (SVG) files |