アフィン変換

QPainter におけるアフィン変換の仕組みを解説します。

画像に対するアフィン変換の実演

QPainter を使用して描画されたあらゆる種類のグラフィックスに対して、変換を行うことができます。ベクターグラフィックス、画像、テキストの表示に使用される変換は、以下の方法で調整できます:

  • 各図形の中央にある赤い円をドラッグすると、図形が新しい位置に移動します。
  • 移動した赤い円をドラッグすると、現在の描画が中心の円を軸に回転します。回転は、Rotate のスライダーでも制御できます。
  • 拡大・縮小は、「Scale 」スライダーで制御します。
  • 各図形は、「Shear 」スライダーを使用してせん断することができます。

サンプルプロジェクト @ code.qt.io

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.