glimmer-dsl-gtk 0.0.3 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,61 +8,60 @@ window {
8
8
 
9
9
  drawing_area {
10
10
  on(:draw) do |drawing_area_widget, cairo_context|
11
- cairo_context.rectangle(0, 0, 400, 400)
12
- cairo_context.set_source_rgb(255, 255, 255)
13
- cairo_context.fill
11
+ cairo_context.set_source_rgb(255/255.0, 255/255.0, 255/255.0)
12
+ cairo_context.paint
14
13
 
15
14
  cairo_context.arc(85, 85, 45, (Math::PI/180)*90, -(Math::PI/180)*90)
16
15
  cairo_context.set_source_rgb(255, 0, 0)
17
16
  cairo_context.fill
18
17
 
19
18
  cairo_context.arc(85, 85, 45, (Math::PI/180)*90, -(Math::PI/180)*90)
20
- cairo_context.set_source_rgb(0, 128, 255)
19
+ cairo_context.set_source_rgb(0, 128/255.0, 255/255.0)
21
20
  cairo_context.set_line_width(3)
22
21
  cairo_context.stroke
23
22
 
24
23
  cairo_context.arc(85, 185, 45, (Math::PI/180)*100, -(Math::PI/180)*30)
25
- cairo_context.set_source_rgb(255, 0, 0)
24
+ cairo_context.set_source_rgb(255/255.0, 0, 0)
26
25
  cairo_context.fill
27
26
 
28
27
  cairo_context.arc(85, 185, 45, (Math::PI/180)*100, -(Math::PI/180)*30)
29
- cairo_context.set_source_rgb(0, 128, 255)
28
+ cairo_context.set_source_rgb(0, 128/255.0, 255/255.0)
30
29
  cairo_context.set_line_width(3)
31
30
  cairo_context.stroke
32
31
 
33
32
  cairo_context.circle(85, 285, 45)
34
- cairo_context.set_source_rgb(255, 0, 0)
33
+ cairo_context.set_source_rgb(255/255.0, 0, 0)
35
34
  cairo_context.fill
36
35
 
37
36
  cairo_context.circle(85, 285, 45)
38
- cairo_context.set_source_rgb(0, 128, 255)
37
+ cairo_context.set_source_rgb(0, 128/255.0, 255/255.0)
39
38
  cairo_context.set_line_width(3)
40
39
  cairo_context.stroke
41
40
 
42
41
  cairo_context.rectangle(140, 40, 180, 90)
43
- cairo_context.set_source_rgb(255, 255, 0)
42
+ cairo_context.set_source_rgb(255/255.0, 255/255.0, 0)
44
43
  cairo_context.fill
45
44
 
46
45
  cairo_context.rectangle(140, 40, 180, 90)
47
- cairo_context.set_source_rgb(255, 0, 0)
46
+ cairo_context.set_source_rgb(255/255.0, 0, 0)
48
47
  cairo_context.set_line_width(3)
49
48
  cairo_context.stroke
50
49
 
51
50
  cairo_context.rounded_rectangle(140, 140, 180, 90, 30, 20)
52
- cairo_context.set_source_rgb(255, 255, 0)
51
+ cairo_context.set_source_rgb(255/255.0, 255/255.0, 0)
53
52
  cairo_context.fill
54
53
 
55
54
  cairo_context.rounded_rectangle(140, 140, 180, 90, 30, 20)
56
- cairo_context.set_source_rgb(255, 0, 0)
55
+ cairo_context.set_source_rgb(255/255.0, 0, 0)
57
56
  cairo_context.set_line_width(3)
58
57
  cairo_context.stroke
59
58
 
60
59
  cairo_context.triangle(140, 240, 320, 240, 230, 330)
61
- cairo_context.set_source_rgb(255, 255, 0)
60
+ cairo_context.set_source_rgb(255/255.0, 255/255.0, 0)
62
61
  cairo_context.fill
63
62
 
64
63
  cairo_context.triangle(140, 240, 320, 240, 230, 330)
65
- cairo_context.set_source_rgb(255, 0, 0)
64
+ cairo_context.set_source_rgb(255/255.0, 0, 0)
66
65
  cairo_context.set_line_width(3)
67
66
  cairo_context.stroke
68
67
 
@@ -71,7 +70,7 @@ window {
71
70
  cairo_context.curve_to 190, 60, 200, 80, 210, 70
72
71
  cairo_context.curve_to 240, 80, 250, 100, 260, 90
73
72
  cairo_context.curve_to 290, 90, 300, 110, 310, 100
74
- cairo_context.set_source_rgb(0, 255, 0)
73
+ cairo_context.set_source_rgb(0, 255/255.0, 0)
75
74
  cairo_context.fill
76
75
 
77
76
  cairo_context.new_path
@@ -79,7 +78,7 @@ window {
79
78
  cairo_context.curve_to 190, 60, 200, 80, 210, 70
80
79
  cairo_context.curve_to 240, 80, 250, 100, 260, 90
81
80
  cairo_context.curve_to 290, 90, 300, 110, 310, 100
82
- cairo_context.set_source_rgb(0, 0, 255)
81
+ cairo_context.set_source_rgb(0, 0, 255/255.0)
83
82
  cairo_context.stroke
84
83
 
85
84
  cairo_context.new_path
@@ -90,7 +89,7 @@ window {
90
89
  cairo_context.line_to 200, 200
91
90
  cairo_context.line_to 180, 170
92
91
  cairo_context.close_path
93
- cairo_context.set_source_rgb(0, 255, 0)
92
+ cairo_context.set_source_rgb(0, 255/255.0, 0)
94
93
  cairo_context.fill
95
94
 
96
95
  cairo_context.new_path
@@ -101,7 +100,7 @@ window {
101
100
  cairo_context.line_to 200, 200
102
101
  cairo_context.line_to 180, 170
103
102
  cairo_context.close_path
104
- cairo_context.set_source_rgb(0, 0, 255)
103
+ cairo_context.set_source_rgb(0, 0, 255/255.0)
105
104
  cairo_context.stroke
106
105
 
107
106
  cairo_context.new_path
@@ -112,7 +111,7 @@ window {
112
111
  cairo_context.line_to 200, 280
113
112
  cairo_context.line_to 180, 270
114
113
  cairo_context.close_path
115
- cairo_context.set_source_rgb(0, 255, 0)
114
+ cairo_context.set_source_rgb(0, 255/255.0, 0)
116
115
  cairo_context.fill
117
116
 
118
117
  cairo_context.new_path
@@ -123,7 +122,7 @@ window {
123
122
  cairo_context.line_to 200, 280
124
123
  cairo_context.line_to 180, 270
125
124
  cairo_context.close_path
126
- cairo_context.set_source_rgb(0, 0, 255)
125
+ cairo_context.set_source_rgb(0, 0, 255/255.0)
127
126
  cairo_context.stroke
128
127
 
129
128
  cairo_context.new_path
@@ -133,7 +132,7 @@ window {
133
132
  cairo_context.line_to 220, 340
134
133
  cairo_context.line_to 200, 330
135
134
  cairo_context.line_to 180, 320
136
- cairo_context.set_source_rgb(0, 0, 255)
135
+ cairo_context.set_source_rgb(0, 0, 255/255.0)
137
136
  cairo_context.stroke
138
137
  end
139
138
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-gtk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-27 00:00:00.000000000 Z
11
+ date: 2022-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glimmer
@@ -142,7 +142,8 @@ dependencies:
142
142
  - - ">"
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
- description: Glimmer DSL for GTK - Ruby-GNOME Desktop Development GUI Library
145
+ description: Glimmer DSL for GTK - Ruby-GNOME Desktop Development GUI Library - Supports
146
+ all GTK widgets and Cairo graphics
146
147
  email: andy.am@gmail.com
147
148
  executables:
148
149
  - girb
@@ -159,6 +160,7 @@ files:
159
160
  - bin/girb
160
161
  - bin/girb_runner.rb
161
162
  - glimmer-dsl-gtk.gemspec
163
+ - images/breaking-blue-wave.png
162
164
  - lib/glimmer-dsl-gtk.rb
163
165
  - lib/glimmer/dsl/gtk/dsl.rb
164
166
  - lib/glimmer/dsl/gtk/observe_expression.rb
@@ -170,6 +172,7 @@ files:
170
172
  - lib/glimmer/gtk.rb
171
173
  - lib/glimmer/gtk/shape.rb
172
174
  - lib/glimmer/gtk/shape/arc.rb
175
+ - lib/glimmer/gtk/shape/arc_negative.rb
173
176
  - lib/glimmer/gtk/shape/circle.rb
174
177
  - lib/glimmer/gtk/shape/path.rb
175
178
  - lib/glimmer/gtk/shape/polygon.rb
@@ -178,12 +181,29 @@ files:
178
181
  - lib/glimmer/gtk/shape/rounded_rectangle.rb
179
182
  - lib/glimmer/gtk/shape/square.rb
180
183
  - lib/glimmer/gtk/shape/triangle.rb
184
+ - lib/glimmer/gtk/transformable.rb
181
185
  - lib/glimmer/gtk/widget_proxy.rb
182
186
  - lib/glimmer/gtk/widget_proxy/application_proxy.rb
183
187
  - lib/glimmer/gtk/widget_proxy/box_proxy.rb
184
188
  - lib/glimmer/gtk/widget_proxy/drawing_area_proxy.rb
185
189
  - lib/glimmer/gtk/widget_proxy/message_dialog_proxy.rb
186
190
  - lib/glimmer/gtk/widget_proxy/window_proxy.rb
191
+ - samples/cairo/arc.rb
192
+ - samples/cairo/arc_negative.rb
193
+ - samples/cairo/clip.rb
194
+ - samples/cairo/clip_image.rb
195
+ - samples/cairo/curve_to.rb
196
+ - samples/cairo/dashes.rb
197
+ - samples/cairo/fill_and_stroke2.rb
198
+ - samples/cairo/fill_style.rb
199
+ - samples/cairo/gradient.rb
200
+ - samples/cairo/image.rb
201
+ - samples/cairo/image_gradient.rb
202
+ - samples/cairo/multi_segment_caps.rb
203
+ - samples/cairo/rounded_rectangle.rb
204
+ - samples/cairo/set_line_cap.rb
205
+ - samples/cairo/set_line_join.rb
206
+ - samples/cairo/text.rb
187
207
  - samples/elaborate/tetris.rb
188
208
  - samples/elaborate/tetris/model/block.rb
189
209
  - samples/elaborate/tetris/model/game.rb