このページでは

Matrix4x4 QML Type

Item に 4x4 変換行列を適用する方法を提供します。詳細...

Import Statement: import QtQuick

プロパティ

詳細な説明

Matrix4x4 タイプは、4x4 行列を用いてItem に変換を適用する方法を提供します。

これにより、4x4行列で表される単一の変換を用いて、回転、拡大縮小、平行移動、およびせん断を組み合わせることが可能です。

次の例では、Rectangleを45度(PI/4)回転させています:

Rectangle {
    width: 100
    height: 100
    color: "red"

    transform: Matrix4x4 {
        property real a: Math.PI / 4
        matrix: Qt.matrix4x4(Math.cos(a), -Math.sin(a), 0, 0,
                             Math.sin(a),  Math.cos(a), 0, 0,
                             0,           0,            1, 0,
                             0,           0,            0, 1)
    }
}

プロパティのドキュメント

matrix : matrix4x4

の変換に使用される4×4行列Item

© 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.