-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAntBox.qml
80 lines (78 loc) · 2 KB
/
AntBox.qml
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
//
// (C) kuiash.com 2019
// "Do what thou wilt shall be the whole of the law"
//
import QtQuick 2.0
import QtQuick.Shapes 1.11
Item {
id: root
property int radius: 5
property int pattern: 2
property int speed: 400
property string color: '#fff'
Shape {
NumberAnimation {
target: shapePath
property: "dashOffset"
duration: root.speed
from:0
to: root.pattern * 2
loops: Animation.Infinite
running: true
}
ShapePath {
id: shapePath
fillColor: "transparent"
strokeStyle: ShapePath.DashLine
dashPattern: [
root.pattern,
root.pattern
]
strokeWidth: root.pattern * 2
strokeColor: root.color
joinStyle: ShapePath.RoundJoin
startX: 0
startY: root.radius
PathArc {
x: root.radius
y: 0
radiusX: root.radius
radiusY: root.radius
}
PathLine {
x: root.width - root.radius
y: 0
}
PathArc {
x: root.width
y: root.radius
radiusX: root.radius
radiusY: root.radius
}
PathLine {
x: root.width
y: root.height - root.radius
}
PathArc {
x: root.width - root.radius
y: root.height
radiusX: root.radius
radiusY: root.radius
}
PathLine {
x: root.radius
y: root.height
}
PathArc {
x: 0
y: root.height - root.radius
radiusX: root.radius
radiusY: root.radius
}
PathLine {
x: 0
y: root.radius
}
}
}
}