4.1QPainter绘图讲解

4.QPainter绘图讲解
4.1 初识QPainter
4.2 QPainter的接口介绍
4.2.1 QPainter中的画笔、画刷介绍
4.2.2 QPainter绘制接口
4.2.3 QPainter的save和restore
4.2.4 QPainter的平移、放缩、旋转效果讲解


4.QPainter绘图讲解

4.1 初识QPainter

今天给大家讲解的是Qt中的绘制基础,我们知道Qt中绘图使用的是QPainter类,那么QPainter到底可以做什么呢,先看下Qt文档中的相关叙述。

The QPainter class performs low-level painting on widgets and other paint devices.
QPainter provides highly optimized functions to do most of the drawing GUI programs require. It can draw everything from simple lines to complex shapes like pies and chords. It can also draw aligned text and pixmaps. Normally, it draws in a “natural” coordinate system, but it can also do view and world transformation. QPainter can operate on any object that inherits the QPaintDevice class.

QPainter可以在部件或者其他可绘制的设备上进行底层级别的绘制,且提供了大量的接口以满足大多数Gui程序中绘制的需要ÿ

你可能感兴趣的:(Qt基础内容教程,1024程序员节,qt,QPainter,Qt绘图)