gtk2svg 0.1.3 → 0.2.0

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: 7a28f74926618fa9722db12e05476fc6342d2158
4
- data.tar.gz: a92730f4716da4152ce4a612a3baab5846efcbea
3
+ metadata.gz: c328f57948ea7c88a00d4435e4ea49fea7bd0359
4
+ data.tar.gz: b2e125a43197eb912201b301e824648c921bb328
5
5
  SHA512:
6
- metadata.gz: 0b87717bb3a542e397d90eda891d6b7e02b61d79badff3b2c5792b20855b6ec8ddfc705bca9e43608353e2d8b6f8a70eaf5e0b7482180af765e1b6f9e87f3d90
7
- data.tar.gz: 954b8c6b99f1e36148d37edc39e75f496eacd42cfc6eb5dd01dae6df6f4154b2790b5f7024dfcd1822e28c2bcb1109ff1a297e80770d0d7c1eb4a3148407f1c2
6
+ metadata.gz: 0f8d8769120799c24f0d8f44ef9ce19f21a6974929f4e4962c1ba307108932630bb6b35968d77dd0a4bf63faf733639488e0fbce225849b1c4656fb8374299f0
7
+ data.tar.gz: eaa49e1baa8623bb57e13deef433a4e11aba0db50935f286abf65c99ef4a7301f22d77df872f33feecfb5483af81b05002c8d72b21e68c201d798cfcbbfeaa30
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1,4 +1,2 @@
1
- R����cѶW��Wɟ����'f��YA]����[�������t
2
- �*��2"���uq��1�b��ê
3
- 56��P]Ct�=�DV�F�_f�P����T�D^�٦�,pz
4
- UH���W���v���ƽ��*���h��� Ae��w�E�1�a�#I�߁��^�C�s��dGE ���N�/�̝,�hE�+����d8G(�8��'�/��ֱK�L��&�F:���.L��(�D���mQs������Y���ZS���
1
+ "��0���� ���c���DE�#8#��k5̅�0���c
2
+ I�j����s3�oU\�B��-���H�쉫7�B n����^ν���om��(�w��x�@W�h�=T:%��r��"S�1�̅"k�j�����.��` ��5�E���l��Z�4<�@���5!Q�K�3'
data/lib/gtk2svg.rb CHANGED
@@ -206,25 +206,39 @@ module Gtk2SVG
206
206
 
207
207
 
208
208
  end
209
+
210
+ class Main
211
+
212
+ attr_accessor :svg
213
+
214
+ def initialize(svg)
215
+
216
+ @svg = svg
217
+ @area = area = Gtk::DrawingArea.new
218
+
219
+ area.signal_connect("expose_event") do
220
+ a = Render.new(@svg).to_a
221
+ drawing = DrawingInstructions.new area
222
+ drawing.render a
223
+ end
224
+
225
+ Gtk::Window.new.add(area).show_all
226
+ Thread.new {Gtk.main }
227
+ end
228
+
229
+ def refresh()
230
+ @area.queue_draw
231
+ end
232
+
233
+ end
209
234
  end
210
235
 
211
236
 
212
-
213
237
  if __FILE__ == $0 then
214
238
 
215
239
  # Read an SVG file
216
- s = File.read(ARGV[0])
217
-
218
- area = Gtk::DrawingArea.new
219
-
220
- area.signal_connect("expose_event") do
240
+ svg = File.read(ARGV[0])
221
241
 
222
- drawing = Gtk2SVG::DrawingInstructions.new area
223
- drawing.render Gtk2SVG::Render.new(s).to_a
242
+ app = Gtk2SVG::Main.new svg
224
243
 
225
- end
226
-
227
- Gtk::Window.new.add(area).show_all
228
- Gtk.main
229
-
230
- end
244
+ 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.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  fnNu6z0ydxzHCvBhE0pU4jDzxPTASZiyllpSpQgz9OX3DAlUgWFQLHmj1hGk6GH4
32
32
  QldMu2GTc/3h2w==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-11-21 00:00:00.000000000 Z
34
+ date: 2015-11-22 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: gtk2
metadata.gz.sig CHANGED
Binary file