aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickpathitem/data/pathitem4.qml
blob: 74f0ca740829351b3e91a9c4535746f27e5b06ed (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
import QtQuick 2.9

Item {
    width: 200
    height: 150

    PathItem {
        enableVendorExtensions: false
        objectName: "pathItem"
        anchors.fill: parent

        VisualPath {
            strokeColor: "red"
            fillColor: "green"
            Path {
                startX: 40; startY: 30
                PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
                PathLine { x: 150; y: 80 }
                PathQuad { x: 160; y: 30; controlX: 200; controlY: 80 }
            }
        }

        VisualPath {
            strokeWidth: 10
            fillColor: "transparent"
            strokeColor: "blue"
            Path {
                startX: 40; startY: 30
                PathCubic { x: 50; y: 80; control1X: 0; control1Y: 80; control2X: 100; control2Y: 100 }
            }
        }

        VisualPath {
            fillGradient: PathLinearGradient {
                y2: 150
                PathGradientStop { position: 0; color: "yellow" }
                PathGradientStop { position: 1; color: "green" }
            }

            Path {
                startX: 10; startY: 100
                PathArc {
                    relativeX: 50; y: 100
                    radiusX: 25; radiusY: 25
                }
                PathArc {
                    relativeX: 50; y: 100
                    radiusX: 25; radiusY: 35
                }
                PathArc {
                    relativeX: 50; y: 100
                    radiusX: 25; radiusY: 60
                }
                PathArc {
                    relativeX: 50; y: 100
                    radiusX: 50; radiusY: 120
                }
            }
        }
    }
}