gtk2svg 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0fe558967f563d8d4f111a47f1c6437c13d369a
4
- data.tar.gz: f0004931e1cac3e8fa85098dcfcaa4c05fbd0f40
3
+ metadata.gz: 3cd27c076a6295b4d03b26ce76fe32ef4052b82f
4
+ data.tar.gz: 0ec6e1a49c86a24545eb26f3fcd2eb711d582484
5
5
  SHA512:
6
- metadata.gz: 285349e48fb22a23d68cd8f7d2e56a072778d9d6ce6dceddfbd81ee67cc20e19e4b9bb81f3b7810438c53e33d4fdbcafb0c88e644e65edf9e5192ffd8273d909
7
- data.tar.gz: bec7350106552e774b66486d708c744fa136167862c50371fad7adf68925e763e38c9f9940b0853579017ad047f84059a57aa120b13641bb41c4c83ab194c6cf
6
+ metadata.gz: d4541d4d14ead9a7ded5ad1661d732a84e34be7fffdbfd85ad2132e1441ed6cb47d181e86aa0ef5030a8c2c56ece7b7325065438d5d1b3723a782bb4c367fa46
7
+ data.tar.gz: fcd1359c7b79dfde12b8d75d9c4acdf8c744f28ead3d7525656c38d06d97166fdbc4e2a3151421443264e29985971f425f3dedcb29b32c86826bc4c007692bb3
@@ -1,2 +1,3 @@
1
- �|['��} �����
2
- ,���\(�ߌ�h�=� n4&t������w��>@C6_��� X �����>��tS��°[ra�u�+��s#��D��[�/�X&a$LN$�� Gl�%Kx��c����9�f�1�۬7�%��i}2_|4�$v���G��\ZG G�.*:�=Ya~=�ܑƻ�xܫ��v�� ������4��m}爖H7��P�i�s�[: >�I۴VR@8g �6�.Pf�v}�e�
1
+ �S��ʗ����f})(3:� dh��朐E��L��
2
+ �)�����=���+�H(��eH8���BHt�@�P���۪cs|��}ph�p��+���8/ߥ(}I�\͞S'�=�[� �z�Os��]n�[#�����bb��[ZI>e�.��^W8���i ��!柸�}=q]�&���a���{�\F^��TV
3
+ N�<dמ����%4������9�v:B����oZ�6���� §Eu6�/�
data.tar.gz.sig CHANGED
Binary file
@@ -81,8 +81,15 @@ module Gtk2SVG
81
81
  [:script]
82
82
  end
83
83
 
84
- def svg(x, attributes, style)
85
- [:window, render_all(x)]
84
+ def svg(e, attributes, raw_style)
85
+
86
+ style = style_filter(attributes).merge(raw_style)
87
+
88
+ style[:fill] = style.delete :'background-color'
89
+ h = attributes
90
+ width, height = %i(width height).map{|x| h[x].to_i }
91
+
92
+ [:draw_rectangle, [0, 0, width, height], style, render_all(e)]
86
93
  end
87
94
 
88
95
  def text(e, attributes, raw_style)
@@ -164,6 +171,7 @@ module Gtk2SVG
164
171
  coords, style = args
165
172
 
166
173
  x1, y1, x2, y2 = coords
174
+
167
175
  gc = gc_ini(fill: style[:fill] || :none)
168
176
  @area.window.draw_rectangle(gc, 1, x1, y1, x2, y2)
169
177
  end
@@ -188,7 +196,8 @@ module Gtk2SVG
188
196
  end
189
197
 
190
198
  def render(a)
191
- draw a
199
+ method(a[0]).call(args=a[1..2])
200
+ draw a[3]
192
201
  end
193
202
 
194
203
  def script(args)
@@ -198,7 +207,7 @@ module Gtk2SVG
198
207
  private
199
208
 
200
209
  def draw(a)
201
-
210
+
202
211
  a.each do |rawx|
203
212
 
204
213
  x, *remaining = rawx
@@ -260,6 +269,7 @@ module Gtk2SVG
260
269
 
261
270
  @svg = svg
262
271
  @doc = Svgle.new(svg, callback: self)
272
+
263
273
  @area = area = Gtk::DrawingArea.new
264
274
  client_code = []
265
275
 
@@ -281,6 +291,7 @@ module Gtk2SVG
281
291
  end
282
292
 
283
293
  a = Render.new(@doc).to_a
294
+
284
295
  drawing = DrawingInstructions.new area
285
296
  drawing.render a
286
297
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk2svg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -62,7 +62,7 @@ dependencies:
62
62
  version: '0.2'
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: 0.2.1
65
+ version: 0.2.2
66
66
  type: :runtime
67
67
  prerelease: false
68
68
  version_requirements: !ruby/object:Gem::Requirement
@@ -72,27 +72,27 @@ dependencies:
72
72
  version: '0.2'
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.2.1
75
+ version: 0.2.2
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: svgle
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.2'
82
+ version: '0.3'
83
83
  - - ">="
84
84
  - !ruby/object:Gem::Version
85
- version: 0.2.1
85
+ version: 0.3.1
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
89
89
  requirements:
90
90
  - - "~>"
91
91
  - !ruby/object:Gem::Version
92
- version: '0.2'
92
+ version: '0.3'
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: 0.2.1
95
+ version: 0.3.1
96
96
  description:
97
97
  email: james@r0bertson.co.uk
98
98
  executables: []
@@ -112,7 +112,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
112
  requirements:
113
113
  - - ">="
114
114
  - !ruby/object:Gem::Version
115
- version: '0'
115
+ version: 2.1.0
116
116
  required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  requirements:
118
118
  - - ">="
metadata.gz.sig CHANGED
Binary file