gtk2svg 0.3.10 → 0.3.11
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/gtk2svg.rb +8 -20
- 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: 19688326432c2cd02b4c5caae879363862998286
|
|
4
|
+
data.tar.gz: aac9a49df6b150058c1ec845ccbc289c6722f89f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: abb83cb96b30a96d6c967e553ca5f3817fbd3fc819945c9550068efea447c3a7d5867e7aa8f09a023719dc737d036147c1c92f7ea1378401da916e30b1f35606
|
|
7
|
+
data.tar.gz: 7be8bfd701976e640b21006caa4806b8e5cb925d193f28d1592778428d9bafb5fa5ce739adf59d9f605a4eb470da5dc718af88afd9df958583335dc2afd0f838
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/gtk2svg.rb
CHANGED
|
@@ -6,7 +6,7 @@ require 'gtk2'
|
|
|
6
6
|
require 'dom_render'
|
|
7
7
|
require 'svgle'
|
|
8
8
|
|
|
9
|
-
# Description: Experimental gem to render SVG within
|
|
9
|
+
# Description: Experimental gem to render SVG within a GTK2 application.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -282,14 +282,8 @@ module Gtk2SVG
|
|
|
282
282
|
|
|
283
283
|
area.signal_connect("expose_event") do
|
|
284
284
|
|
|
285
|
-
Thread.new
|
|
286
|
-
|
|
287
|
-
@doc.root.each_recursive do |x|
|
|
288
|
-
eval x.text.unescape if x.name == 'script'
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
end
|
|
292
|
-
|
|
285
|
+
Thread.new { @doc.root.xpath('//script').each {|x| eval x.text.unescape } }
|
|
286
|
+
|
|
293
287
|
a = Render.new(@doc).to_a
|
|
294
288
|
|
|
295
289
|
drawing = DrawingInstructions.new area
|
|
@@ -300,12 +294,9 @@ module Gtk2SVG
|
|
|
300
294
|
|
|
301
295
|
area.signal_connect('motion_notify_event') do |item, event|
|
|
302
296
|
|
|
303
|
-
@doc.root.
|
|
297
|
+
@doc.root.xpath('//*[@onmousemove]').each do |x|
|
|
304
298
|
|
|
305
|
-
|
|
306
|
-
#onmousemove(event.x,event.y)
|
|
307
|
-
eval x.onmousemove()
|
|
308
|
-
end
|
|
299
|
+
eval x.onmousemove() if x.hotspot? event.x, event.y
|
|
309
300
|
|
|
310
301
|
end
|
|
311
302
|
end
|
|
@@ -314,13 +305,9 @@ module Gtk2SVG
|
|
|
314
305
|
|
|
315
306
|
area.signal_connect "button_press_event" do |item,event|
|
|
316
307
|
|
|
317
|
-
@doc.root.
|
|
308
|
+
@doc.root.xpath('//*[@onmousedown]').each do |x|
|
|
318
309
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
eval x.onmousedown()
|
|
322
|
-
|
|
323
|
-
end
|
|
310
|
+
eval x.onmousedown() if x.hotspot? event.x, event.y
|
|
324
311
|
|
|
325
312
|
end
|
|
326
313
|
end
|
|
@@ -336,6 +323,7 @@ module Gtk2SVG
|
|
|
336
323
|
end
|
|
337
324
|
|
|
338
325
|
def refresh()
|
|
326
|
+
@dirty = true
|
|
339
327
|
@area.queue_draw
|
|
340
328
|
end
|
|
341
329
|
|
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.
|
|
4
|
+
version: 0.3.11
|
|
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-25 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: gtk2
|
metadata.gz.sig
CHANGED
|
Binary file
|