aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml
blob: 56b581bbcb6fb854e016ca28fe075d6c72b3f008 (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
111
112
113
114
115
116
117
118
119
120
import QtQuick 2.9
import QtQuick.Shapes 1.0

Item {
    width: 320
    height: 480

    Column {
        Item {
            width: 200
            height: 100

            Repeater {
                model: 2
                PathItem {
                    anchors.fill: parent
                    enableVendorExtensions: false

                    VisualPath {
                        fillColor: "lightBlue"
                        strokeColor: model.index === 0 ? "red" : "blue"
                        strokeStyle: VisualPath.DashLine
                        strokeWidth: 4

                        Path {
                            startX: 4; startY: 4
                            PathArc {
                                id: arc
                                x: 96; y: 96
                                radiusX: 100; radiusY: 100
                                direction: model.index === 0 ? PathArc.Clockwise : PathArc.Counterclockwise
                            }
                        }
                    }
                }
            }
        }

        Item {
            width: 200
            height: 100

            Repeater {
                model: 2
                PathItem {
                    anchors.fill: parent
                    enableVendorExtensions: false

                    VisualPath {
                        fillColor: "green"
                        strokeColor: model.index === 0 ? "red" : "blue"
                        strokeStyle: VisualPath.DashLine
                        strokeWidth: 4

                        Path {
                            startX: 50; startY: 100
                            PathArc {
                                x: 100; y: 150
                                radiusX: 50; radiusY: 50
                                useLargeArc: model.index === 1
                            }
                        }
                    }
                }
            }
        }

        Item {
            width: 200
            height: 100

            Repeater {
                model: 2
                PathItem {
                    anchors.fill: parent
                    enableVendorExtensions: false

                    VisualPath {
                        fillColor: "gray"
                        strokeColor: model.index === 0 ? "red" : "blue"
                        strokeStyle: VisualPath.DashLine
                        strokeWidth: 4

                        Path {
                            startX: 50; startY: 150
                            PathArc {
                                x: 150; y: 150
                                radiusX: 50; radiusY: 20
                                xAxisRotation: model.index === 0 ? 0 : 45
                            }
                        }
                    }
                }
            }

            Repeater {
                model: 2
                PathItem {
                    anchors.fill: parent
                    enableVendorExtensions: false

                    VisualPath {
                        fillColor: "lightGray"
                        strokeColor: model.index === 0 ? "red" : "blue"

                        Path {
                            startX: 50; startY: 150
                            PathArc {
                                x: 150; y: 150
                                radiusX: 50; radiusY: 20
                                xAxisRotation: model.index === 0 ? 0 : 45
                                direction: PathArc.Counterclockwise
                            }
                        }
                    }
                }
            }
        }
    }
}