aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickflipable/data/flip-y-axis-flipable.qml
blob: 1b6a3f50184a29c38ce0a80c1b7fcb32dbd9856c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (C) 2023 UnionTech Software Technology Co., Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

import QtQuick

Flipable {
    id: flipable

    property real angle: 0
    width: 3840 // wider than 1024 * 2: part of it goes behind the camera while flipping
    height: 2160

    front: Rectangle {
        width: parent.width
        height: parent.height
        color: "red"
        anchors.centerIn: parent
    }
    back: Rectangle {
        color: "yellow"
        anchors.centerIn: parent
        width: parent.width
        height: parent.height
    }
    transform: Rotation {
        id: rotation
        origin.x: flipable.width / 2
        origin.y: flipable.height / 2
        axis.x: 0; axis.y: 1; axis.z: 0
        angle: flipable.angle
    }
}