In questa pagina

Matrix4x4 QML Type

Consente di applicare una matrice di trasformazione 4x4 a un oggetto di tipo ` Item`. Altro...

Import Statement: import QtQuick

Proprietà

Descrizione dettagliata

Il tipo Matrix4x4 consente di applicare una trasformazione a un'Item e tramite una matrice 4x4.

Consente di combinare rotazione, ridimensionamento, traslazione e inclinazione utilizzando un'unica trasformazione fornita in una matrice 4x4.

L'esempio seguente ruota un rettangolo di 45 gradi (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)
    }
}

Documentazione delle proprietà

matrix : matrix4x4

matrice 4x4 che verrà utilizzata nella trasformazione di un 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.