blob: ff9e1f7412ea48bcfc9a439e3f4bd333bce6d478 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
import QtQuick 2.2
/*
The test verifies that batches of translucent items get split
into multiple batches when an item in them change opacity.
PixelPos R G B Error-tolerance
#base: 0 0 1.0 0.5 0.5 0.05
#base: 100 0 0.5 0.5 1.0 0.05
#base: 0 100 1.0 0.5 0.5 0.05
#base: 100 100 0.5 0.5 1.0 0.05
#final: 0 0 1.0 0.5 0.5 0.05
#final: 100 0 0.1 0.1 1.0 0.05
#final: 0 100 1.0 0.5 0.5 0.05
#final: 100 100 0.9 0.9 1.0 0.05
#samples: 8
*/
RenderTestBase {
Item {
Rectangle { id: redUnclipped; opacity: 0.5; width: 50; height: 50; color: "red" }
Rectangle { id: blueUnclipped; opacity: 0.5; width: 50; height: 50; color: "blue"; x: 100 }
}
Item {
clip: true;
y: 100
width: 200
height: 100
Rectangle { id: redClipped; opacity: 0.5; width: 50; height: 50; color: "red" }
Rectangle { id: blueClipped; opacity: 0.5; width: 50; height: 50; color: "blue"; x: 100 }
}
onEnterFinalStage: {
blueUnclipped.opacity = 0.9
blueClipped.opacity = 0.1
finalStageComplete = true;
}
}
|