aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml
blob: 44e243b00fe46fd3e24facb193867f79bffa0585 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import QtQuick 2.9
import Qt.labs.pathitem 1.0

Item {
    width: 320
    height: 480

    PathItem {
        enableVendorExtensions: false

        anchors.fill: parent

        VisualPath {
            strokeWidth: 1
            strokeColor: "red"
            fillColor: "transparent"
            Path {
                PathLine { x: 50; y: 50 }
            }
        }
        VisualPath {
            strokeWidth: 2
            strokeColor: "blue"
            fillColor: "transparent"
            Path {
                startX: 20
                PathLine { x: 70; y: 50 }
            }
        }
        VisualPath {
            strokeWidth: 3
            strokeColor: "green"
            fillColor: "transparent"
            Path {
                startX: 40
                PathLine { x: 90; y: 50 }
            }
        }
        VisualPath {
            strokeWidth: 4
            strokeColor: "yellow"
            fillColor: "transparent"
            Path {
                startX: 60
                PathLine { x: 110; y: 50 }
            }
        }
        VisualPath {
            strokeWidth: 5
            strokeColor: "black"
            fillColor: "transparent"
            strokeStyle: VisualPath.DashLine
            Path {
                startX: 80
                PathLine { x: 130; y: 50 }
            }
        }

        VisualPath {
            strokeWidth: 20
            strokeColor: "gray"
            fillColor: "transparent"
            capStyle: VisualPath.RoundCap
            Path {
                startX: 120; startY: 20
                PathLine { x: 200; y: 100 }
            }
        }

        VisualPath {
            strokeColor: "black"
            strokeWidth: 16
            fillColor: "transparent"
            capStyle: VisualPath.RoundCap
            joinStyle: VisualPath.BevelJoin
            Path {
                startX: 20
                startY: 100
                PathLine { x: 120; y: 200 }
                PathLine { x: 50; y: 200 }
            }
        }
        VisualPath {
            strokeColor: "black"
            strokeWidth: 16
            fillColor: "transparent"
            capStyle: VisualPath.RoundCap
            joinStyle: VisualPath.MiterJoin
            Path {
                startX: 150
                startY: 100
                PathLine { x: 250; y: 200 }
                PathLine { x: 180; y: 200 }
            }
        }
        VisualPath {
            strokeColor: "black"
            strokeWidth: 16
            fillColor: "transparent"
            capStyle: VisualPath.RoundCap
            joinStyle: VisualPath.RoundJoin
            Path {
                startX: 270
                startY: 100
                PathLine { x: 310; y: 200 }
                PathLine { x: 280; y: 200 }
            }
        }
    }
}