2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
/*!
|
2012-09-05 14:53:23 +00:00
|
|
|
\example painting/affine
|
2011-04-27 10:05:43 +00:00
|
|
|
\title Affine Transformations
|
2024-01-15 14:38:38 +00:00
|
|
|
\examplecategory {Graphics}
|
2012-11-30 12:21:35 +00:00
|
|
|
\ingroup examples-painting
|
2023-08-23 08:29:16 +00:00
|
|
|
\brief Demonstrates how affine transformations in QPainter work.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-11-28 16:04:12 +00:00
|
|
|
\brief In this example we show Qt's ability to perform affine transformations
|
2011-04-27 10:05:43 +00:00
|
|
|
on painting operations.
|
|
|
|
|
|
|
|
\image affine-demo.png
|
|
|
|
|
|
|
|
Transformations can be performed on any kind of graphics drawn using QPainter.
|
|
|
|
The transformations used to display the vector graphics, images, and text can be adjusted
|
|
|
|
in the following ways:
|
|
|
|
|
|
|
|
\list
|
2012-03-01 14:28:31 +00:00
|
|
|
\li Dragging the red circle in the centre of each drawing moves it to a new position.
|
|
|
|
\li Dragging the displaced red circle causes the current drawing to be rotated about the
|
2012-08-01 12:36:13 +00:00
|
|
|
central circle. Rotation can also be controlled with the \uicontrol Rotate slider.
|
|
|
|
\li Scaling is controlled with the \uicontrol Scale slider.
|
|
|
|
\li Each drawing can be sheared with the \uicontrol Shear slider.
|
2011-04-27 10:05:43 +00:00
|
|
|
\endlist
|
|
|
|
*/
|