rsvg2 3.4.1 → 3.4.2

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
  SHA256:
3
- metadata.gz: c1cf403e910c49b1726b58bc528c9fe4bbc45a50cd19eb9c0bf074e1bfca11ea
4
- data.tar.gz: d9b1dc6e71cb0fa71de2d12bca8f5daf23416c7350acd78c15aad5afeafe9445
3
+ metadata.gz: 35b2141d0eae94718dfe754cb2bc9bf938a22587db18a54c44806181f11150b7
4
+ data.tar.gz: fdf7a7105f5bf1dd554c283b7ce8de82156fe6c2ef5c3f4938ca2e7a5f3eec35
5
5
  SHA512:
6
- metadata.gz: f964742b1612e7791ca91ef1ae99d54c142395903b96db2e5d50aea41617bac8153f473662a02732063e2a3d438f1503f150fe32705fbb27b284a116cc5eba4d
7
- data.tar.gz: 25a0de739478d5ff68bf3c418884e53aef975ef72fb37e4aa85ad62afc8fdd00ec745a2e819e91cd1e7f16dc6163f61ab5d51a118a2a3ec8ba5133ca20d51ce3
6
+ metadata.gz: b2f239eef23d7a1b8b678b95804bcb5bc961b6a3cef9bb2618c6dc52991afd8132db32d1a1f72fd4f3bf91d61e75b04d51c8b474a484f7721582615daab04ea8
7
+ data.tar.gz: 249010f304d65c0e2aa6b2ec9739b018d3b924a81536dd023c6e2dd39ffaf3b779b9ea3700383625361a0ac02cc51276a9ab13e714ceb057e2be24d5d91b19de
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'gtk2'
3
+ require 'gtk3'
4
4
  require 'rsvg2'
5
5
 
6
6
  if ARGV.size != 1
@@ -15,15 +15,12 @@ width, height = handle.dimensions.to_a
15
15
 
16
16
  window = Gtk::Window.new
17
17
  window.set_default_size(width, height)
18
- area = Gtk::DrawingArea.new
19
-
20
- window.signal_connect(:destroy) do
21
- Gtk.main_quit
22
- end
18
+ window.signal_connect(:destroy) { Gtk.main_quit }
23
19
 
24
- area.signal_connect(:expose_event) do |widget, event|
20
+ area = Gtk::DrawingArea.new
21
+ area.signal_connect(:draw) do |widget, _event|
25
22
  context = widget.window.create_cairo_context
26
- window_width, window_height = widget.window.size
23
+ window_width, window_height = widget.window.width, widget.window.height
27
24
  context.scale(window_width.to_f / width, window_height.to_f / height)
28
25
  context.render_rsvg_handle(handle)
29
26
  end
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # Copyright (C) 2014-2017 Ruby-GNOME2 Project Team
3
+ # Copyright (C) 2014-2020 Ruby-GNOME Project Team
4
4
  #
5
5
  # This library is free software; you can redistribute it and/or
6
6
  # modify it under the terms of the GNU Lesser General Public
@@ -16,14 +16,14 @@
16
16
  # License along with this library; if not, write to the Free Software
17
17
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 
19
- ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
20
- ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
19
+ ruby_gnome_base = File.join(File.dirname(__FILE__), "..", "..")
20
+ ruby_gnome_base = File.expand_path(ruby_gnome_base)
21
21
 
22
- glib_base = File.join(ruby_gnome2_base, "glib2")
23
- gio2_base = File.join(ruby_gnome2_base, "gio2")
24
- gdk_pixbuf2_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
25
- gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
26
- rsvg2_base = File.join(ruby_gnome2_base, "rsvg2")
22
+ glib_base = File.join(ruby_gnome_base, "glib2")
23
+ gio2_base = File.join(ruby_gnome_base, "gio2")
24
+ gdk_pixbuf2_base = File.join(ruby_gnome_base, "gdk_pixbuf2")
25
+ gobject_introspection_base = File.join(ruby_gnome_base, "gobject-introspection")
26
+ rsvg2_base = File.join(ruby_gnome_base, "rsvg2")
27
27
 
28
28
  have_make = system("which make > /dev/null")
29
29
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2014 Ruby-GNOME2 Project Team
1
+ # Copyright (C) 2014-2020 Ruby-GNOME Project Team
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -85,4 +85,17 @@ class TestHandle < Test::Unit::TestCase
85
85
  end
86
86
  end
87
87
  end
88
+
89
+ test "#stylesheet=" do
90
+ only_rsvg_version(2, 48)
91
+ svg = <<-SVG
92
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
93
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
94
+ <rect id="rectangle" x="0" y="10" width="100" height="100"/>
95
+ </svg>
96
+ SVG
97
+ handle = Rsvg::Handle.new(data: svg)
98
+ handle.stylesheet = "rect {fill: red;}"
99
+ # TODO: Assert rendered color
100
+ end
88
101
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsvg2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-16 00:00:00.000000000 Z
11
+ date: 2020-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gdk_pixbuf2
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.4.1
19
+ version: 3.4.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.4.1
26
+ version: 3.4.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: cairo-gobject
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.4.1
33
+ version: 3.4.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.4.1
40
+ version: 3.4.2
41
41
  description: Ruby/RSVG2 is a Ruby binding of librsvg-2.x.
42
42
  email: ruby-gnome2-devel-en@lists.sourceforge.net
43
43
  executables: []
@@ -84,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
- rubyforge_project:
88
- rubygems_version: 2.7.6.2
87
+ rubygems_version: 3.2.0.pre1
89
88
  signing_key:
90
89
  specification_version: 4
91
90
  summary: Ruby/RSVG2 is a Ruby binding of librsvg-2.x.