glimmer-dsl-libui 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/examples/area_gallery.rb +15 -15
- data/examples/area_gallery2.rb +35 -36
- data/examples/area_gallery3.rb +15 -15
- data/examples/area_gallery4.rb +35 -35
- data/glimmer-dsl-libui.gemspec +0 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43de106828bf48e1f04b2257f20ffb4248d5b65401accade19826fdf7cb851af
|
4
|
+
data.tar.gz: 0247ccd9451013b36972f44e9512337f8a1b275536a8dfc047534c0320720e69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c429f9ca63a7a4d0e236d9299ca9810454091865e2a22395aa6fe1aaeb0b3637a61fa6bf368f830c60098fe697ee8b54dba68db67ab0593e3d58f7420ffa9503
|
7
|
+
data.tar.gz: 11f519d6473637baa392f65478f86e60c6643bf782738bd680a35739cf94b236f981c349c60451ac69b2531ed51f1b9b88b0c326a065ac71b608c16f7095d9d1
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.5
|
data/examples/area_gallery.rb
CHANGED
@@ -4,6 +4,21 @@ include Glimmer
|
|
4
4
|
|
5
5
|
window('Area Gallery', 400, 400) {
|
6
6
|
area {
|
7
|
+
path { # declarative stable path (explicit path syntax for multiple shapes sharing attributes)
|
8
|
+
square(0, 0, 100)
|
9
|
+
square(100, 100, 400)
|
10
|
+
|
11
|
+
fill r: 102, g: 102, b: 204
|
12
|
+
}
|
13
|
+
|
14
|
+
path { # declarative stable path (explicit path syntax for multiple shapes sharing attributes)
|
15
|
+
rectangle(0, 100, 100, 400)
|
16
|
+
rectangle(100, 0, 400, 100)
|
17
|
+
|
18
|
+
# linear gradient (has x0, y0, x1, y1, and stops)
|
19
|
+
fill x0: 10, y0: 10, x1: 350, y1: 350, stops: [{pos: 0.25, r: 204, g: 102, b: 204}, {pos: 0.75, r: 102, g: 102, b: 204}]
|
20
|
+
}
|
21
|
+
|
7
22
|
polygon(100, 100, 100, 400, 400, 100, 400, 400) { # declarative stable path (implicit path syntax for a single shape nested directly under area)
|
8
23
|
fill r: 202, g: 102, b: 104, a: 0.5
|
9
24
|
stroke r: 0, g: 0, b: 0
|
@@ -32,21 +47,6 @@ window('Area Gallery', 400, 400) {
|
|
32
47
|
stroke r: 0, g: 0, b: 0, thickness: 2
|
33
48
|
}
|
34
49
|
|
35
|
-
path { # declarative stable path (explicit path syntax for multiple shapes sharing attributes)
|
36
|
-
square(0, 0, 100)
|
37
|
-
square(100, 100, 400)
|
38
|
-
|
39
|
-
fill r: 102, g: 102, b: 204
|
40
|
-
}
|
41
|
-
|
42
|
-
path { # declarative stable path (explicit path syntax for multiple shapes sharing attributes)
|
43
|
-
rectangle(0, 100, 100, 400)
|
44
|
-
rectangle(100, 0, 400, 100)
|
45
|
-
|
46
|
-
# linear gradient (has x0, y0, x1, y1, and stops)
|
47
|
-
fill x0: 10, y0: 10, x1: 350, y1: 350, stops: [{pos: 0.25, r: 204, g: 102, b: 204}, {pos: 0.75, r: 102, g: 102, b: 204}]
|
48
|
-
}
|
49
|
-
|
50
50
|
text(161, 40, 100) { # declarative stable text
|
51
51
|
string('Area Gallery') {
|
52
52
|
font family: 'Arial', size: (OS.mac? ? 14 : 11)
|
data/examples/area_gallery2.rb
CHANGED
@@ -4,7 +4,41 @@ include Glimmer
|
|
4
4
|
|
5
5
|
window('Area Gallery', 400, 400) {
|
6
6
|
area {
|
7
|
-
|
7
|
+
path { # declarative stable path with explicit attributes (explicit path syntax for multiple shapes sharing attributes)
|
8
|
+
square {
|
9
|
+
x 0
|
10
|
+
y 0
|
11
|
+
length 100
|
12
|
+
}
|
13
|
+
|
14
|
+
square {
|
15
|
+
x 100
|
16
|
+
y 100
|
17
|
+
length 400
|
18
|
+
}
|
19
|
+
|
20
|
+
fill r: 102, g: 102, b: 204
|
21
|
+
}
|
22
|
+
|
23
|
+
path { # declarative stable path with explicit attributes (explicit path syntax for multiple shapes sharing attributes)
|
24
|
+
rectangle {
|
25
|
+
x 0
|
26
|
+
y 100
|
27
|
+
width 100
|
28
|
+
height 400
|
29
|
+
}
|
30
|
+
|
31
|
+
rectangle {
|
32
|
+
x 100
|
33
|
+
y 0
|
34
|
+
width 400
|
35
|
+
height 100
|
36
|
+
}
|
37
|
+
|
38
|
+
# linear gradient (has x0, y0, x1, y1, and stops)
|
39
|
+
fill x0: 10, y0: 10, x1: 350, y1: 350, stops: [{pos: 0.25, r: 204, g: 102, b: 204}, {pos: 0.75, r: 102, g: 102, b: 204}]
|
40
|
+
}
|
41
|
+
|
8
42
|
figure { # declarative stable path with explicit attributes (implicit path syntax for a single shape nested directly under area)
|
9
43
|
x 100
|
10
44
|
y 100
|
@@ -111,41 +145,6 @@ window('Area Gallery', 400, 400) {
|
|
111
145
|
stroke r: 0, g: 0, b: 0, thickness: 2
|
112
146
|
}
|
113
147
|
|
114
|
-
path { # declarative stable path with explicit attributes (explicit path syntax for multiple shapes sharing attributes)
|
115
|
-
square {
|
116
|
-
x 0
|
117
|
-
y 0
|
118
|
-
length 100
|
119
|
-
}
|
120
|
-
|
121
|
-
square {
|
122
|
-
x 100
|
123
|
-
y 100
|
124
|
-
length 400
|
125
|
-
}
|
126
|
-
|
127
|
-
fill r: 102, g: 102, b: 204
|
128
|
-
}
|
129
|
-
|
130
|
-
path { # declarative stable path with explicit attributes (explicit path syntax for multiple shapes sharing attributes)
|
131
|
-
rectangle {
|
132
|
-
x 0
|
133
|
-
y 100
|
134
|
-
width 100
|
135
|
-
height 400
|
136
|
-
}
|
137
|
-
|
138
|
-
rectangle {
|
139
|
-
x 100
|
140
|
-
y 0
|
141
|
-
width 400
|
142
|
-
height 100
|
143
|
-
}
|
144
|
-
|
145
|
-
# linear gradient (has x0, y0, x1, y1, and stops)
|
146
|
-
fill x0: 10, y0: 10, x1: 350, y1: 350, stops: [{pos: 0.25, r: 204, g: 102, b: 204}, {pos: 0.75, r: 102, g: 102, b: 204}]
|
147
|
-
}
|
148
|
-
|
149
148
|
text { # declarative stable text with explicit attributes
|
150
149
|
x 161
|
151
150
|
y 40
|
data/examples/area_gallery3.rb
CHANGED
@@ -5,6 +5,21 @@ include Glimmer
|
|
5
5
|
window('Area Gallery', 400, 400) {
|
6
6
|
area {
|
7
7
|
on_draw do |area_draw_params|
|
8
|
+
path { # dynamic path, added semi-declaratively inside on_draw block
|
9
|
+
square(0, 0, 100)
|
10
|
+
square(100, 100, 400)
|
11
|
+
|
12
|
+
fill r: 102, g: 102, b: 204
|
13
|
+
}
|
14
|
+
|
15
|
+
path { # dynamic path, added semi-declaratively inside on_draw block
|
16
|
+
rectangle(0, 100, 100, 400)
|
17
|
+
rectangle(100, 0, 400, 100)
|
18
|
+
|
19
|
+
# linear gradient (has x0, y0, x1, y1, and stops)
|
20
|
+
fill x0: 10, y0: 10, x1: 350, y1: 350, stops: [{pos: 0.25, r: 204, g: 102, b: 204}, {pos: 0.75, r: 102, g: 102, b: 204}]
|
21
|
+
}
|
22
|
+
|
8
23
|
polygon(100, 100, 100, 400, 400, 100, 400, 400) { # dynamic path, added semi-declaratively inside on_draw block
|
9
24
|
fill r: 202, g: 102, b: 104, a: 0.5
|
10
25
|
stroke r: 0, g: 0, b: 0
|
@@ -33,21 +48,6 @@ window('Area Gallery', 400, 400) {
|
|
33
48
|
stroke r: 0, g: 0, b: 0, thickness: 2
|
34
49
|
}
|
35
50
|
|
36
|
-
path { # dynamic path, added semi-declaratively inside on_draw block
|
37
|
-
square(0, 0, 100)
|
38
|
-
square(100, 100, 400)
|
39
|
-
|
40
|
-
fill r: 102, g: 102, b: 204
|
41
|
-
}
|
42
|
-
|
43
|
-
path { # dynamic path, added semi-declaratively inside on_draw block
|
44
|
-
rectangle(0, 100, 100, 400)
|
45
|
-
rectangle(100, 0, 400, 100)
|
46
|
-
|
47
|
-
# linear gradient (has x0, y0, x1, y1, and stops)
|
48
|
-
fill x0: 10, y0: 10, x1: 350, y1: 350, stops: [{pos: 0.25, r: 204, g: 102, b: 204}, {pos: 0.75, r: 102, g: 102, b: 204}]
|
49
|
-
}
|
50
|
-
|
51
51
|
text(161, 40, 100) { # dynamic text added semi-declaratively inside on_draw block
|
52
52
|
string('Area Gallery') {
|
53
53
|
font family: 'Arial', size: (OS.mac? ? 14 : 11)
|
data/examples/area_gallery4.rb
CHANGED
@@ -5,6 +5,41 @@ include Glimmer
|
|
5
5
|
window('Area Gallery', 400, 400) {
|
6
6
|
area {
|
7
7
|
on_draw do |area_draw_params|
|
8
|
+
path { # dynamic path, added semi-declaratively inside on_draw block
|
9
|
+
square {
|
10
|
+
x 0
|
11
|
+
y 0
|
12
|
+
length 100
|
13
|
+
}
|
14
|
+
|
15
|
+
square {
|
16
|
+
x 100
|
17
|
+
y 100
|
18
|
+
length 400
|
19
|
+
}
|
20
|
+
|
21
|
+
fill r: 102, g: 102, b: 204
|
22
|
+
}
|
23
|
+
|
24
|
+
path { # dynamic path, added semi-declaratively inside on_draw block
|
25
|
+
rectangle {
|
26
|
+
x 0
|
27
|
+
y 100
|
28
|
+
width 100
|
29
|
+
height 400
|
30
|
+
}
|
31
|
+
|
32
|
+
rectangle {
|
33
|
+
x 100
|
34
|
+
y 0
|
35
|
+
width 400
|
36
|
+
height 100
|
37
|
+
}
|
38
|
+
|
39
|
+
# linear gradient (has x0, y0, x1, y1, and stops)
|
40
|
+
fill x0: 10, y0: 10, x1: 350, y1: 350, stops: [{pos: 0.25, r: 204, g: 102, b: 204}, {pos: 0.75, r: 102, g: 102, b: 204}]
|
41
|
+
}
|
42
|
+
|
8
43
|
figure { # dynamic path, added semi-declaratively inside on_draw block
|
9
44
|
x 100
|
10
45
|
y 100
|
@@ -111,41 +146,6 @@ window('Area Gallery', 400, 400) {
|
|
111
146
|
stroke r: 0, g: 0, b: 0, thickness: 2
|
112
147
|
}
|
113
148
|
|
114
|
-
path { # dynamic path, added semi-declaratively inside on_draw block
|
115
|
-
square {
|
116
|
-
x 0
|
117
|
-
y 0
|
118
|
-
length 100
|
119
|
-
}
|
120
|
-
|
121
|
-
square {
|
122
|
-
x 100
|
123
|
-
y 100
|
124
|
-
length 400
|
125
|
-
}
|
126
|
-
|
127
|
-
fill r: 102, g: 102, b: 204
|
128
|
-
}
|
129
|
-
|
130
|
-
path { # dynamic path, added semi-declaratively inside on_draw block
|
131
|
-
rectangle {
|
132
|
-
x 0
|
133
|
-
y 100
|
134
|
-
width 100
|
135
|
-
height 400
|
136
|
-
}
|
137
|
-
|
138
|
-
rectangle {
|
139
|
-
x 100
|
140
|
-
y 0
|
141
|
-
width 400
|
142
|
-
height 100
|
143
|
-
}
|
144
|
-
|
145
|
-
# linear gradient (has x0, y0, x1, y1, and stops)
|
146
|
-
fill x0: 10, y0: 10, x1: 350, y1: 350, stops: [{pos: 0.25, r: 204, g: 102, b: 204}, {pos: 0.75, r: 102, g: 102, b: 204}]
|
147
|
-
}
|
148
|
-
|
149
149
|
text { # dynamic path, added semi-declaratively inside on_draw block
|
150
150
|
x 161
|
151
151
|
y 40
|
data/glimmer-dsl-libui.gemspec
CHANGED
Binary file
|