rsvg2 2.2.3-x86-mingw32 → 2.2.4-x86-mingw32
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
- data/Rakefile +1 -2
- data/ext/rsvg2/extconf.rb +2 -15
- data/ext/rsvg2/rbrsvghandle.c +46 -25
- data/ext/rsvg2/rsvg2.h +4 -2
- data/lib/2.0/rsvg2.so +0 -0
- data/lib/2.1/rsvg2.so +0 -0
- data/lib/2.2/rsvg2.so +0 -0
- data/test/rsvg2-test-utils.rb +23 -0
- data/test/run-test.rb +49 -0
- data/test/test-handle.rb +91 -0
- data/vendor/local/bin/croco-0.6-config +3 -3
- data/vendor/local/bin/csslint-0.6.exe +0 -0
- data/vendor/local/bin/libcroco-0.6-3.dll +0 -0
- data/vendor/local/bin/librsvg-2-2.dll +0 -0
- data/vendor/local/bin/rsvg-convert.exe +0 -0
- data/vendor/local/include/librsvg-2.0/librsvg/librsvg-features.h +2 -2
- data/vendor/local/include/librsvg-2.0/librsvg/rsvg.h +31 -10
- data/vendor/local/lib/girepository-1.0/Rsvg-2.0.typelib +0 -0
- data/vendor/local/lib/libcroco-0.6.a +0 -0
- data/vendor/local/lib/libcroco-0.6.dll.a +0 -0
- data/vendor/local/lib/libcroco-0.6.la +2 -2
- data/vendor/local/lib/librsvg-2.a +0 -0
- data/vendor/local/lib/librsvg-2.dll.a +0 -0
- data/vendor/local/lib/librsvg-2.la +3 -3
- data/vendor/local/lib/pkgconfig/libcroco-0.6.pc +1 -1
- data/vendor/local/lib/pkgconfig/librsvg-2.0.pc +2 -2
- data/vendor/local/share/gir-1.0/Rsvg-2.0.gir +75 -42
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/RsvgHandle.html +1046 -699
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/annotation-glossary.html +26 -26
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-14.html +16 -19
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-22.html +13 -16
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-32.html +14 -17
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-36.html +15 -20
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-4.html +12 -15
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-8.html +17 -22
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-9.html +18 -23
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-deprecated.html +31 -36
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-full.html +80 -85
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/index.html +4 -4
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/index.sgml +30 -25
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/left-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/licence.html +9 -9
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/object-tree.html +15 -15
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/right-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-2.0.devhelp2 +55 -57
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-GIO.html +253 -176
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-GdkPixbuf.html +337 -239
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-cairo.html +96 -68
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Version-check-and-feature-tests.html +83 -50
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg.html +9 -9
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/style.css +314 -104
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/up-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/up.png +0 -0
- metadata +11 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2c6d80cf1abaee2e065ede4c4e5e32e1548983b
|
4
|
+
data.tar.gz: 7b532c1882475492bc85b9e6465704f07ea00a90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eaa431733aeabac011a7c0b4cb73b06765f581208fb81212c0d46cdb6442912d30d932943f4304d29668561ed0fdd36b5684fe7ce6badd4a8b1e5af6c90520bc
|
7
|
+
data.tar.gz: 7942170fcb4db6d77235dc647d4ca19b32c154b541e315395d2b06f8275d9bd8e32592c1bd9862dd3c5bc2ac444753541bd2e0a1dceb70ce963bb52e85714aef
|
data/Rakefile
CHANGED
@@ -52,14 +52,13 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
52
52
|
:name => "librsvg",
|
53
53
|
:download_site => :gnome,
|
54
54
|
:label => "librsvg",
|
55
|
-
:version => "2.40.
|
55
|
+
:version => "2.40.6",
|
56
56
|
:compression_method => "xz",
|
57
57
|
:windows => {
|
58
58
|
:configure_args => [
|
59
59
|
"--enable-introspection",
|
60
60
|
],
|
61
61
|
:patches => [
|
62
|
-
"librsvg-2.40.1-replace-canonicalize-file-name.diff",
|
63
62
|
],
|
64
63
|
:built_file => "bin/librsvg-2-2.dll",
|
65
64
|
},
|
data/ext/rsvg2/extconf.rb
CHANGED
@@ -39,24 +39,11 @@ end
|
|
39
39
|
:target_build_dir => build_dir)
|
40
40
|
end
|
41
41
|
|
42
|
-
|
43
|
-
rcairo_source_dir_names = ["rcairo"]
|
44
|
-
if /mingw|cygwin|mswin/ =~ RUBY_PLATFORM
|
45
|
-
rcairo_source_dir_names.unshift("rcairo.win32")
|
46
|
-
end
|
47
|
-
rcairo_source_dir_names.each do |rcairo_source_dir_name|
|
48
|
-
rcairo_source_dir = top_dir.parent.expand_path + rcairo_source_dir_name
|
49
|
-
if rcairo_source_dir.exist?
|
50
|
-
rcairo_options[:rcairo_source_dir] = rcairo_source_dir.to_s
|
51
|
-
break
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
unless check_cairo(rcairo_options)
|
42
|
+
unless check_cairo(:top_dir => top_dir)
|
56
43
|
exit(false)
|
57
44
|
end
|
58
45
|
|
59
|
-
|
46
|
+
setup_windows(module_name, base_dir)
|
60
47
|
|
61
48
|
unless required_pkg_config_package(package_id,
|
62
49
|
:debian => "librsvg2-dev",
|
data/ext/rsvg2/rbrsvghandle.c
CHANGED
@@ -109,13 +109,44 @@ rg_s_new_from_data(G_GNUC_UNUSED VALUE self, VALUE data)
|
|
109
109
|
}
|
110
110
|
|
111
111
|
static VALUE
|
112
|
-
rg_s_new_from_file(
|
112
|
+
rg_s_new_from_file(int argc, VALUE *argv, VALUE self)
|
113
113
|
{
|
114
|
+
VALUE rb_file_path, rb_options, rb_flags;
|
114
115
|
GError *error = NULL;
|
115
116
|
RsvgHandle *handle;
|
116
117
|
|
117
|
-
|
118
|
+
rb_scan_args(argc, argv, "11", &rb_file_path, &rb_options);
|
119
|
+
rbg_scan_options(rb_options,
|
120
|
+
"flags", &rb_flags,
|
121
|
+
NULL);
|
122
|
+
|
123
|
+
#if LIBRSVG_CHECK_VERSION(2, 40, 3)
|
124
|
+
{
|
125
|
+
GFile *file;
|
126
|
+
GCancellable *cancellable = NULL;
|
127
|
+
RsvgHandleFlags flags = RSVG_HANDLE_FLAGS_NONE;
|
128
|
+
|
129
|
+
if (!NIL_P(rb_flags)) {
|
130
|
+
flags = RVAL2GFLAGS(rb_flags, RSVG_TYPE_HANDLE_FLAGS);
|
131
|
+
}
|
132
|
+
|
133
|
+
file = g_file_new_for_path((const char *)RVAL2CSTR(rb_file_path));
|
134
|
+
handle = rsvg_handle_new_from_gfile_sync(file, flags,
|
135
|
+
cancellable,
|
136
|
+
&error);
|
137
|
+
g_object_unref(file);
|
138
|
+
}
|
139
|
+
#else
|
140
|
+
if (!NIL_P(rb_flags)) {
|
141
|
+
rb_raise(rb_eArgError,
|
142
|
+
"librsvg 2.40.3 or later is required for :flags: <%d.%d.%d>",
|
143
|
+
LIBRSVG_MAJOR_VERSION,
|
144
|
+
LIBRSVG_MINOR_VERSION,
|
145
|
+
LIBRSVG_MICRO_VERSION);
|
146
|
+
}
|
147
|
+
handle = rsvg_handle_new_from_file((const gchar *)RVAL2CSTR(rb_file_path),
|
118
148
|
&error);
|
149
|
+
#endif
|
119
150
|
|
120
151
|
if (error)
|
121
152
|
RAISE_GERROR(error);
|
@@ -232,21 +263,6 @@ rg_pixbuf(int argc, VALUE *argv, VALUE self)
|
|
232
263
|
return rb_pixbuf;
|
233
264
|
}
|
234
265
|
|
235
|
-
#if LIBRSVG_CHECK_VERSION(2, 9, 0)
|
236
|
-
static VALUE
|
237
|
-
rg_base_uri(VALUE self)
|
238
|
-
{
|
239
|
-
return CSTR2RVAL(rsvg_handle_get_base_uri(_SELF(self)));
|
240
|
-
}
|
241
|
-
|
242
|
-
static VALUE
|
243
|
-
rg_set_base_uri(VALUE self, VALUE base_uri)
|
244
|
-
{
|
245
|
-
rsvg_handle_set_base_uri(_SELF(self), RVAL2CSTR(base_uri));
|
246
|
-
return self;
|
247
|
-
}
|
248
|
-
#endif
|
249
|
-
|
250
266
|
#ifdef HAVE_TYPE_RSVGDIMENSIONDATA
|
251
267
|
static VALUE
|
252
268
|
rg_dimensions(VALUE self)
|
@@ -266,6 +282,7 @@ rg_dimensions(VALUE self)
|
|
266
282
|
}
|
267
283
|
#endif
|
268
284
|
|
285
|
+
#if !LIBRSVG_CHECK_VERSION(2, 36, 0)
|
269
286
|
/* Accessibility API */
|
270
287
|
static VALUE
|
271
288
|
rg_title(VALUE self)
|
@@ -279,12 +296,13 @@ rg_desc(VALUE self)
|
|
279
296
|
return CSTR2RVAL(rsvg_handle_get_desc(_SELF(self)));
|
280
297
|
}
|
281
298
|
|
282
|
-
#ifdef HAVE_RSVG_HANDLE_GET_METADATA
|
299
|
+
# ifdef HAVE_RSVG_HANDLE_GET_METADATA
|
283
300
|
static VALUE
|
284
301
|
rg_metadata(VALUE self)
|
285
302
|
{
|
286
303
|
return CSTR2RVAL(rsvg_handle_get_metadata(_SELF(self)));
|
287
304
|
}
|
305
|
+
# endif
|
288
306
|
#endif
|
289
307
|
|
290
308
|
#if !LIBRSVG_CHECK_VERSION(2, 11, 0)
|
@@ -432,7 +450,7 @@ Init_rsvg_handle(VALUE mRSVG)
|
|
432
450
|
|
433
451
|
#if LIBRSVG_CHECK_VERSION(2, 14, 0)
|
434
452
|
RG_DEF_SMETHOD(new_from_data, 1);
|
435
|
-
RG_DEF_SMETHOD(new_from_file, 1);
|
453
|
+
RG_DEF_SMETHOD(new_from_file, -1);
|
436
454
|
#endif
|
437
455
|
|
438
456
|
RG_DEF_METHOD(initialize, -1);
|
@@ -444,20 +462,17 @@ Init_rsvg_handle(VALUE mRSVG)
|
|
444
462
|
RG_DEF_METHOD_P(closed, 0);
|
445
463
|
RG_DEF_METHOD(pixbuf, -1);
|
446
464
|
|
447
|
-
#if LIBRSVG_CHECK_VERSION(2, 9, 0)
|
448
|
-
RG_DEF_METHOD(base_uri, 0);
|
449
|
-
RG_DEF_METHOD(set_base_uri, 1);
|
450
|
-
#endif
|
451
|
-
|
452
465
|
#ifdef HAVE_TYPE_RSVGDIMENSIONDATA
|
453
466
|
RG_DEF_METHOD(dimensions, 0);
|
454
467
|
#endif
|
455
468
|
|
469
|
+
#if !LIBRSVG_CHECK_VERSION(2, 36, 0)
|
456
470
|
/* Accessibility API */
|
457
471
|
RG_DEF_METHOD(title, 0);
|
458
472
|
RG_DEF_METHOD(desc, 0);
|
459
|
-
#ifdef HAVE_RSVG_HANDLE_GET_METADATA
|
473
|
+
# ifdef HAVE_RSVG_HANDLE_GET_METADATA
|
460
474
|
RG_DEF_METHOD(metadata, 0);
|
475
|
+
# endif
|
461
476
|
#endif
|
462
477
|
|
463
478
|
#if !LIBRSVG_CHECK_VERSION(2, 11, 0)
|
@@ -472,4 +487,10 @@ Init_rsvg_handle(VALUE mRSVG)
|
|
472
487
|
#ifdef HAVE_LIBRSVG_RSVG_CAIRO_H
|
473
488
|
RG_DEF_METHOD(render_cairo, -1);
|
474
489
|
#endif
|
490
|
+
|
491
|
+
#if LIBRSVG_CHECK_VERSION(2, 40, 3)
|
492
|
+
/* RsvgHandleFlags */
|
493
|
+
G_DEF_CLASS(RSVG_TYPE_HANDLE_FLAGS, "Flags", RG_TARGET_NAMESPACE);
|
494
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, RSVG_TYPE_HANDLE_FLAGS, "RSVG_HANDLE_");
|
495
|
+
#endif
|
475
496
|
}
|
data/ext/rsvg2/rsvg2.h
CHANGED
@@ -49,14 +49,16 @@ extern "C" {
|
|
49
49
|
# include "librsvg-enum-types.h"
|
50
50
|
#endif
|
51
51
|
|
52
|
-
#include <librsvg/librsvg-features.h>
|
53
|
-
|
54
52
|
#define LIBRSVG_CHECK_VERSION(major, minor, micro) \
|
55
53
|
(LIBRSVG_MAJOR_VERSION > (major) || \
|
56
54
|
(LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION > (minor)) || \
|
57
55
|
(LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION == (minor) && \
|
58
56
|
LIBRSVG_MICRO_VERSION >= (micro)))
|
59
57
|
|
58
|
+
#if !LIBRSVG_CHECK_VERSION(2, 36, 2)
|
59
|
+
# include <librsvg/librsvg-features.h>
|
60
|
+
#endif
|
61
|
+
|
60
62
|
|
61
63
|
G_GNUC_INTERNAL void Init_rsvg_handle(VALUE mRSVG);
|
62
64
|
G_GNUC_INTERNAL void Init_rsvg_dimensiondata(VALUE mRSVG);
|
data/lib/2.0/rsvg2.so
CHANGED
Binary file
|
data/lib/2.1/rsvg2.so
CHANGED
Binary file
|
data/lib/2.2/rsvg2.so
ADDED
Binary file
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Copyright (C) 2014 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "test-unit"
|
18
|
+
require "test/unit/notify"
|
19
|
+
|
20
|
+
require "fileutils"
|
21
|
+
|
22
|
+
module RSVG2TestUtils
|
23
|
+
end
|
data/test/run-test.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (C) 2014 Ruby-GNOME2 Project Team
|
4
|
+
#
|
5
|
+
# This library is free software; you can redistribute it and/or
|
6
|
+
# modify it under the terms of the GNU Lesser General Public
|
7
|
+
# License as published by the Free Software Foundation; either
|
8
|
+
# version 2.1 of the License, or (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This library is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public
|
16
|
+
# License along with this library; if not, write to the Free Software
|
17
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
|
19
|
+
ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
|
20
|
+
ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
|
21
|
+
|
22
|
+
glib_base = File.join(ruby_gnome2_base, "glib2")
|
23
|
+
gdk_pixbuf2_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
|
24
|
+
rsvg2_base = File.join(ruby_gnome2_base, "rsvg2")
|
25
|
+
|
26
|
+
have_make = system("which make > /dev/null")
|
27
|
+
|
28
|
+
modules = [
|
29
|
+
[glib_base, "glib2"],
|
30
|
+
[gdk_pixbuf2_base, "gdk_pixbuf2"],
|
31
|
+
[rsvg2_base, "rsvg2"],
|
32
|
+
]
|
33
|
+
modules.each do |target, module_name|
|
34
|
+
if File.exist?(File.join(target, "Makefile")) and have_make
|
35
|
+
`make -C #{target.dump} > /dev/null` or exit(false)
|
36
|
+
end
|
37
|
+
$LOAD_PATH.unshift(File.join(target, "ext", module_name))
|
38
|
+
$LOAD_PATH.unshift(File.join(target, "lib"))
|
39
|
+
end
|
40
|
+
|
41
|
+
$LOAD_PATH.unshift(File.join(glib_base, "test"))
|
42
|
+
require "glib-test-init"
|
43
|
+
|
44
|
+
$LOAD_PATH.unshift(File.join(rsvg2_base, "test"))
|
45
|
+
require "rsvg2-test-utils"
|
46
|
+
|
47
|
+
require "rsvg2"
|
48
|
+
|
49
|
+
exit Test::Unit::AutoRunner.run(true)
|
data/test/test-handle.rb
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# Copyright (C) 2014 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestHandle < Test::Unit::TestCase
|
18
|
+
sub_test_case ".new_from_file" do
|
19
|
+
sub_test_case "options" do
|
20
|
+
def setup
|
21
|
+
setup_svg
|
22
|
+
end
|
23
|
+
|
24
|
+
def setup_svg
|
25
|
+
@svg_path = "tmp/empty.svg"
|
26
|
+
return if File.exist?(@svg_path)
|
27
|
+
|
28
|
+
FileUtils.mkdir_p(File.dirname(@svg_path))
|
29
|
+
File.open(@svg_path, "w") do |svg|
|
30
|
+
svg.puts(<<-SVG)
|
31
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
32
|
+
<svg>
|
33
|
+
</svg>
|
34
|
+
SVG
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_empty_options
|
39
|
+
handle = RSVG::Handle.new_from_file(@svg_path, {})
|
40
|
+
assert_equal([0, 0, 0.0, 0.0],
|
41
|
+
handle.dimensions.to_a)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
sub_test_case ":flags => :unlimited" do
|
46
|
+
def setup
|
47
|
+
setup_large_svg
|
48
|
+
end
|
49
|
+
|
50
|
+
def setup_large_svg
|
51
|
+
@large_svg_path = "tmp/large-file.svg"
|
52
|
+
return if File.exist?(@large_svg_path)
|
53
|
+
|
54
|
+
FileUtils.mkdir_p(File.dirname(@large_svg_path))
|
55
|
+
large_byte = (10 * 1024 * 1024).to_i
|
56
|
+
File.open(@large_svg_path, "w") do |svg|
|
57
|
+
svg.puts(<<-SVG_HEADER)
|
58
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
59
|
+
<svg>
|
60
|
+
SVG_HEADER
|
61
|
+
large_byte.times do
|
62
|
+
svg.puts("\n")
|
63
|
+
end
|
64
|
+
svg.puts(<<-SVG_FOOTER)
|
65
|
+
</svg>
|
66
|
+
SVG_FOOTER
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_no_option
|
71
|
+
assert_raise(RSVG::Error::Failed) do
|
72
|
+
RSVG::Handle.new_from_file(@large_svg_path)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def test_unlimited
|
77
|
+
handle = RSVG::Handle.new_from_file(@large_svg_path,
|
78
|
+
:flags => :flag_unlimited)
|
79
|
+
assert_equal([0, 0, 0.0, 0.0],
|
80
|
+
handle.dimensions.to_a)
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_base_uri
|
84
|
+
handle = RSVG::Handle.new
|
85
|
+
uri_string = "test_base_uri"
|
86
|
+
handle.base_uri = uri_string
|
87
|
+
assert_match(uri_string, handle.base_uri)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#! /bin/sh
|
2
2
|
|
3
|
-
prefix=/home/
|
3
|
+
prefix=/home/vagrant/ruby-gnome2.win32/rsvg2/vendor/local
|
4
4
|
exec_prefix=${prefix}
|
5
5
|
exec_prefix_set=no
|
6
6
|
includedir=${prefix}/include
|
@@ -68,11 +68,11 @@ while test $# -gt 0; do
|
|
68
68
|
;;
|
69
69
|
|
70
70
|
--cflags)
|
71
|
-
echo -mms-bitfields -I/home/
|
71
|
+
echo -mms-bitfields -I/home/vagrant/ruby-gnome2.win32/glib2/vendor/local/include -I/home/vagrant/ruby-gnome2.win32/glib2/vendor/local/include/glib-2.0 -I/home/vagrant/ruby-gnome2.win32/glib2/vendor/local/lib/glib-2.0/include -I/home/vagrant/rcairo.win32/vendor/local/include/libxml2 @GLIB2_CFLAGS@ @LIBXML2_CFLAGS@
|
72
72
|
;;
|
73
73
|
|
74
74
|
--libs)
|
75
|
-
echo -L/home/
|
75
|
+
echo -L/home/vagrant/ruby-gnome2.win32/glib2/vendor/local/lib -L/home/vagrant/rcairo.win32/vendor/local/lib -lglib-2.0 -lintl -lxml2 @GLIB2_LIBS@ @LIBXML2_LIBS@
|
76
76
|
;;
|
77
77
|
|
78
78
|
*)
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -7,8 +7,8 @@
|
|
7
7
|
|
8
8
|
#define LIBRSVG_MAJOR_VERSION (2)
|
9
9
|
#define LIBRSVG_MINOR_VERSION (40)
|
10
|
-
#define LIBRSVG_MICRO_VERSION (
|
11
|
-
#define LIBRSVG_VERSION "2.40.
|
10
|
+
#define LIBRSVG_MICRO_VERSION (6)
|
11
|
+
#define LIBRSVG_VERSION "2.40.6"
|
12
12
|
|
13
13
|
#define LIBRSVG_CHECK_VERSION(major,minor,micro) \
|
14
14
|
(LIBRSVG_MAJOR_VERSION > (major) || \
|
@@ -54,8 +54,9 @@ GType rsvg_handle_get_type (void);
|
|
54
54
|
|
55
55
|
/**
|
56
56
|
* RsvgError:
|
57
|
+
* @RSVG_ERROR_FAILED: the request failed
|
57
58
|
*
|
58
|
-
* An enumeration representing possible
|
59
|
+
* An enumeration representing possible errors
|
59
60
|
*/
|
60
61
|
typedef enum {
|
61
62
|
RSVG_ERROR_FAILED
|
@@ -67,7 +68,7 @@ GQuark rsvg_error_quark (void) G_GNUC_CONST;
|
|
67
68
|
/**
|
68
69
|
* RsvgHandle:
|
69
70
|
*
|
70
|
-
* The RsvgHandle is an object representing the parsed form of a SVG
|
71
|
+
* The #RsvgHandle is an object representing the parsed form of a SVG
|
71
72
|
*/
|
72
73
|
typedef struct _RsvgHandle RsvgHandle;
|
73
74
|
typedef struct RsvgHandlePrivate RsvgHandlePrivate;
|
@@ -75,9 +76,16 @@ typedef struct _RsvgHandleClass RsvgHandleClass;
|
|
75
76
|
typedef struct _RsvgDimensionData RsvgDimensionData;
|
76
77
|
typedef struct _RsvgPositionData RsvgPositionData;
|
77
78
|
|
79
|
+
/**
|
80
|
+
* RsvgHandleClass:
|
81
|
+
* @parent: parent class
|
82
|
+
*
|
83
|
+
* Class structure for #RsvgHandle
|
84
|
+
*/
|
78
85
|
struct _RsvgHandleClass {
|
79
86
|
GObjectClass parent;
|
80
87
|
|
88
|
+
/*< private >*/
|
81
89
|
gpointer _abi_padding[15];
|
82
90
|
};
|
83
91
|
|
@@ -107,6 +115,9 @@ struct _RsvgDimensionData {
|
|
107
115
|
|
108
116
|
/**
|
109
117
|
* RsvgPositionData:
|
118
|
+
* @x: position on the x axis
|
119
|
+
* @y: position on the y axis
|
120
|
+
*
|
110
121
|
* Position of an SVG fragment.
|
111
122
|
*/
|
112
123
|
struct _RsvgPositionData {
|
@@ -141,9 +152,22 @@ gboolean rsvg_handle_has_sub (RsvgHandle * handle, const char *id);
|
|
141
152
|
|
142
153
|
/* GIO APIs */
|
143
154
|
|
155
|
+
/**
|
156
|
+
* RsvgHandleFlags:
|
157
|
+
* @RSVG_HANDLE_FLAGS_NONE: none
|
158
|
+
* @RSVG_HANDLE_FLAG_UNLIMITED: Allow any SVG XML without size limitations.
|
159
|
+
* For security reasons, this should only be used for trusted input!
|
160
|
+
* Since: 2.40.3
|
161
|
+
* @RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA: Keeps the image data when loading images,
|
162
|
+
* for use by cairo when painting to e.g. a PDF surface. This will make the
|
163
|
+
* resulting PDF file smaller and faster.
|
164
|
+
* Since: 2.40.3
|
165
|
+
*/
|
144
166
|
typedef enum /*< flags >*/
|
145
167
|
{
|
146
|
-
RSVG_HANDLE_FLAGS_NONE
|
168
|
+
RSVG_HANDLE_FLAGS_NONE = 0,
|
169
|
+
RSVG_HANDLE_FLAG_UNLIMITED = 1 << 0,
|
170
|
+
RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA = 1 << 1
|
147
171
|
} RsvgHandleFlags;
|
148
172
|
|
149
173
|
RsvgHandle *rsvg_handle_new_with_flags (RsvgHandleFlags flags);
|
@@ -183,15 +207,12 @@ RSVG_DEPRECATED_FOR(g_object_unref)
|
|
183
207
|
void rsvg_handle_free (RsvgHandle * handle);
|
184
208
|
|
185
209
|
/**
|
186
|
-
* RsvgSizeFunc
|
187
|
-
* @width:
|
188
|
-
* @height:
|
189
|
-
* @user_data:
|
210
|
+
* RsvgSizeFunc:
|
211
|
+
* @width: (out): the width of the SVG
|
212
|
+
* @height: (out): the height of the SVG
|
213
|
+
* @user_data: user data
|
190
214
|
*
|
191
215
|
* Function to let a user of the library specify the SVG's dimensions
|
192
|
-
* @width: the ouput width the SVG should be
|
193
|
-
* @height: the output height the SVG should be
|
194
|
-
* @user_data: user data
|
195
216
|
*
|
196
217
|
* Deprecated: Set up a cairo matrix and use rsvg_handle_render_cairo() instead.
|
197
218
|
*/
|