当前位置:编程学习 > wap >>

[简单了解] Qt4.8的 Paint System (未完)

Qt的描画系统(paint system)允许用户使用相同的API在屏幕或者打印设备上进行描画,主要是使用了QPainter, QPaintDevice, and QPaintEngine的类。
QPainter主要是执行描画动作的,QPaintDevice 是一个抽象的2维空间,用于QPainter进行描画。QPaintEngine 提供的接口在不同类型的设备上进行描画。QPaintEngine被QPainter 和QPaintDevice 进行内部调用。它对Qt的开发者来说,是隐藏的,除非你想创建你自己独有的设备类型。

这样做最大的好处是,所有的描画都采用同样的描画基准(painting pipeline)。方便与添加新的机能或者,采用默认实现不支持的动作。

描画类
目前支持如下的类,对设备进行描画。
QBitmap 单色(1位深)的位图
QBrush 定义QPainter描画的填充图案
QColor 基于RGB,HSV 和 CMYK 的颜色
QColormap 将设备独立QColors映射为,设备依赖的像素值
QConicalGradient 将QBrush与指定的倾角刷合并(a conical gradient brush).
QDirectPainter 在嵌入式Linux中Qt直接访问底层硬件。
QFont 指定文字描画是的字体
QFontMetrics 指定字体公制(metrics)信息
QFontMetricsF 指定字体公制(metrics)信息 
QGenericMatrix 表示一个型为NxM转换矩阵的模板类。N 列数 M 行数
QGradient 合并QBrush与指定的梯度填充。
QIcon 在不同模式和状态中,可缩当的Icons类
QIconEngine QIcon渲染的抽象基类
QIconEngineV2 QIcon渲染的抽象基类
QImage 设备独立图像描画,允许直接访问像素数据,可以作为一个描画设备使用。
QImageReader 格式化独立接口,用于读取文件或设备中的图像
QImageWriter 格式化独立接口,用于写入文件或设备中的图像
QLine 2维矢量线。精度为整数
QLineF 2维矢量线。精度为浮点数据
QLinearGradient 合并QBrush与制定的线梯度刷子
QMargins 定义矩形的四个空白
QMovie 使用QImageReader播放电影采用的快捷的类
QPaintDevice 可以被描画的设备类
QPaintEngine QPainter向给定平台的给定设备上进行描画是的抽象定义
QPainter 执行针对Widgets和其他描画设备上的低级描画动作
QPainterPath 描画动作的容器,使能图形的构建和重用
QPainterPathStroker 对于给定的描画路径,创建一个可填充的外形
QPalette Contains color groups for each widget state
QPen Defines how a QPainter should draw lines and outlines of shapes
QPicture Paint device that records and replays QPainter commands
QPixmap Off-screen image representation that can be used as a paint device
QPixmapCache Application-wide cache for pixmaps
QPlatformFontDatabase Makes it possible to customize how fonts are discovered and how they are rendered
QPlatformWindowFormat Specifies the display format of an OpenGL rendering context and if possible attributes of the corresponding QPlatformWindow
QPoint Defines a point in the plane using integer precision
QPointF Defines a point in the plane using floating point precision
QPolygon Vector of points using integer precision
QPolygonF Vector of points using floating point precision
QRadialGradient Used in combination with QBrush to specify a radial gradient brush
QRect Defines a rectangle in the plane using integer precision
QRectF Defines a rectangle in the plane using floating point precision
QRegion Specifies a clip region for a painter
QSize Defines the size of a two-dimensional object using integer point precision
QSizeF Defines the size of a two-dimensional object using floating point precision
QStylePainter Convenience class for drawing QStyle elements inside a widget
QSupportedWritingSystems Used when registering fonts with the internal Qt fontdatabase
QSvgGenerator Paint device that is used to create SVG drawings
QSvgRenderer Used to draw the contents of SVG files onto paint devices
QSvgWidget Widget that is used to display the contents of Scalable Vector Graphics (SVG) files
QSymbianGraphicsSystemHelper QTransform
Specifies 2D transformations of a coordinate system
QVector2D Represents a vector or vertex in 2D space
补充:移动开发 ,  Qt
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,