gtk2svg 0.3.11 → 0.3.12
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 +13 -6
- 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: 6c1ceb0f138b980dab35e1127b4eb77743dad17e
|
|
4
|
+
data.tar.gz: 02499d19f6a2d052c603f345f58277ec2dd4ff9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0cd43ecb7a33d4da00935a75e2f8ee281b6fda78c98e951cb64f5ef96d54f163a5e1e805dc66e7305acebc4520b38d158b5c322250406d879b48ca9a73266586
|
|
7
|
+
data.tar.gz: 6e61cd1053a3f8b821d0c6ec6a8924b4c21748daaf010247f48408c3f13e71eb8293508e613ebc5e71fd4b929fcb7af36cb9305d4c663298b2461a523135d315
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/gtk2svg.rb
CHANGED
|
@@ -185,8 +185,8 @@ module Gtk2SVG
|
|
|
185
185
|
|
|
186
186
|
layout = Pango::Layout.new(Gdk::Pango.context)
|
|
187
187
|
layout.font_description = Pango::FontDescription.\
|
|
188
|
-
new('Sans ' + style[:
|
|
189
|
-
layout.text = text
|
|
188
|
+
new('Sans ' + style[:'font-size'])
|
|
189
|
+
layout.text = text.strip
|
|
190
190
|
|
|
191
191
|
gc = gc_ini(fill: style[:fill] || :none)
|
|
192
192
|
@area.window.draw_layout(gc, x, y, layout)
|
|
@@ -280,14 +280,21 @@ module Gtk2SVG
|
|
|
280
280
|
window.set_default_size(@width, @height)
|
|
281
281
|
end
|
|
282
282
|
|
|
283
|
+
@dirty = true
|
|
284
|
+
|
|
283
285
|
area.signal_connect("expose_event") do
|
|
284
286
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
287
|
+
if @dirty then
|
|
288
|
+
|
|
289
|
+
Thread.new { @doc.root.xpath('//script').each {|x| eval x.text.unescape } }
|
|
288
290
|
|
|
291
|
+
@instructions = Gtk2SVG::Render.new(@doc).to_a
|
|
292
|
+
end
|
|
293
|
+
|
|
289
294
|
drawing = DrawingInstructions.new area
|
|
290
|
-
drawing.render
|
|
295
|
+
drawing.render @instructions
|
|
296
|
+
@dirty = false
|
|
297
|
+
|
|
291
298
|
end
|
|
292
299
|
|
|
293
300
|
area.add_events(Gdk::Event::POINTER_MOTION_MASK)
|
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.12
|
|
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-26 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: gtk2
|
metadata.gz.sig
CHANGED
|
Binary file
|