gtk2svg 0.3.11 → 0.3.12

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: 19688326432c2cd02b4c5caae879363862998286
4
- data.tar.gz: aac9a49df6b150058c1ec845ccbc289c6722f89f
3
+ metadata.gz: 6c1ceb0f138b980dab35e1127b4eb77743dad17e
4
+ data.tar.gz: 02499d19f6a2d052c603f345f58277ec2dd4ff9b
5
5
  SHA512:
6
- metadata.gz: abb83cb96b30a96d6c967e553ca5f3817fbd3fc819945c9550068efea447c3a7d5867e7aa8f09a023719dc737d036147c1c92f7ea1378401da916e30b1f35606
7
- data.tar.gz: 7be8bfd701976e640b21006caa4806b8e5cb925d193f28d1592778428d9bafb5fa5ce739adf59d9f605a4eb470da5dc718af88afd9df958583335dc2afd0f838
6
+ metadata.gz: 0cd43ecb7a33d4da00935a75e2f8ee281b6fda78c98e951cb64f5ef96d54f163a5e1e805dc66e7305acebc4520b38d158b5c322250406d879b48ca9a73266586
7
+ data.tar.gz: 6e61cd1053a3f8b821d0c6ec6a8924b4c21748daaf010247f48408c3f13e71eb8293508e613ebc5e71fd4b929fcb7af36cb9305d4c663298b2461a523135d315
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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[:font_size])
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
- Thread.new { @doc.root.xpath('//script').each {|x| eval x.text.unescape } }
286
-
287
- a = Render.new(@doc).to_a
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 a
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.11
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-25 00:00:00.000000000 Z
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