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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -4
- data/lib/gtk2svg.rb +28 -14
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c328f57948ea7c88a00d4435e4ea49fea7bd0359
|
4
|
+
data.tar.gz: b2e125a43197eb912201b301e824648c921bb328
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
2
|
-
|
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�Bn����^ν���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
|
-
|
217
|
-
|
218
|
-
area = Gtk::DrawingArea.new
|
219
|
-
|
220
|
-
area.signal_connect("expose_event") do
|
240
|
+
svg = File.read(ARGV[0])
|
221
241
|
|
222
|
-
|
223
|
-
drawing.render Gtk2SVG::Render.new(s).to_a
|
242
|
+
app = Gtk2SVG::Main.new svg
|
224
243
|
|
225
|
-
|
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.
|
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-
|
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
|