描繪範例

Qt's painting system is able to render vector graphics, images, and outline font-based text with sub-pixel accuracy using anti-aliasing to improve rendering quality.

These examples show the most common techniques that are used when painting with Qt, from basic concepts such as drawing simple primitives to the use of transformations.

仿射變換

Demonstrates how affine transformations in QPainter works.

基本繪製範例

The Basic Drawing example shows how to display basic graphics primitives in a variety of styles using the QPainter class.

閤成模式

Demonstrates how Composition Modes work in QPainter.

同心圓範例

Demonstrates the improved quality that antialiasing and floating point precision gives.

字體采樣器範例

The Font Sampler example shows how to preview and print multi-page documents.

漸變

Shows how gradients can be used with QPainter.

圖像閤成範例

Shows how composition modes work in QPainter.

描繪器路徑範例

The Painter Paths example shows how painter paths can be used to beuild complex shapes for rendering.

路徑描邊

The Path Stroking example shows various types of pens that can be used with QPainter.

變換範例

The Transformations example shows how transformations influence the way that QPainter renders graphics primitives.

嚮量變形

Demonstrates how to manipulate the elements of a QPainterPath.