内容表

上一话题

描绘类

下一话题

描绘设备和后端

描绘系统

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 ,和 QPaintEngine 类。

QPainter 用于履行绘制操作, QPaintDevice is an abstraction of a two-dimensional space that can be painted on using a QPainter ,和 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.

用于描绘的类

这些类提供在描绘设备上进行描绘的支持。

PySide2.QtGui.QBitmap

QBitmap 类提供单色 (1 位深度) 像素图。

PySide2.QtGui.QIcon

QIcon 类提供在不同模式和状态下的可缩放图标。

PySide2.QtGui.QIconEngine

The QIconEngine class provides an abstract base class for QIcon renderers.

PySide2.QtGui.QImage

QImage 类提供独立于硬件的图像表示 (允许直接访问像素数据,且可以被用作描绘设备)。

PySide2.QtGui.QImageReader

QImageReader 类提供用于从文件或其它设备读取图像的格式独立接口。

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

QPixmap 类是可以用作描绘设备的离屏图像表示。

PySide2.QtGui.QGenericMatrix

QGenericMatrix 类是表示具有 N 列和 M 行的 NxM 变换矩阵的模板类。

PySide2.QtGui.QVector2D

QVector2D 类表示 2D 空间中的向量或顶点。

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

QColor 类提供基于 RGB、HSV 或 CMYK 值的颜色。

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

QPagedPaintDevice 类表示支持多个页面的描绘设备。

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

QPainter 类在小部件和其它绘画设备上履行低级描绘。

PySide2.QtGui.QPainterPath

QPainterPath 类提供用于描绘操作的容器,使图形形状能够被构造和重用。

PySide2.QtGui.QPainterPathStroker

QPainterPathStroker 类用于生成给定描绘器路径的可填充轮廓。

PySide2.QtGui.QPdfWriter

QPdfWriter 类是生成可用作描绘设备的 PDF 的类。

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

QRegion 类为描绘器指定裁剪区域。

QRgba64

QRgba64 结构包含 64 位 RGB 颜色。

PySide2.QtGui.QTransform

QTransform 类指定坐标系统的 2D 变换。

PySide2.QtGui.QFont

QFont 类指定用于绘制文本的字体查询。

PySide2.QtGui.QFontMetrics

QFontMetrics 类提供字体规格信息。

PySide2.QtGui.QFontMetricsF

QFontMetricsF 类提供字体规格信息。

QSupportedWritingSystems

QSupportedWritingSystems 类被使用,当采用内部 Qt fontdatabase (字体数据库) 注册字体时。

The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they are rendered

PySide2.QtCore.QLine

QLine 类提供使用整数精度的 2D 向量。

PySide2.QtCore.QLineF

QLineF 类提供使用浮点精度的 2D 向量。

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

QPoint 类使用整数精度,定义平面点。

PySide2.QtCore.QPointF

QPointF 类使用浮点精度定义平面点。

PySide2.QtCore.QRect

QRect 类使用整数精度,定义平面矩形。

PySide2.QtCore.QRectF

QRectF 类使用浮点精度定义平面矩形。

PySide2.QtCore.QSize

QSize 类使用整数点精度,定义 2 维对象的尺寸。

PySide2.QtCore.QSizeF

QSizeF 类使用浮点精度定义 2D 对象的大小。

PySide2.QtSvg.QSvgGenerator

QSvgGenerator 类提供用于创建 SVG 绘制的描绘设备。

PySide2.QtSvg.QSvgRenderer

QSvgRenderer 类用于将 SVG 文件内容绘制到描绘设备上。

PySide2.QtSvg.QSvgWidget

QSvgWidget 类提供用于显示 SVG (可缩放矢量图形) 文件内容的 Widget。

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.