nyle 0.7.1 → 0.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98fb894b0df670d4987b952d424e3a9d3d0279fb97e4f074a23db75318b7e26a
4
- data.tar.gz: cc983b74f64805584372049038945e24c658d3a645e8473517bbcc896fb68ba0
3
+ metadata.gz: 874f7f0908c736a7ce019bbbb4ef5e051e467bbbd678e258e76dcd6b5007c19a
4
+ data.tar.gz: efe32f88f521412100b605a33569506665f346ff8e852e49c3d63fa779858155
5
5
  SHA512:
6
- metadata.gz: 983b3c340b11617cfb9e8d636fda9ccc1a36039bdf572bc6e7fe250aff722a2d283309ca23f6b54f3ba4fde01e8aa04227a2b27808d8fefc535a5268a2456019
7
- data.tar.gz: 3e8ec70297a649d70274784b86c27760c5cee3fcc2e61eb9b2653a4b90099cf2c4b44056a517235da6ffbc289daeeb9b4bf791a60111d8c30e0af91283fe9638
6
+ metadata.gz: 948a2be8d3330f63f9066b10b41075cd87988b718c951cde2bb36bc544762779469a059b41ca692acd1eaf94b5134bacfc3511c8ff31aefcd57f7c7f84ab728d
7
+ data.tar.gz: a9a60aac68010cce74351a2dea287128fc4e00306602b23e87715f8976ea0b5c67236e70521ce08634d433fc768158024c0725d7489a8f916d0fb1cf8020d64c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 0.7.2 (2019/04/14)
2
+ #### Bug fixes, etc.
3
+ * adjust color names due to update `rcairo 1.16.3`
4
+ * use GLib::Idle.add in `frame.rb`
5
+
6
+
1
7
  ### 0.7.1 (2019/03/30)
2
8
  #### New features
3
9
  * add `Nyle.clear` method
data/lib/nyle/frame.rb CHANGED
@@ -86,6 +86,10 @@ module Nyle
86
86
  @timer = GLib::Timer.new
87
87
  @timer.start
88
88
 
89
+ GLib::Idle.add do # to improve performance ...(for macOS)
90
+ true
91
+ end
92
+
89
93
  GLib::Timeout.add(@interval_time, GLib::PRIORITY_HIGH) do
90
94
  # puts "#{@timer.elapsed[0]}" if @timer
91
95
  if @timer
data/lib/nyle/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Nyle
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
@@ -37,7 +37,7 @@ class Dot
37
37
  end
38
38
 
39
39
  class Screen < Nyle::Screen
40
- FGCOLOR = :GOLD
40
+ FGCOLOR = :SCHOOL_BUS_YELLOW
41
41
  BGCOLOR = :BLACK
42
42
 
43
43
  def initialize
@@ -2,35 +2,38 @@ require 'nyle'
2
2
 
3
3
  class Screen < Nyle::Screen
4
4
  def initialize
5
- super(480, 600)
5
+ super(600, 600)
6
6
  setup
7
7
  end
8
8
 
9
9
  def setup
10
- @colors = _color_list
11
- @bar_w = 200
12
- @bar_h = 30
13
- @start_index = 0
14
- @end_index = _end_index
10
+ @colors = _color_list
11
+ @bar_w = 200
12
+ @bar_h = 30
13
+ @items_per_page = Nyle.screen_height / @bar_h
14
+ @pages = @colors.length / @items_per_page + (@colors.length % @items_per_page == 0 ? 0 : 1)
15
+ @start_index = 0
16
+ @end_index = _end_index
15
17
  end
16
18
 
17
19
  def draw
18
20
  (@start_index..@end_index).each do |i|
19
21
  y = (i - @start_index) * @bar_h
20
22
  Nyle.draw_rect(0, y, @bar_w, @bar_h, {color: @colors[i], fill: true})
21
- Nyle.draw_text(@bar_w + 10, y + @bar_h - 10, "#{@colors[i].to_s}", {color: :BLACK, size: 16})
23
+ Nyle.draw_text(@bar_w + 10, y + @bar_h - 10, "(#{Cairo::Color.module_eval(@colors[i].to_s).to_s[0..6]})", {font: "monospace", color: :BLACK, size: 16})
24
+ Nyle.draw_text(@bar_w + 110, y + @bar_h - 10, "#{@colors[i].to_s}", {font: "monospace", bold: true, color: :BLACK, size: 16})
22
25
  end
23
26
  end
24
27
 
25
28
  def update
26
29
  if Nyle.key_press?(KEY_Up) or Nyle.mouse_press?(MOUSE_R)
27
30
  @start_index -= (Nyle.screen_height / @bar_h)
28
- @start_index = (@colors.length / (Nyle.screen_height / @bar_h)) * (Nyle.screen_height / @bar_h) if @start_index < 0
31
+ @start_index = @items_per_page * (@pages - 1) if @start_index < 0
29
32
  @end_index = _end_index
30
33
  end
31
34
 
32
35
  if Nyle.key_press?(KEY_Down) or Nyle.mouse_press?(MOUSE_L)
33
- @start_index += (Nyle.screen_height / @bar_h)
36
+ @start_index += @items_per_page
34
37
  @start_index = 0 if @start_index >= @colors.length
35
38
  @end_index = _end_index
36
39
  end
@@ -39,275 +42,275 @@ class Screen < Nyle::Screen
39
42
  end
40
43
 
41
44
  def _end_index
42
- index = @start_index + Nyle.screen_height / @bar_h - 1
45
+ index = @start_index + @items_per_page - 1
43
46
  index = @colors.length - 1 if index >= @colors.length
44
47
  index
45
48
  end
46
49
 
47
50
  def _color_list
48
51
  [
49
- :ALICE_BLUE, # #F0F8FF
50
- :ALIZARIN_CRIMSON, # #E32637
51
- :AMARANTH, # #E62B50
52
- :AMBER, # #FFBF00
53
- :AMETHYST, # #9966CC
54
- :ANTIQUE_WHITE, # #FAEBD8
55
- :APRICOT, # #FBCEB2
56
- :AQUA, # #00FFFF
57
- :AQUAMARINE, # #80FFD5
58
- :ASPARAGUS, # #7CA15B
59
- :AZURE, # #0080FF
60
- :BEIGE, # #F5F5DD
61
- :BISQUE, # #FFE5C4
62
- :BISTRE, # #3E2B1F
63
- :BLACK, # #000000
64
- :BLANCHED_ALMOND, # #FFEBCD
65
- :BLAZE_ORANGE, # #FF6600
66
- :BLUE, # #0000FF
67
- :BLUE_VIOLET, # #8A2BE3
68
- :BONDI_BLUE, # #0095B6
69
- :BRIGHT_GREEN, # #66FF00
70
- :BRIGHT_TURQUOISE, # #08E8DF
71
- :BROWN, # #964C00
72
- :BUFF, # #F0DD82
73
- :BURGUNDY, # #800020
74
- :BURLY_WOOD, # #DFB887
75
- :BURNT_ORANGE, # #CC5500
76
- :BURNT_SIENNA, # #E97551
77
- :BURNT_UMBER, # #8A3324
78
- :CADET_BLUE, # #5F9FA1
79
- :CAMOUFLAGE_GREEN, # #79866C
80
- :CARDINAL, # #C41E3B
81
- :CARMINE, # #960018
82
- :CARNATION, # #F95A61
83
- :CARROT_ORANGE, # #ED9121
84
- :CELADON, # #ADE2B0
85
- :CERISE, # #DF3163
86
- :CERULEAN, # #007CA8
87
- :CERULEAN_BLUE, # #2A52BE
88
- :CHARTREUSE, # #80FF00
89
- :CHARTREUSE_YELLOW, # #E0FF00
90
- :CHESTNUT, # #CD5C5C
91
- :CHOCOLATE, # #D36A1E
92
- :CINNAMON, # #7C4000
93
- :COBALT, # #0048AC
94
- :COPPER, # #B87433
95
- :COPPER_ROSE, # #996666
96
- :CORAL, # #FF8050
97
- :CORAL_RED, # #FF4141
98
- :CORN, # #FBEC5D
99
- :CORNFLOWER_BLUE, # #6495ED
100
- :CORNSILK, # #FFF8DD
101
- :CREAM, # #FFFDD1
102
- :CRIMSON, # #DD143D
103
- :CYAN, # #00FFFF
104
- :DARK_BLUE, # #00008B
105
- :DARK_CYAN, # #008B8B
106
- :DARK_GOLDENROD, # #B8860C
107
- :DARK_GRAY, # #AAAAAA
108
- :DARK_GREEN, # #006400
109
- :DARK_KHAKI, # #BDB76C
110
- :DARK_MAGENTA, # #8B008B
111
- :DARK_OLIVE_GREEN, # #556C2F
112
- :DARK_ORANGE, # #FF8C00
113
- :DARK_ORCHID, # #9932CC
114
- :DARK_POWDER_BLUE, # #003399
115
- :DARK_RED, # #8B0000
116
- :DARK_SALMON, # #E9967B
117
- :DARK_SEA_GREEN, # #8FBC8F
118
- :DARK_SLATE_BLUE, # #493E8B
119
- :DARK_SLATE_GRAY, # #2F4F4F
120
- :DARK_TURQUOISE, # #00CED2
121
- :DARK_VIOLET, # #9400D4
122
- :DEEP_PINK, # #FF1493
123
- :DEEP_SKY_BLUE, # #00BFFF
124
- :DENIM, # #1660BD
125
- :DIM_GRAY, # #6A6A6A
126
- :DODGER_BLUE, # #1E90FF
127
- :EGGPLANT, # #990066
128
- :EMERALD, # #50C879
129
- :FALU_RED, # #801818
130
- :FERN_GREEN, # #4F7A43
131
- :FIRE_BRICK, # #B22222
132
- :FLAX, # #EEDD82
133
- :FLORAL_WHITE, # #FFFAF0
134
- :FOREST_GREEN, # #228B22
135
- :FRENCH_ROSE, # #F64B8A
136
- :FUCHSIA, # #FF00FF
137
- :GAINSBORO, # #DDDDDD
138
- :GAMBOGE, # #E59C0F
139
- :GHOST_WHITE, # #F8F8FF
140
- :GOLD, # #FFD800
141
- :GOLDENROD, # #DBA620
142
- :GRAY, # #808080
143
- :GRAY_ASPARAGUS, # #475946
144
- :GREEN, # #00FF00
145
- :GREEN_YELLOW, # #AEFF2F
146
- :HARLEQUIN, # #40FF00
147
- :HELIOTROPE, # #E074FF
148
- :HOLLYWOOD_CERISE, # #F400A2
149
- :HONEYDEW, # #F0FFF0
150
- :HOT_MAGENTA, # #FF00CC
151
- :HOT_PINK, # #FF6AB5
152
- :INDIAN_RED, # #CD5C5C
153
- :INDIGO, # #4C0082
154
- :INTERNATIONAL_KLEIN_BLUE, # #002FA8
155
- :INTERNATIONAL_ORANGE, # #FF4F00
156
- :IVORY, # #FFFFF0
157
- :JADE, # #00A96C
158
- :KHAKI, # #C3B191
159
- :KHAKI_X11, # #F0E78C
160
- :LAVENDER, # #B57FDD
161
- :LAVENDER_BLUE, # #CCCCFF
162
- :LAVENDER_BLUSH, # #FFF0F5
163
- :LAVENDER_GRAY, # #BDBBD8
164
- :LAVENDER_PINK, # #FBAFD3
165
- :LAVENDER_ROSE, # #FBA1E3
166
- :LAWN_GREEN, # #7DFC00
167
- :LEMON, # #FDE911
168
- :LEMON_CHIFFON, # #FFFACD
169
- :LIGHT_BLUE, # #AED9E7
170
- :LIGHT_CORAL, # #F08080
171
- :LIGHT_CYAN, # #E1FFFF
172
- :LIGHT_GOLDENROD_YELLOW, # #FAFAD3
173
- :LIGHT_GREEN, # #90EE90
174
- :LIGHT_GREY, # #D4D4D4
175
- :LIGHT_PINK, # #FFB6C1
176
- :LIGHT_SALMON, # #FFA17B
177
- :LIGHT_SEA_GREEN, # #20B2AB
178
- :LIGHT_SKY_BLUE, # #87CEFA
179
- :LIGHT_SLATE_GRAY, # #788899
180
- :LIGHT_STEEL_BLUE, # #B1C4DF
181
- :LIGHT_YELLOW, # #FFFFE1
182
- :LILAC, # #C8A3C8
183
- :LIME, # #BFFF00
184
- :LIME_GREEN, # #32CD32
185
- :LINEN, # #FAF0E7
186
- :MAGENTA, # #FF00FF
187
- :MALACHITE, # #0CDB51
188
- :MAROON, # #800000
189
- :MAUVE, # #E1B1FF
190
- :MEDIUM_AQUAMARINE, # #66CDAB
191
- :MEDIUM_BLUE, # #0000CD
192
- :MEDIUM_CARMINE, # #B04136
193
- :MEDIUM_LAVENDER, # #EE82EE
194
- :MEDIUM_ORCHID, # #BA55D4
195
- :MEDIUM_PURPLE, # #9371DC
196
- :MEDIUM_SEA_GREEN, # #3DB372
197
- :MEDIUM_SLATE_BLUE, # #7C69EE
198
- :MEDIUM_SPRING_GREEN, # #00FA9B
199
- :MEDIUM_TURQUOISE, # #49D2CC
200
- :MEDIUM_VIOLET_RED, # #C71685
201
- :MIDNIGHT_BLUE, # #003366
202
- :MINT_CREAM, # #F5FFFA
203
- :MINT_GREEN, # #98FF98
204
- :MISTY_ROSE, # #FFE5E2
205
- :MOCCASIN, # #FFE5B5
206
- :MOSS_GREEN, # #AEE0AE
207
- :MOUNTBATTEN_PINK, # #997B8D
208
- :MUSTARD, # #FFDC58
209
- :NAVAJO_WHITE, # #FFDFAE
210
- :NAVY_BLUE, # #000080
211
- :OCHRE, # #CC7822
212
- :OLD_GOLD, # #D0B53C
213
- :OLD_LACE, # #FDF5E7
214
- :OLD_LAVENDER, # #7A6979
215
- :OLD_ROSE, # #C08081
216
- :OLIVE, # #808000
217
- :OLIVE_DRAB, # #6C8E23
218
- :ORANGE, # #FF8000
219
- :ORANGE_COLOR_WHEEL, # #FF8000
220
- :ORANGE_PEEL, # #FFA100
221
- :ORANGE_RED, # #FF4600
222
- :ORANGE_WEB, # #FFA600
223
- :ORCHID, # #DB71D7
224
- :PALE_GOLDENROD, # #EEE8AB
225
- :PALE_GREEN, # #98FB98
226
- :PALE_TURQUOISE, # #B0EEEE
227
- :PALE_VIOLET_RED, # #DC7193
228
- :PAPAYA_WHIP, # #FFEFD6
229
- :PASTEL_GREEN, # #78DE78
230
- :PASTEL_PINK, # #FFD2DD
231
- :PEACH, # #FFE6B5
232
- :PEACH_ORANGE, # #FFCC99
233
- :PEACH_PUFF, # #FFDBB9
234
- :PEACH_YELLOW, # #FAE0AE
235
- :PEAR, # #D2E331
236
- :PERIWINKLE, # #CCCCFF
237
- :PERSIAN_BLUE, # #1C3ABB
238
- :PERSIAN_GREEN, # #00A793
239
- :PERSIAN_INDIGO, # #32127B
240
- :PERSIAN_PINK, # #F780BE
241
- :PERSIAN_RED, # #CC3333
242
- :PERSIAN_ROSE, # #FF1CB2
243
- :PERU, # #CD8540
244
- :PINE_GREEN, # #017A70
245
- :PINK, # #FFC0CB
246
- :PINK_ORANGE, # #FF9966
247
- :PLUM, # #DEA1DE
248
- :POMEGRANATE, # #F34823
249
- :POWDER_BLUE, # #B1E1E7
250
- :POWDER_BLUE_WEB, # #B1E1E7
251
- :PRUSSIAN_BLUE, # #003153
252
- :PUCE, # #CC8899
253
- :PUMPKIN, # #FF7618
254
- :PURPLE, # #660099
255
- :RAW_UMBER, # #744B12
256
- :RED, # #FF0000
257
- :RED_VIOLET, # #C71685
258
- :ROBIN_EGG_BLUE, # #00CCCC
259
- :ROSE, # #FF0080
260
- :ROSY_BROWN, # #BC8F8F
261
- :ROYAL_BLUE, # #426AE2
262
- :RUSSET, # #80471B
263
- :RUST, # #B7420E
264
- :SADDLE_BROWN, # #8B4613
265
- :SAFETY_ORANGE, # #FF6600
266
- :SAFFRON, # #F4C430
267
- :SALMON, # #FF8C6A
268
- :SANDY_BROWN, # #F4A560
269
- :SANGRIA, # #92000A
270
- :SAPPHIRE, # #082567
271
- :SCARLET, # #FF2400
272
- :SCHOOL_BUS_YELLOW, # #FFD900
273
- :SEA_GREEN, # #2E8B57
274
- :SEASHELL, # #FFF5EE
275
- :SELECTIVE_YELLOW, # #FFBA00
276
- :SEPIA, # #714314
277
- :SHOCKING_PINK, # #FC0FC0
278
- :SIENNA, # #A1522D
279
- :SILVER, # #C0C0C0
280
- :SKY_BLUE, # #87CEEB
281
- :SLATE_BLUE, # #6B5ACD
282
- :SLATE_GRAY, # #718090
283
- :SMALT, # #003399
284
- :SNOW, # #FFFAFA
285
- :SPRING_GREEN, # #00FF80
286
- :STEEL_BLUE, # #4782B5
287
- :SWAMP_GREEN, # #ADB78E
288
- :TAN, # #D3B58C
289
- :TANGERINE, # #FFCC00
290
- :TAUPE, # #493D32
291
- :TAWNY, # #CD5700
292
- :TEA_GREEN, # #D1F0C0
293
- :TEAL, # #008080
294
- :TENNE, # #CD5700
295
- :TERRA_COTTA, # #E3735B
296
- :THISTLE, # #D9BFD9
297
- :TOMATO, # #FF6348
298
- :TURQUOISE, # #30D6C8
299
- :ULTRAMARINE, # #120A8F
300
- :VERMILION, # #FF4D00
301
- :VIOLET, # #8B00FF
302
- :VIOLET_EGGPLANT, # #991299
303
- :VIRIDIAN, # #41826E
304
- :WHEAT, # #F5DFB3
305
- :WHITE, # #FFFFFF
306
- :WHITE_SMOKE, # #F5F5F5
307
- :WISTERIA, # #C9A1DD
308
- :YELLOW, # #FFFF00
309
- :YELLOW_GREEN, # #9BCD32
310
- :ZINNWALDITE # #EBC2B0
52
+ :ALICE_BLUE, #
53
+ #:ALIZARIN_CRIMSON, #
54
+ :AMARANTH, #
55
+ :AMBER, #
56
+ :AMETHYST, #
57
+ :ANTIQUE_WHITE, #
58
+ :APRICOT, #
59
+ :AQUA, #
60
+ :AQUAMARINE, #
61
+ :ASPARAGUS, #
62
+ :AZURE, #
63
+ :BEIGE, #
64
+ :BISQUE, #
65
+ :BISTRE, #
66
+ :BLACK, #
67
+ :BLANCHED_ALMOND, #
68
+ #:BLAZE_ORANGE, #
69
+ :BLUE, #
70
+ :BLUE_VIOLET, #
71
+ :BONDI_BLUE, #
72
+ :BRIGHT_GREEN, #
73
+ :BRIGHT_TURQUOISE, #
74
+ :BROWN, #
75
+ :BUFF, #
76
+ :BURGUNDY, #
77
+ #:BURLY_WOOD, #
78
+ :BURNT_ORANGE, #
79
+ :BURNT_SIENNA, #
80
+ :BURNT_UMBER, #
81
+ :CADET_BLUE, #
82
+ :CAMOUFLAGE_GREEN, #
83
+ :CARDINAL, #
84
+ :CARMINE, #
85
+ #:CARNATION, #
86
+ :CARROT_ORANGE, #
87
+ :CELADON, #
88
+ :CERISE, #
89
+ :CERULEAN, #
90
+ :CERULEAN_BLUE, #
91
+ :CHARTREUSE, #
92
+ #:CHARTREUSE_YELLOW, #
93
+ :CHESTNUT, #
94
+ :CHOCOLATE, #
95
+ :CINNAMON, #
96
+ #:COBALT, #
97
+ :COPPER, #
98
+ :COPPER_ROSE, #
99
+ :CORAL, #
100
+ :CORAL_RED, #
101
+ :CORN, #
102
+ :CORNFLOWER_BLUE, #
103
+ :CORNSILK, #
104
+ :CREAM, #
105
+ :CRIMSON, #
106
+ :CYAN, #
107
+ :DARK_BLUE, #
108
+ :DARK_CYAN, #
109
+ :DARK_GOLDENROD, #
110
+ :DARK_GRAY, #
111
+ :DARK_GREEN, #
112
+ :DARK_KHAKI, #
113
+ :DARK_MAGENTA, #
114
+ :DARK_OLIVE_GREEN, #
115
+ :DARK_ORANGE, #
116
+ :DARK_ORCHID, #
117
+ :DARK_POWDER_BLUE, #
118
+ :DARK_RED, #
119
+ :DARK_SALMON, #
120
+ :DARK_SEA_GREEN, #
121
+ :DARK_SLATE_BLUE, #
122
+ :DARK_SLATE_GRAY, #
123
+ :DARK_TURQUOISE, #
124
+ :DARK_VIOLET, #
125
+ :DEEP_PINK, #
126
+ :DEEP_SKY_BLUE, #
127
+ :DENIM, #
128
+ :DIM_GRAY, #
129
+ :DODGER_BLUE, #
130
+ :EGGPLANT, #
131
+ :EMERALD, #
132
+ :FALU_RED, #
133
+ :FERN_GREEN, #
134
+ #:FIRE_BRICK, #
135
+ :FLAX, #
136
+ :FLORAL_WHITE, #
137
+ :FOREST_GREEN, #
138
+ :FRENCH_ROSE, #
139
+ :FUCHSIA, #
140
+ :GAINSBORO, #
141
+ :GAMBOGE, #
142
+ :GHOST_WHITE, #
143
+ :GOLD, #
144
+ :GOLDENROD, #
145
+ :GRAY, #
146
+ :GRAY_ASPARAGUS, #
147
+ :GREEN, #
148
+ :GREEN_YELLOW, #
149
+ :HARLEQUIN, #
150
+ :HELIOTROPE, #
151
+ :HOLLYWOOD_CERISE, #
152
+ :HONEYDEW, #
153
+ :HOT_MAGENTA, #
154
+ :HOT_PINK, #
155
+ :INDIAN_RED, #
156
+ :INDIGO, #
157
+ :INTERNATIONAL_KLEIN_BLUE, #
158
+ #:INTERNATIONAL_ORANGE, #
159
+ :IVORY, #
160
+ :JADE, #
161
+ :KHAKI, #
162
+ :KHAKI_X11, #
163
+ :LAVENDER, #
164
+ :LAVENDER_BLUE, #
165
+ :LAVENDER_BLUSH, #
166
+ :LAVENDER_GRAY, #
167
+ :LAVENDER_PINK, #
168
+ :LAVENDER_ROSE, #
169
+ :LAWN_GREEN, #
170
+ :LEMON, #
171
+ :LEMON_CHIFFON, #
172
+ :LIGHT_BLUE, #
173
+ :LIGHT_CORAL, #
174
+ :LIGHT_CYAN, #
175
+ :LIGHT_GOLDENROD_YELLOW, #
176
+ :LIGHT_GREEN, #
177
+ #:LIGHT_GREY, #
178
+ :LIGHT_PINK, #
179
+ :LIGHT_SALMON, #
180
+ :LIGHT_SEA_GREEN, #
181
+ :LIGHT_SKY_BLUE, #
182
+ :LIGHT_SLATE_GRAY, #
183
+ :LIGHT_STEEL_BLUE, #
184
+ :LIGHT_YELLOW, #
185
+ :LILAC, #
186
+ :LIME, #
187
+ :LIME_GREEN, #
188
+ :LINEN, #
189
+ :MAGENTA, #
190
+ :MALACHITE, #
191
+ :MAROON, #
192
+ :MAUVE, #
193
+ :MEDIUM_AQUAMARINE, #
194
+ :MEDIUM_BLUE, #
195
+ :MEDIUM_CARMINE, #
196
+ #:MEDIUM_LAVENDER, #
197
+ :MEDIUM_ORCHID, #
198
+ :MEDIUM_PURPLE, #
199
+ :MEDIUM_SEA_GREEN, #
200
+ :MEDIUM_SLATE_BLUE, #
201
+ :MEDIUM_SPRING_GREEN, #
202
+ :MEDIUM_TURQUOISE, #
203
+ :MEDIUM_VIOLET_RED, #
204
+ :MIDNIGHT_BLUE, #
205
+ :MINT_CREAM, #
206
+ :MINT_GREEN, #
207
+ :MISTY_ROSE, #
208
+ :MOCCASIN, #
209
+ :MOSS_GREEN, #
210
+ :MOUNTBATTEN_PINK, #
211
+ :MUSTARD, #
212
+ :NAVAJO_WHITE, #
213
+ :NAVY_BLUE, #
214
+ :OCHRE, #
215
+ :OLD_GOLD, #
216
+ :OLD_LACE, #
217
+ :OLD_LAVENDER, #
218
+ :OLD_ROSE, #
219
+ :OLIVE, #
220
+ :OLIVE_DRAB, #
221
+ :ORANGE, #
222
+ :ORANGE_COLOR_WHEEL, #
223
+ :ORANGE_PEEL, #
224
+ :ORANGE_RED, #
225
+ :ORANGE_WEB, #
226
+ :ORCHID, #
227
+ :PALE_GOLDENROD, #
228
+ :PALE_GREEN, #
229
+ :PALE_TURQUOISE, #
230
+ :PALE_VIOLET_RED, #
231
+ :PAPAYA_WHIP, #
232
+ :PASTEL_GREEN, #
233
+ :PASTEL_PINK, #
234
+ :PEACH, #
235
+ :PEACH_ORANGE, #
236
+ :PEACH_PUFF, #
237
+ :PEACH_YELLOW, #
238
+ :PEAR, #
239
+ :PERIWINKLE, #
240
+ :PERSIAN_BLUE, #
241
+ :PERSIAN_GREEN, #
242
+ :PERSIAN_INDIGO, #
243
+ :PERSIAN_PINK, #
244
+ :PERSIAN_RED, #
245
+ :PERSIAN_ROSE, #
246
+ :PERU, #
247
+ :PINE_GREEN, #
248
+ :PINK, #
249
+ :PINK_ORANGE, #
250
+ :PLUM, #
251
+ #:POMEGRANATE, #
252
+ :POWDER_BLUE, #
253
+ #:POWDER_BLUE_WEB, #
254
+ :PRUSSIAN_BLUE, #
255
+ :PUCE, #
256
+ :PUMPKIN, #
257
+ :PURPLE, #
258
+ :RAW_UMBER, #
259
+ :RED, #
260
+ :RED_VIOLET, #
261
+ :ROBIN_EGG_BLUE, #
262
+ :ROSE, #
263
+ :ROSY_BROWN, #
264
+ :ROYAL_BLUE, #
265
+ :RUSSET, #
266
+ :RUST, #
267
+ :SADDLE_BROWN, #
268
+ :SAFETY_ORANGE, #
269
+ :SAFFRON, #
270
+ :SALMON, #
271
+ :SANDY_BROWN, #
272
+ #:SANGRIA, #
273
+ :SAPPHIRE, #
274
+ :SCARLET, #
275
+ :SCHOOL_BUS_YELLOW, #
276
+ :SEA_GREEN, #
277
+ :SEASHELL, #
278
+ :SELECTIVE_YELLOW, #
279
+ :SEPIA, #
280
+ :SHOCKING_PINK, #
281
+ :SIENNA, #
282
+ :SILVER, #
283
+ :SKY_BLUE, #
284
+ :SLATE_BLUE, #
285
+ :SLATE_GRAY, #
286
+ #:SMALT, #
287
+ :SNOW, #
288
+ :SPRING_GREEN, #
289
+ :STEEL_BLUE, #
290
+ #:SWAMP_GREEN, #
291
+ :TAN, #
292
+ :TANGERINE, #
293
+ :TAUPE, #
294
+ :TAWNY, #
295
+ :TEA_GREEN, #
296
+ :TEAL, #
297
+ #:TENNE, #
298
+ :TERRA_COTTA, #
299
+ :THISTLE, #
300
+ :TOMATO, #
301
+ :TURQUOISE, #
302
+ :ULTRAMARINE, #
303
+ :VERMILION, #
304
+ :VIOLET, #
305
+ #:VIOLET_EGGPLANT, #
306
+ :VIRIDIAN, #
307
+ :WHEAT, #
308
+ :WHITE, #
309
+ :WHITE_SMOKE, #
310
+ :WISTERIA, #
311
+ :YELLOW, #
312
+ :YELLOW_GREEN, #
313
+ :ZINNWALDITE #
311
314
  ]
312
315
  end
313
316
  end
@@ -30,17 +30,17 @@ class Screen < Nyle::Screen
30
30
  Nyle.draw_circle(420, 270, 30, {fill: true, a: 0.8, color: :FOREST_GREEN})
31
31
  Nyle.draw_circle(520, 270, 30, {fill: true, a: 1.0, color: :FOREST_GREEN})
32
32
 
33
- Nyle.draw_circle(120, 340, 30, {fill: true, a: 0.2, color: :COBALT})
34
- Nyle.draw_circle(220, 340, 30, {fill: true, a: 0.4, color: :COBALT})
35
- Nyle.draw_circle(320, 340, 30, {fill: true, a: 0.6, color: :COBALT})
36
- Nyle.draw_circle(420, 340, 30, {fill: true, a: 0.8, color: :COBALT})
37
- Nyle.draw_circle(520, 340, 30, {fill: true, a: 1.0, color: :COBALT})
38
-
39
- Nyle.draw_circle(120, 410, 30, {fill: true, a: 0.2, color: :GOLD})
40
- Nyle.draw_circle(220, 410, 30, {fill: true, a: 0.4, color: :GOLD})
41
- Nyle.draw_circle(320, 410, 30, {fill: true, a: 0.6, color: :GOLD})
42
- Nyle.draw_circle(420, 410, 30, {fill: true, a: 0.8, color: :GOLD})
43
- Nyle.draw_circle(520, 410, 30, {fill: true, a: 1.0, color: :GOLD})
33
+ Nyle.draw_circle(120, 340, 30, {fill: true, a: 0.2, color: :MEDIUM_BLUE})
34
+ Nyle.draw_circle(220, 340, 30, {fill: true, a: 0.4, color: :MEDIUM_BLUE})
35
+ Nyle.draw_circle(320, 340, 30, {fill: true, a: 0.6, color: :MEDIUM_BLUE})
36
+ Nyle.draw_circle(420, 340, 30, {fill: true, a: 0.8, color: :MEDIUM_BLUE})
37
+ Nyle.draw_circle(520, 340, 30, {fill: true, a: 1.0, color: :MEDIUM_BLUE})
38
+
39
+ Nyle.draw_circle(120, 410, 30, {fill: true, a: 0.2, color: :SCHOOL_BUS_YELLOW})
40
+ Nyle.draw_circle(220, 410, 30, {fill: true, a: 0.4, color: :SCHOOL_BUS_YELLOW})
41
+ Nyle.draw_circle(320, 410, 30, {fill: true, a: 0.6, color: :SCHOOL_BUS_YELLOW})
42
+ Nyle.draw_circle(420, 410, 30, {fill: true, a: 0.8, color: :SCHOOL_BUS_YELLOW})
43
+ Nyle.draw_circle(520, 410, 30, {fill: true, a: 1.0, color: :SCHOOL_BUS_YELLOW})
44
44
 
45
45
  Nyle.quit if Nyle.key_press?(KEY_Escape)
46
46
  end
@@ -50,27 +50,27 @@ class Screen < Nyle::Screen
50
50
  Nyle.draw_line(460, 310, 520, 250, {weight: 8, cap: :ROUND, a: 0.8, color: :FOREST_GREEN})
51
51
  Nyle.draw_line(510, 310, 570, 250, {weight: 10, cap: :ROUND, a: 1.0, color: :FOREST_GREEN})
52
52
 
53
- Nyle.draw_line( 40, 390, 100, 330, { a: 0.2, color: :COBALT})
54
- Nyle.draw_line( 90, 390, 150, 330, {weight: 4 , a: 0.4, color: :COBALT})
55
- Nyle.draw_line(140, 390, 200, 330, {weight: 6 , a: 0.6, color: :COBALT})
56
- Nyle.draw_line(190, 390, 250, 330, {weight: 8 , a: 0.8, color: :COBALT})
57
- Nyle.draw_line(240, 390, 300, 330, {weight: 10 , a: 1.0, color: :COBALT})
58
- Nyle.draw_line(310, 390, 370, 330, { cap: :ROUND, a: 0.2, color: :COBALT})
59
- Nyle.draw_line(360, 390, 420, 330, {weight: 4, cap: :ROUND, a: 0.4, color: :COBALT})
60
- Nyle.draw_line(410, 390, 470, 330, {weight: 6, cap: :ROUND, a: 0.6, color: :COBALT})
61
- Nyle.draw_line(460, 390, 520, 330, {weight: 8, cap: :ROUND, a: 0.8, color: :COBALT})
62
- Nyle.draw_line(510, 390, 570, 330, {weight: 10, cap: :ROUND, a: 1.0, color: :COBALT})
53
+ Nyle.draw_line( 40, 390, 100, 330, { a: 0.2, color: :MEDIUM_BLUE})
54
+ Nyle.draw_line( 90, 390, 150, 330, {weight: 4 , a: 0.4, color: :MEDIUM_BLUE})
55
+ Nyle.draw_line(140, 390, 200, 330, {weight: 6 , a: 0.6, color: :MEDIUM_BLUE})
56
+ Nyle.draw_line(190, 390, 250, 330, {weight: 8 , a: 0.8, color: :MEDIUM_BLUE})
57
+ Nyle.draw_line(240, 390, 300, 330, {weight: 10 , a: 1.0, color: :MEDIUM_BLUE})
58
+ Nyle.draw_line(310, 390, 370, 330, { cap: :ROUND, a: 0.2, color: :MEDIUM_BLUE})
59
+ Nyle.draw_line(360, 390, 420, 330, {weight: 4, cap: :ROUND, a: 0.4, color: :MEDIUM_BLUE})
60
+ Nyle.draw_line(410, 390, 470, 330, {weight: 6, cap: :ROUND, a: 0.6, color: :MEDIUM_BLUE})
61
+ Nyle.draw_line(460, 390, 520, 330, {weight: 8, cap: :ROUND, a: 0.8, color: :MEDIUM_BLUE})
62
+ Nyle.draw_line(510, 390, 570, 330, {weight: 10, cap: :ROUND, a: 1.0, color: :MEDIUM_BLUE})
63
63
 
64
- Nyle.draw_line( 40, 470, 100, 410, { a: 0.2, color: :GOLD})
65
- Nyle.draw_line( 90, 470, 150, 410, {weight: 4 , a: 0.4, color: :GOLD})
66
- Nyle.draw_line(140, 470, 200, 410, {weight: 6 , a: 0.6, color: :GOLD})
67
- Nyle.draw_line(190, 470, 250, 410, {weight: 8 , a: 0.8, color: :GOLD})
68
- Nyle.draw_line(240, 470, 300, 410, {weight: 10 , a: 1.0, color: :GOLD})
69
- Nyle.draw_line(310, 470, 370, 410, { cap: :ROUND, a: 0.2, color: :GOLD})
70
- Nyle.draw_line(360, 470, 420, 410, {weight: 4, cap: :ROUND, a: 0.4, color: :GOLD})
71
- Nyle.draw_line(410, 470, 470, 410, {weight: 6, cap: :ROUND, a: 0.6, color: :GOLD})
72
- Nyle.draw_line(460, 470, 520, 410, {weight: 8, cap: :ROUND, a: 0.8, color: :GOLD})
73
- Nyle.draw_line(510, 470, 570, 410, {weight: 10, cap: :ROUND, a: 1.0, color: :GOLD})
64
+ Nyle.draw_line( 40, 470, 100, 410, { a: 0.2, color: :SCHOOL_BUS_YELLOW})
65
+ Nyle.draw_line( 90, 470, 150, 410, {weight: 4 , a: 0.4, color: :SCHOOL_BUS_YELLOW})
66
+ Nyle.draw_line(140, 470, 200, 410, {weight: 6 , a: 0.6, color: :SCHOOL_BUS_YELLOW})
67
+ Nyle.draw_line(190, 470, 250, 410, {weight: 8 , a: 0.8, color: :SCHOOL_BUS_YELLOW})
68
+ Nyle.draw_line(240, 470, 300, 410, {weight: 10 , a: 1.0, color: :SCHOOL_BUS_YELLOW})
69
+ Nyle.draw_line(310, 470, 370, 410, { cap: :ROUND, a: 0.2, color: :SCHOOL_BUS_YELLOW})
70
+ Nyle.draw_line(360, 470, 420, 410, {weight: 4, cap: :ROUND, a: 0.4, color: :SCHOOL_BUS_YELLOW})
71
+ Nyle.draw_line(410, 470, 470, 410, {weight: 6, cap: :ROUND, a: 0.6, color: :SCHOOL_BUS_YELLOW})
72
+ Nyle.draw_line(460, 470, 520, 410, {weight: 8, cap: :ROUND, a: 0.8, color: :SCHOOL_BUS_YELLOW})
73
+ Nyle.draw_line(510, 470, 570, 410, {weight: 10, cap: :ROUND, a: 1.0, color: :SCHOOL_BUS_YELLOW})
74
74
 
75
75
  Nyle.quit if Nyle.key_press?(KEY_Escape)
76
76
  end
@@ -36,17 +36,17 @@ class Screen < Nyle::Screen
36
36
  Nyle.draw_rect(390, 280, 60, 40, {fill: true, a: 0.8, color: :FOREST_GREEN})
37
37
  Nyle.draw_rect(490, 280, 60, 40, {fill: true, a: 1.0, color: :FOREST_GREEN})
38
38
 
39
- Nyle.draw_rect( 90, 340, 60, 40, {fill: true, a: 0.2, color: :COBALT})
40
- Nyle.draw_rect(190, 340, 60, 40, {fill: true, a: 0.4, color: :COBALT})
41
- Nyle.draw_rect(290, 340, 60, 40, {fill: true, a: 0.6, color: :COBALT})
42
- Nyle.draw_rect(390, 340, 60, 40, {fill: true, a: 0.8, color: :COBALT})
43
- Nyle.draw_rect(490, 340, 60, 40, {fill: true, a: 1.0, color: :COBALT})
44
-
45
- Nyle.draw_rect( 90, 400, 60, 40, {fill: true, a: 0.2, color: :GOLD})
46
- Nyle.draw_rect(190, 400, 60, 40, {fill: true, a: 0.4, color: :GOLD})
47
- Nyle.draw_rect(290, 400, 60, 40, {fill: true, a: 0.6, color: :GOLD})
48
- Nyle.draw_rect(390, 400, 60, 40, {fill: true, a: 0.8, color: :GOLD})
49
- Nyle.draw_rect(490, 400, 60, 40, {fill: true, a: 1.0, color: :GOLD})
39
+ Nyle.draw_rect( 90, 340, 60, 40, {fill: true, a: 0.2, color: :MEDIUM_BLUE})
40
+ Nyle.draw_rect(190, 340, 60, 40, {fill: true, a: 0.4, color: :MEDIUM_BLUE})
41
+ Nyle.draw_rect(290, 340, 60, 40, {fill: true, a: 0.6, color: :MEDIUM_BLUE})
42
+ Nyle.draw_rect(390, 340, 60, 40, {fill: true, a: 0.8, color: :MEDIUM_BLUE})
43
+ Nyle.draw_rect(490, 340, 60, 40, {fill: true, a: 1.0, color: :MEDIUM_BLUE})
44
+
45
+ Nyle.draw_rect( 90, 400, 60, 40, {fill: true, a: 0.2, color: :SCHOOL_BUS_YELLOW})
46
+ Nyle.draw_rect(190, 400, 60, 40, {fill: true, a: 0.4, color: :SCHOOL_BUS_YELLOW})
47
+ Nyle.draw_rect(290, 400, 60, 40, {fill: true, a: 0.6, color: :SCHOOL_BUS_YELLOW})
48
+ Nyle.draw_rect(390, 400, 60, 40, {fill: true, a: 0.8, color: :SCHOOL_BUS_YELLOW})
49
+ Nyle.draw_rect(490, 400, 60, 40, {fill: true, a: 1.0, color: :SCHOOL_BUS_YELLOW})
50
50
 
51
51
  Nyle.quit if Nyle.key_press?(KEY_Escape)
52
52
  end
@@ -40,18 +40,18 @@ class Screen < Nyle::Screen
40
40
  Nyle.draw_text(440, 230, "Nyle", {size: 48, color: :FOREST_GREEN, font: "serif", italic: true, bold: true})
41
41
 
42
42
  Nyle.draw_line( 20, 290, 620, 290, {color: :GRAY, a: 0.1})
43
- Nyle.draw_text( 80, 290, "Nyle", {size: 18, color: :COBALT, font: "monospace"})
44
- Nyle.draw_text(140, 290, "Nyle", {size: 24, color: :COBALT, font: "monospace"})
45
- Nyle.draw_text(220, 290, "Nyle", {size: 32, color: :COBALT, font: "monospace", bold: true})
46
- Nyle.draw_text(320, 290, "Nyle", {size: 42, color: :COBALT, font: "monospace", italic: true})
47
- Nyle.draw_text(440, 290, "Nyle", {size: 48, color: :COBALT, font: "monospace", italic: true, bold: true})
43
+ Nyle.draw_text( 80, 290, "Nyle", {size: 18, color: :MEDIUM_BLUE, font: "monospace"})
44
+ Nyle.draw_text(140, 290, "Nyle", {size: 24, color: :MEDIUM_BLUE, font: "monospace"})
45
+ Nyle.draw_text(220, 290, "Nyle", {size: 32, color: :MEDIUM_BLUE, font: "monospace", bold: true})
46
+ Nyle.draw_text(320, 290, "Nyle", {size: 42, color: :MEDIUM_BLUE, font: "monospace", italic: true})
47
+ Nyle.draw_text(440, 290, "Nyle", {size: 48, color: :MEDIUM_BLUE, font: "monospace", italic: true, bold: true})
48
48
 
49
49
  Nyle.draw_line( 20, 350, 620, 350, {color: :GRAY, a: 0.1})
50
- Nyle.draw_text( 80, 350, "Nyle", {size: 18, color: :GOLD, font: "monospace"})
51
- Nyle.draw_text(140, 350, "Nyle", {size: 24, color: :GOLD, font: "monospace"})
52
- Nyle.draw_text(220, 350, "Nyle", {size: 32, color: :GOLD, font: "monospace", bold: true})
53
- Nyle.draw_text(320, 350, "Nyle", {size: 42, color: :GOLD, font: "monospace", italic: true})
54
- Nyle.draw_text(440, 350, "Nyle", {size: 48, color: :GOLD, font: "monospace", italic: true, bold: true})
50
+ Nyle.draw_text( 80, 350, "Nyle", {size: 18, color: :SCHOOL_BUS_YELLOW, font: "monospace"})
51
+ Nyle.draw_text(140, 350, "Nyle", {size: 24, color: :SCHOOL_BUS_YELLOW, font: "monospace"})
52
+ Nyle.draw_text(220, 350, "Nyle", {size: 32, color: :SCHOOL_BUS_YELLOW, font: "monospace", bold: true})
53
+ Nyle.draw_text(320, 350, "Nyle", {size: 42, color: :SCHOOL_BUS_YELLOW, font: "monospace", italic: true})
54
+ Nyle.draw_text(440, 350, "Nyle", {size: 48, color: :SCHOOL_BUS_YELLOW, font: "monospace", italic: true, bold: true})
55
55
 
56
56
  Nyle.quit if Nyle.key_press?(KEY_Escape)
57
57
  end
@@ -6,7 +6,7 @@ class Screen < Nyle::Screen
6
6
  @th = 0
7
7
  @c1 = :RED
8
8
  @c2 = :ORANGE
9
- @c3 = :GOLD
9
+ @c3 = :SCHOOL_BUS_YELLOW
10
10
  @x = Nyle.w / 2
11
11
  @y = Nyle.h / 2
12
12
  @rt_last = 0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koki Kitamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-30 00:00:00.000000000 Z
11
+ date: 2019-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gtk3