-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClockHand.qml
More file actions
39 lines (39 loc) · 1.14 KB
/
ClockHand.qml
File metadata and controls
39 lines (39 loc) · 1.14 KB
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
import QtQuick 2.0
import QtQuick.Shapes 1.2
// Face:
//
// /\
// / \
// / \
// / \
// / \
// /__________\
//
Shape {
id:handRoot
property real angleRotate: 0
property color bgColorStart: "#7c4393"
property color bgColorEnd: "#E00033"
transform: Rotation {
origin.x:handRoot.width/2 ;
origin.y:handRoot.height;
angle: handRoot.angleRotate
}
ShapePath {
strokeWidth: 2
strokeColor: "black"
joinStyle:ShapePath.RoundJoin
fillGradient: LinearGradient {
x1: handRoot.width/2; y1: 0
x2: handRoot.width; y2: handRoot.height/2
GradientStop { position: 0; color: handRoot.bgColorStart }
GradientStop { position: 1; color: handRoot.bgColorEnd}
}
strokeStyle: ShapePath.DashLine
dashPattern: [ 1, 2]
startX: 0; startY: handRoot.height
PathLine { x: handRoot.width/2; y: 0}
PathLine { x: handRoot.width; y: handRoot.height}
PathLine { x: 0; y: handRoot.height }
}
}