-
Notifications
You must be signed in to change notification settings - Fork 1
/
MyScatterWidget.kv
70 lines (58 loc) · 1.65 KB
/
MyScatterWidget.kv
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
#:kivy 1.0
<MyWidgets>:
BoxLayout:
id: blWids
size: root.size
orientation: 'vertical'
<MyScatterWidgetOnScatter>:
canvas:
Color:
rgba: 0.5, .0, .5,.3
Rectangle:
size: self.size
canvas.after:
Color:
rgba: 0.0, .5, .0,.1
Rectangle:
pos: self.pos
size: self.bbox[1]
<MyScatterForLater>:
canvas:
Color:
rgb: 0, 1, 0
Line:
points: [self.x, self.top, self.right, self.top]
Line:
points: [self.x, self.y, self.x, self.top]
Line:
points: [self.center_x, self.y, self.center_x, self.top]
Line:
points: [self.x, self.center_y, self.right, self.center_y]
Line:
points: [self.center[0], self.center[1], self.right, self.top]
BoxLayout:
size: root.size
orientation: 'vertical'
FloatLayout:
id: bl_sca
canvas.before:
Translate:
xy: 200 ,200
Label:
text: 'Position\n' + str(root.pos)
text_size: (root.width, None)
Label:
text: 'Size\n' + str(root.size)
text_size: (root.width, None)
Label:
text: 'Center\n' + str(root.center)
text_size: (root.width, None)
Label:
text: 'Bounding Box\n' + str(root.bbox)
text_size: (root.width, None)
Label:
text: 'Top\n' + str(root.top)
text_size: (root.width, None)
Label:
text: 'Right\n' + str(root.right)
text_size: (root.width, None)