cairo 1.5.1 → 1.6.0
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.
- data/ChangeLog +153 -0
- data/NEWS +16 -2
- data/README +2 -0
- data/Rakefile +21 -7
- data/doc/doc.css +69 -0
- data/doc/en/cairo-antialias.html +27 -0
- data/doc/en/cairo-clip-not-representable-error.html +36 -0
- data/doc/en/cairo-color-base.html +58 -0
- data/doc/en/cairo-color-cmyk.html +146 -0
- data/doc/en/cairo-color-hsv.html +126 -0
- data/doc/en/cairo-color-rgb.html +131 -0
- data/doc/en/cairo-color-x11.html +162 -0
- data/doc/en/cairo-color.html +227 -0
- data/doc/en/cairo-content.html +26 -0
- data/doc/en/cairo-context-blur.html +28 -0
- data/doc/en/cairo-context-circle.html +28 -0
- data/doc/en/cairo-context-color.html +28 -0
- data/doc/en/cairo-context-path.html +33 -0
- data/doc/en/cairo-context-rectangle.html +28 -0
- data/doc/en/cairo-context-triangle.html +28 -0
- data/doc/en/cairo-context.html +622 -0
- data/doc/en/cairo-error.html +33 -0
- data/doc/en/cairo-extend.html +27 -0
- data/doc/en/cairo-file-not-found.html +36 -0
- data/doc/en/cairo-fill-rule.html +25 -0
- data/doc/en/cairo-filter.html +29 -0
- data/doc/en/cairo-font-extents.html +60 -0
- data/doc/en/cairo-font-face.html +27 -0
- data/doc/en/cairo-font-options.html +128 -0
- data/doc/en/cairo-font-slant.html +26 -0
- data/doc/en/cairo-font-weight.html +25 -0
- data/doc/en/cairo-format.html +35 -0
- data/doc/en/cairo-glyph.html +88 -0
- data/doc/en/cairo-gradient-pattern.html +63 -0
- data/doc/en/cairo-hint-metrics.html +26 -0
- data/doc/en/cairo-hint-style.html +28 -0
- data/doc/en/cairo-image-surface.html +71 -0
- data/doc/en/cairo-invalid-content-error.html +36 -0
- data/doc/en/cairo-invalid-dash-error.html +36 -0
- data/doc/en/cairo-invalid-dsc-comment-error.html +36 -0
- data/doc/en/cairo-invalid-format-error.html +36 -0
- data/doc/en/cairo-invalid-index-error.html +36 -0
- data/doc/en/cairo-invalid-matrix-error.html +36 -0
- data/doc/en/cairo-invalid-path-data-error.html +36 -0
- data/doc/en/cairo-invalid-pop-group-error.html +36 -0
- data/doc/en/cairo-invalid-restore-error.html +36 -0
- data/doc/en/cairo-invalid-status-error.html +36 -0
- data/doc/en/cairo-invalid-stride-error.html +36 -0
- data/doc/en/cairo-invalid-string-error.html +36 -0
- data/doc/en/cairo-invalid-visual-error.html +36 -0
- data/doc/en/cairo-line-cap.html +26 -0
- data/doc/en/cairo-line-join.html +26 -0
- data/doc/en/cairo-linear-pattern.html +49 -0
- data/doc/en/cairo-matrix.html +243 -0
- data/doc/en/cairo-no-current-point-error.html +36 -0
- data/doc/en/cairo-null-pointer-error.html +36 -0
- data/doc/en/cairo-operator.html +37 -0
- data/doc/en/cairo-paper-parse-error.html +36 -0
- data/doc/en/cairo-paper-unknown-paper-name.html +55 -0
- data/doc/en/cairo-paper-unknown-unit.html +55 -0
- data/doc/en/cairo-paper-unrecognized-paper-description.html +55 -0
- data/doc/en/cairo-paper.html +173 -0
- data/doc/en/cairo-path-close-path.html +38 -0
- data/doc/en/cairo-path-curve-to.html +38 -0
- data/doc/en/cairo-path-data-type.html +27 -0
- data/doc/en/cairo-path-data.html +87 -0
- data/doc/en/cairo-path-line-to.html +38 -0
- data/doc/en/cairo-path-move-to.html +38 -0
- data/doc/en/cairo-path.html +144 -0
- data/doc/en/cairo-pattern-type-mismatch-error.html +36 -0
- data/doc/en/cairo-pattern.html +88 -0
- data/doc/en/cairo-pdf-surface.html +46 -0
- data/doc/en/cairo-point.html +63 -0
- data/doc/en/cairo-ps-level.html +38 -0
- data/doc/en/cairo-ps-surface.html +81 -0
- data/doc/en/cairo-quartz-surface.html +38 -0
- data/doc/en/cairo-radial-pattern.html +49 -0
- data/doc/en/cairo-read-error.html +36 -0
- data/doc/en/cairo-rectangle.html +78 -0
- data/doc/en/cairo-scaled-font.html +73 -0
- data/doc/en/cairo-solid-pattern.html +51 -0
- data/doc/en/cairo-subpixel-order.html +28 -0
- data/doc/en/cairo-surface-finished-error.html +36 -0
- data/doc/en/cairo-surface-pattern.html +46 -0
- data/doc/en/cairo-surface-type-mismatch-error.html +36 -0
- data/doc/en/cairo-surface.html +100 -0
- data/doc/en/cairo-svg-surface.html +66 -0
- data/doc/en/cairo-svg-version.html +38 -0
- data/doc/en/cairo-temp-file-error.html +36 -0
- data/doc/en/cairo-text-extents.html +65 -0
- data/doc/en/cairo-win32-surface.html +43 -0
- data/doc/en/cairo-write-error.html +36 -0
- data/doc/en/cairo.html +109 -0
- data/doc/en/index.html +1058 -0
- data/doc/index.html +18 -0
- data/doc/ja/cairo-antialias.html +43 -0
- data/doc/ja/cairo-clip-not-representable-error.html +42 -0
- data/doc/ja/cairo-color-base.html +61 -0
- data/doc/ja/cairo-color-cmyk.html +138 -0
- data/doc/ja/cairo-color-hsv.html +121 -0
- data/doc/ja/cairo-color-rgb.html +131 -0
- data/doc/ja/cairo-color-x11.html +169 -0
- data/doc/ja/cairo-color.html +303 -0
- data/doc/ja/cairo-content.html +37 -0
- data/doc/ja/cairo-context-blur.html +39 -0
- data/doc/ja/cairo-context-circle.html +40 -0
- data/doc/ja/cairo-context-color.html +38 -0
- data/doc/ja/cairo-context-path.html +63 -0
- data/doc/ja/cairo-context-rectangle.html +46 -0
- data/doc/ja/cairo-context-triangle.html +33 -0
- data/doc/ja/cairo-context.html +1435 -0
- data/doc/ja/cairo-error.html +42 -0
- data/doc/ja/cairo-extend.html +42 -0
- data/doc/ja/cairo-file-not-found.html +37 -0
- data/doc/ja/cairo-fill-rule.html +44 -0
- data/doc/ja/cairo-filter.html +29 -0
- data/doc/ja/cairo-font-extents.html +96 -0
- data/doc/ja/cairo-font-face.html +41 -0
- data/doc/ja/cairo-font-options.html +172 -0
- data/doc/ja/cairo-font-slant.html +36 -0
- data/doc/ja/cairo-font-weight.html +33 -0
- data/doc/ja/cairo-format.html +67 -0
- data/doc/ja/cairo-glyph.html +101 -0
- data/doc/ja/cairo-gradient-pattern.html +105 -0
- data/doc/ja/cairo-hint-metrics.html +43 -0
- data/doc/ja/cairo-hint-style.html +50 -0
- data/doc/ja/cairo-image-surface.html +117 -0
- data/doc/ja/cairo-invalid-content-error.html +40 -0
- data/doc/ja/cairo-invalid-dash-error.html +40 -0
- data/doc/ja/cairo-invalid-dsc-comment-error.html +40 -0
- data/doc/ja/cairo-invalid-format-error.html +40 -0
- data/doc/ja/cairo-invalid-index-error.html +40 -0
- data/doc/ja/cairo-invalid-matrix-error.html +40 -0
- data/doc/ja/cairo-invalid-path-data-error.html +40 -0
- data/doc/ja/cairo-invalid-pop-group-error.html +40 -0
- data/doc/ja/cairo-invalid-restore-error.html +41 -0
- data/doc/ja/cairo-invalid-status-error.html +41 -0
- data/doc/ja/cairo-invalid-stride-error.html +41 -0
- data/doc/ja/cairo-invalid-string-error.html +40 -0
- data/doc/ja/cairo-invalid-visual-error.html +43 -0
- data/doc/ja/cairo-line-cap.html +36 -0
- data/doc/ja/cairo-line-join.html +39 -0
- data/doc/ja/cairo-linear-pattern.html +73 -0
- data/doc/ja/cairo-matrix.html +329 -0
- data/doc/ja/cairo-no-current-point-error.html +40 -0
- data/doc/ja/cairo-null-pointer-error.html +40 -0
- data/doc/ja/cairo-operator.html +37 -0
- data/doc/ja/cairo-paper-parse-error.html +41 -0
- data/doc/ja/cairo-paper-unknown-paper-name.html +62 -0
- data/doc/ja/cairo-paper-unknown-unit.html +61 -0
- data/doc/ja/cairo-paper-unrecognized-paper-description.html +62 -0
- data/doc/ja/cairo-paper.html +343 -0
- data/doc/ja/cairo-path-close-path.html +43 -0
- data/doc/ja/cairo-path-curve-to.html +56 -0
- data/doc/ja/cairo-path-data-type.html +39 -0
- data/doc/ja/cairo-path-data.html +113 -0
- data/doc/ja/cairo-path-line-to.html +48 -0
- data/doc/ja/cairo-path-move-to.html +48 -0
- data/doc/ja/cairo-path.html +130 -0
- data/doc/ja/cairo-pattern-type-mismatch-error.html +42 -0
- data/doc/ja/cairo-pattern.html +114 -0
- data/doc/ja/cairo-pdf-surface.html +72 -0
- data/doc/ja/cairo-point.html +76 -0
- data/doc/ja/cairo-ps-level.html +48 -0
- data/doc/ja/cairo-ps-surface.html +200 -0
- data/doc/ja/cairo-quartz-surface.html +78 -0
- data/doc/ja/cairo-radial-pattern.html +79 -0
- data/doc/ja/cairo-read-error.html +41 -0
- data/doc/ja/cairo-rectangle.html +95 -0
- data/doc/ja/cairo-scaled-font.html +130 -0
- data/doc/ja/cairo-solid-pattern.html +73 -0
- data/doc/ja/cairo-subpixel-order.html +43 -0
- data/doc/ja/cairo-surface-finished-error.html +40 -0
- data/doc/ja/cairo-surface-pattern.html +54 -0
- data/doc/ja/cairo-surface-type-mismatch-error.html +42 -0
- data/doc/ja/cairo-surface.html +177 -0
- data/doc/ja/cairo-svg-surface.html +100 -0
- data/doc/ja/cairo-svg-version.html +52 -0
- data/doc/ja/cairo-temp-file-error.html +36 -0
- data/doc/ja/cairo-text-extents.html +87 -0
- data/doc/ja/cairo-win32-surface.html +86 -0
- data/doc/ja/cairo-write-error.html +41 -0
- data/doc/ja/cairo.html +134 -0
- data/doc/ja/index.html +1059 -0
- data/extconf.rb +53 -17
- data/pkg-config.rb +197 -52
- data/samples/pac.rb +8 -9
- data/samples/pac2.rb +6 -6
- data/samples/png.rb +1 -2
- data/samples/text2.rb +9 -3
- data/src/cairo.def +6 -0
- data/src/lib/cairo.rb +35 -5
- data/src/lib/cairo/paper.rb +183 -0
- data/src/lib/cairo/papers.rb +41 -0
- data/src/rb_cairo.c +4 -3
- data/src/rb_cairo.h +18 -1
- data/src/rb_cairo_constants.c +124 -2
- data/src/rb_cairo_context.c +35 -5
- data/src/rb_cairo_exception.c +23 -1
- data/src/rb_cairo_font_options.c +1 -1
- data/src/rb_cairo_path.c +1 -14
- data/src/rb_cairo_surface.c +301 -82
- data/test/run-test.rb +15 -0
- data/test/test_paper.rb +81 -0
- data/test/test_pkg_config.rb +121 -0
- metadata +187 -3
- data/samples/.#blur.rb.1.1 +0 -36
data/test/run-test.rb
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
|
4
|
+
src_dir = File.join(base_dir, "src")
|
|
5
|
+
lib_dir = File.join(src_dir, "lib")
|
|
6
|
+
|
|
7
|
+
$LOAD_PATH.unshift(base_dir)
|
|
8
|
+
$LOAD_PATH.unshift(src_dir)
|
|
9
|
+
$LOAD_PATH.unshift(lib_dir)
|
|
10
|
+
|
|
11
|
+
require 'test/unit'
|
|
12
|
+
|
|
13
|
+
Dir.glob("test/**/test_*.rb") do |file|
|
|
14
|
+
require file.sub(/\.rb$/, '')
|
|
15
|
+
end
|
data/test/test_paper.rb
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
require 'cairo'
|
|
2
|
+
|
|
3
|
+
class PaperTest < Test::Unit::TestCase
|
|
4
|
+
def test_parse_paper
|
|
5
|
+
a4 = Cairo::Paper::A4
|
|
6
|
+
assert_parse(a4, a4)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def test_parse_name
|
|
10
|
+
assert_parse(:A4, "A4")
|
|
11
|
+
assert_parse(:A4_LANDSCAPE, "A4 landscape")
|
|
12
|
+
assert_parse(:A4, :A4)
|
|
13
|
+
assert_parse(:A4, :a4)
|
|
14
|
+
|
|
15
|
+
assert_parse(:JAPANESE_POSTCARD, :japanese_postcard)
|
|
16
|
+
assert_parse(:JAPANESE_POSTCARD, "japanese-postcard")
|
|
17
|
+
assert_parse(:JAPANESE_POSTCARD, "Japanese postcard")
|
|
18
|
+
|
|
19
|
+
exception = assert_raise(Cairo::Paper::UnknownPaperName) do
|
|
20
|
+
Cairo::Paper.parse(:nonexistence)
|
|
21
|
+
end
|
|
22
|
+
assert_equal(:nonexistence, exception.name)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def test_parse_size
|
|
26
|
+
assert_parse(paper(100, 200), "100x200")
|
|
27
|
+
assert_parse(paper(283.46456664, 566.929134), "100mmx200mm")
|
|
28
|
+
assert_parse(paper(284.88188952, 200.9), "100.5mmx200.9")
|
|
29
|
+
assert_parse(paper(72, 612.0), "1inx8.5inch")
|
|
30
|
+
assert_parse(paper(28.346456664, 24094.488168), "1cmx8.5m")
|
|
31
|
+
assert_parse(paper(100, 200), [100, 200])
|
|
32
|
+
|
|
33
|
+
exception = assert_raise(Cairo::Paper::UnknownUnit) do
|
|
34
|
+
Cairo::Paper.parse("100kmx100")
|
|
35
|
+
end
|
|
36
|
+
assert_equal("km", exception.unit)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def test_parse_size_with_name
|
|
40
|
+
assert_parse(paper(28.346456664, 24094.488168, nil, "Name"),
|
|
41
|
+
"1cmx8.5m#Name")
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def test_unrecognized_input
|
|
45
|
+
assert_nothing_raised do
|
|
46
|
+
Cairo::Paper.parse({})
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
exception = assert_raise(Cairo::Paper::UnrecognizedPaperDescription) do
|
|
50
|
+
Cairo::Paper.parse({}, true)
|
|
51
|
+
end
|
|
52
|
+
assert_equal({}, exception.description)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def test_unit
|
|
56
|
+
paper = parse("1cmx8.5m")
|
|
57
|
+
assert_nil(paper.unit)
|
|
58
|
+
assert_in_delta(28.346456664, 0.01, paper.width)
|
|
59
|
+
assert_in_delta(24094.488168, 0.01, paper.height)
|
|
60
|
+
|
|
61
|
+
paper.unit = "inch"
|
|
62
|
+
assert_equal("inch", paper.unit)
|
|
63
|
+
assert_in_delta(0.393700787, 0.01, paper.width)
|
|
64
|
+
assert_in_delta(334.645669, 0.01, paper.height)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
private
|
|
68
|
+
def paper(width, height, *rest)
|
|
69
|
+
Cairo::Paper.new(width, height, *rest)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def parse(paper_description)
|
|
73
|
+
Cairo::Paper.parse(paper_description)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def assert_parse(expected, paper_description, message=nil)
|
|
77
|
+
expected = Cairo::Paper.const_get(expected) if expected.is_a?(Symbol)
|
|
78
|
+
actual_paper = parse(paper_description)
|
|
79
|
+
assert_equal(expected, actual_paper, message)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
require 'pkg-config'
|
|
2
|
+
|
|
3
|
+
class PkgConfigTest < Test::Unit::TestCase
|
|
4
|
+
def setup
|
|
5
|
+
@cairo = PackageConfig.new("cairo")
|
|
6
|
+
@cairo_png = PackageConfig.new("cairo-png")
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def test_exist?
|
|
10
|
+
assert(system('pkg-config --exists cairo'))
|
|
11
|
+
assert(@cairo.exist?)
|
|
12
|
+
|
|
13
|
+
assert(system('pkg-config --exists cairo-png'))
|
|
14
|
+
assert(@cairo_png.exist?)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def test_cflags
|
|
18
|
+
assert_pkg_config("cairo", ["--cflags"], @cairo.cflags)
|
|
19
|
+
assert_pkg_config("cairo-png", ["--cflags"], @cairo_png.cflags)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def test_cflags_only_I
|
|
23
|
+
assert_pkg_config("cairo", ["--cflags-only-I"], @cairo.cflags_only_I)
|
|
24
|
+
assert_pkg_config("cairo-png", ["--cflags-only-I"], @cairo_png.cflags_only_I)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def test_libs
|
|
28
|
+
assert_pkg_config("cairo", ["--libs"], @cairo.libs)
|
|
29
|
+
assert_pkg_config("cairo-png", ["--libs"], @cairo_png.libs)
|
|
30
|
+
|
|
31
|
+
@cairo.msvc_syntax = true
|
|
32
|
+
result = pkg_config("cairo", "--libs")
|
|
33
|
+
msvc_result = result.gsub(/-lcairo\b/, "cairo.lib")
|
|
34
|
+
assert_not_equal(msvc_result, result)
|
|
35
|
+
assert_equal(msvc_result, @cairo.libs)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def test_libs_only_l
|
|
39
|
+
assert_pkg_config("cairo", ["--libs-only-l"], @cairo.libs_only_l)
|
|
40
|
+
assert_pkg_config("cairo-png", ["--libs-only-l"], @cairo_png.libs_only_l)
|
|
41
|
+
|
|
42
|
+
@cairo_png.msvc_syntax = true
|
|
43
|
+
result = pkg_config("cairo-png", "--libs-only-l")
|
|
44
|
+
msvc_result = result.gsub(/-l(cairo|png12)\b/, '\1.lib')
|
|
45
|
+
assert_not_equal(msvc_result, result)
|
|
46
|
+
assert_equal(msvc_result, @cairo_png.libs_only_l)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def test_requires
|
|
50
|
+
assert_equal([], @cairo.requires)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def test_requires_private
|
|
54
|
+
assert_equal(["freetype2", "fontconfig", "libpng12", "xrender", "x11"],
|
|
55
|
+
@cairo.requires_private)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def test_version
|
|
59
|
+
assert_pkg_config("cairo", ["--modversion"], @cairo.version)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def test_parse_override_variables
|
|
63
|
+
assert_override_variables({}, nil)
|
|
64
|
+
assert_override_variables({"prefix" => "c:\\\\gtk-dev"},
|
|
65
|
+
"prefix=c:\\\\gtk-dev")
|
|
66
|
+
assert_override_variables({
|
|
67
|
+
"prefix" => "c:\\\\gtk-dev",
|
|
68
|
+
"includdir" => "d:\\\\gtk\\include"
|
|
69
|
+
},
|
|
70
|
+
["prefix=c:\\\\gtk-dev",
|
|
71
|
+
"includdir=d:\\\\gtk\\include"].join(","))
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def test_override_variables
|
|
75
|
+
overridden_prefix = "c:\\\\gtk-dev"
|
|
76
|
+
original_prefix = @cairo.variable("prefix")
|
|
77
|
+
assert_not_equal(overridden_prefix, original_prefix)
|
|
78
|
+
with_override_variables("prefix=#{overridden_prefix}") do
|
|
79
|
+
cairo = PackageConfig.new("cairo")
|
|
80
|
+
assert_equal(overridden_prefix, cairo.variable("prefix"))
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
private
|
|
85
|
+
def pkg_config(package, *args)
|
|
86
|
+
args = args.collect {|arg| arg.dump}.join(' ')
|
|
87
|
+
`pkg-config #{args} #{package}`.strip
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def assert_pkg_config(package, pkg_config_args, actual)
|
|
91
|
+
result = pkg_config(package, *pkg_config_args)
|
|
92
|
+
result = nil if result.empty?
|
|
93
|
+
assert_equal(result, actual)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def assert_override_variables(expected, override_variables)
|
|
97
|
+
with_override_variables(override_variables) do
|
|
98
|
+
cairo = PackageConfig.new("cairo")
|
|
99
|
+
assert_equal(expected, cairo.instance_variable_get("@override_variables"))
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def with_override_variables(override_variables)
|
|
104
|
+
if override_variables.nil?
|
|
105
|
+
args = {}
|
|
106
|
+
else
|
|
107
|
+
args = {"--with-override-variables" => override_variables}
|
|
108
|
+
end
|
|
109
|
+
configure_args(args) do
|
|
110
|
+
yield
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def configure_args(args)
|
|
115
|
+
original_configure_args = $configure_args
|
|
116
|
+
$configure_args = $configure_args.merge(args)
|
|
117
|
+
yield
|
|
118
|
+
ensure
|
|
119
|
+
$configure_args = original_configure_args
|
|
120
|
+
end
|
|
121
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cairo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Evan Marin
|
|
@@ -12,7 +12,7 @@ autorequire:
|
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
14
|
|
|
15
|
-
date: 2008-
|
|
15
|
+
date: 2008-04-11 00:00:00 +09:00
|
|
16
16
|
default_executable:
|
|
17
17
|
dependencies: []
|
|
18
18
|
|
|
@@ -33,10 +33,189 @@ files:
|
|
|
33
33
|
- NEWS
|
|
34
34
|
- README
|
|
35
35
|
- Rakefile
|
|
36
|
+
- doc/doc.css
|
|
37
|
+
- doc/en/cairo-antialias.html
|
|
38
|
+
- doc/en/cairo-clip-not-representable-error.html
|
|
39
|
+
- doc/en/cairo-color-base.html
|
|
40
|
+
- doc/en/cairo-color-cmyk.html
|
|
41
|
+
- doc/en/cairo-color-hsv.html
|
|
42
|
+
- doc/en/cairo-color-rgb.html
|
|
43
|
+
- doc/en/cairo-color-x11.html
|
|
44
|
+
- doc/en/cairo-color.html
|
|
45
|
+
- doc/en/cairo-content.html
|
|
46
|
+
- doc/en/cairo-context-blur.html
|
|
47
|
+
- doc/en/cairo-context-circle.html
|
|
48
|
+
- doc/en/cairo-context-color.html
|
|
49
|
+
- doc/en/cairo-context-path.html
|
|
50
|
+
- doc/en/cairo-context-rectangle.html
|
|
51
|
+
- doc/en/cairo-context-triangle.html
|
|
52
|
+
- doc/en/cairo-context.html
|
|
53
|
+
- doc/en/cairo-error.html
|
|
54
|
+
- doc/en/cairo-extend.html
|
|
55
|
+
- doc/en/cairo-file-not-found.html
|
|
56
|
+
- doc/en/cairo-fill-rule.html
|
|
57
|
+
- doc/en/cairo-filter.html
|
|
58
|
+
- doc/en/cairo-font-extents.html
|
|
59
|
+
- doc/en/cairo-font-face.html
|
|
60
|
+
- doc/en/cairo-font-options.html
|
|
61
|
+
- doc/en/cairo-font-slant.html
|
|
62
|
+
- doc/en/cairo-font-weight.html
|
|
63
|
+
- doc/en/cairo-format.html
|
|
64
|
+
- doc/en/cairo-glyph.html
|
|
65
|
+
- doc/en/cairo-gradient-pattern.html
|
|
66
|
+
- doc/en/cairo-hint-metrics.html
|
|
67
|
+
- doc/en/cairo-hint-style.html
|
|
68
|
+
- doc/en/cairo-image-surface.html
|
|
69
|
+
- doc/en/cairo-invalid-content-error.html
|
|
70
|
+
- doc/en/cairo-invalid-dash-error.html
|
|
71
|
+
- doc/en/cairo-invalid-dsc-comment-error.html
|
|
72
|
+
- doc/en/cairo-invalid-format-error.html
|
|
73
|
+
- doc/en/cairo-invalid-index-error.html
|
|
74
|
+
- doc/en/cairo-invalid-matrix-error.html
|
|
75
|
+
- doc/en/cairo-invalid-path-data-error.html
|
|
76
|
+
- doc/en/cairo-invalid-pop-group-error.html
|
|
77
|
+
- doc/en/cairo-invalid-restore-error.html
|
|
78
|
+
- doc/en/cairo-invalid-status-error.html
|
|
79
|
+
- doc/en/cairo-invalid-stride-error.html
|
|
80
|
+
- doc/en/cairo-invalid-string-error.html
|
|
81
|
+
- doc/en/cairo-invalid-visual-error.html
|
|
82
|
+
- doc/en/cairo-line-cap.html
|
|
83
|
+
- doc/en/cairo-line-join.html
|
|
84
|
+
- doc/en/cairo-linear-pattern.html
|
|
85
|
+
- doc/en/cairo-matrix.html
|
|
86
|
+
- doc/en/cairo-no-current-point-error.html
|
|
87
|
+
- doc/en/cairo-null-pointer-error.html
|
|
88
|
+
- doc/en/cairo-operator.html
|
|
89
|
+
- doc/en/cairo-paper-parse-error.html
|
|
90
|
+
- doc/en/cairo-paper-unknown-paper-name.html
|
|
91
|
+
- doc/en/cairo-paper-unknown-unit.html
|
|
92
|
+
- doc/en/cairo-paper-unrecognized-paper-description.html
|
|
93
|
+
- doc/en/cairo-paper.html
|
|
94
|
+
- doc/en/cairo-path-close-path.html
|
|
95
|
+
- doc/en/cairo-path-curve-to.html
|
|
96
|
+
- doc/en/cairo-path-data-type.html
|
|
97
|
+
- doc/en/cairo-path-data.html
|
|
98
|
+
- doc/en/cairo-path-line-to.html
|
|
99
|
+
- doc/en/cairo-path-move-to.html
|
|
100
|
+
- doc/en/cairo-path.html
|
|
101
|
+
- doc/en/cairo-pattern-type-mismatch-error.html
|
|
102
|
+
- doc/en/cairo-pattern.html
|
|
103
|
+
- doc/en/cairo-pdf-surface.html
|
|
104
|
+
- doc/en/cairo-point.html
|
|
105
|
+
- doc/en/cairo-ps-level.html
|
|
106
|
+
- doc/en/cairo-ps-surface.html
|
|
107
|
+
- doc/en/cairo-quartz-surface.html
|
|
108
|
+
- doc/en/cairo-radial-pattern.html
|
|
109
|
+
- doc/en/cairo-read-error.html
|
|
110
|
+
- doc/en/cairo-rectangle.html
|
|
111
|
+
- doc/en/cairo-scaled-font.html
|
|
112
|
+
- doc/en/cairo-solid-pattern.html
|
|
113
|
+
- doc/en/cairo-subpixel-order.html
|
|
114
|
+
- doc/en/cairo-surface-finished-error.html
|
|
115
|
+
- doc/en/cairo-surface-pattern.html
|
|
116
|
+
- doc/en/cairo-surface-type-mismatch-error.html
|
|
117
|
+
- doc/en/cairo-surface.html
|
|
118
|
+
- doc/en/cairo-svg-surface.html
|
|
119
|
+
- doc/en/cairo-svg-version.html
|
|
120
|
+
- doc/en/cairo-temp-file-error.html
|
|
121
|
+
- doc/en/cairo-text-extents.html
|
|
122
|
+
- doc/en/cairo-win32-surface.html
|
|
123
|
+
- doc/en/cairo-write-error.html
|
|
124
|
+
- doc/en/cairo.html
|
|
125
|
+
- doc/en/index.html
|
|
126
|
+
- doc/index.html
|
|
127
|
+
- doc/ja/cairo-antialias.html
|
|
128
|
+
- doc/ja/cairo-clip-not-representable-error.html
|
|
129
|
+
- doc/ja/cairo-color-base.html
|
|
130
|
+
- doc/ja/cairo-color-cmyk.html
|
|
131
|
+
- doc/ja/cairo-color-hsv.html
|
|
132
|
+
- doc/ja/cairo-color-rgb.html
|
|
133
|
+
- doc/ja/cairo-color-x11.html
|
|
134
|
+
- doc/ja/cairo-color.html
|
|
135
|
+
- doc/ja/cairo-content.html
|
|
136
|
+
- doc/ja/cairo-context-blur.html
|
|
137
|
+
- doc/ja/cairo-context-circle.html
|
|
138
|
+
- doc/ja/cairo-context-color.html
|
|
139
|
+
- doc/ja/cairo-context-path.html
|
|
140
|
+
- doc/ja/cairo-context-rectangle.html
|
|
141
|
+
- doc/ja/cairo-context-triangle.html
|
|
142
|
+
- doc/ja/cairo-context.html
|
|
143
|
+
- doc/ja/cairo-error.html
|
|
144
|
+
- doc/ja/cairo-extend.html
|
|
145
|
+
- doc/ja/cairo-file-not-found.html
|
|
146
|
+
- doc/ja/cairo-fill-rule.html
|
|
147
|
+
- doc/ja/cairo-filter.html
|
|
148
|
+
- doc/ja/cairo-font-extents.html
|
|
149
|
+
- doc/ja/cairo-font-face.html
|
|
150
|
+
- doc/ja/cairo-font-options.html
|
|
151
|
+
- doc/ja/cairo-font-slant.html
|
|
152
|
+
- doc/ja/cairo-font-weight.html
|
|
153
|
+
- doc/ja/cairo-format.html
|
|
154
|
+
- doc/ja/cairo-glyph.html
|
|
155
|
+
- doc/ja/cairo-gradient-pattern.html
|
|
156
|
+
- doc/ja/cairo-hint-metrics.html
|
|
157
|
+
- doc/ja/cairo-hint-style.html
|
|
158
|
+
- doc/ja/cairo-image-surface.html
|
|
159
|
+
- doc/ja/cairo-invalid-content-error.html
|
|
160
|
+
- doc/ja/cairo-invalid-dash-error.html
|
|
161
|
+
- doc/ja/cairo-invalid-dsc-comment-error.html
|
|
162
|
+
- doc/ja/cairo-invalid-format-error.html
|
|
163
|
+
- doc/ja/cairo-invalid-index-error.html
|
|
164
|
+
- doc/ja/cairo-invalid-matrix-error.html
|
|
165
|
+
- doc/ja/cairo-invalid-path-data-error.html
|
|
166
|
+
- doc/ja/cairo-invalid-pop-group-error.html
|
|
167
|
+
- doc/ja/cairo-invalid-restore-error.html
|
|
168
|
+
- doc/ja/cairo-invalid-status-error.html
|
|
169
|
+
- doc/ja/cairo-invalid-stride-error.html
|
|
170
|
+
- doc/ja/cairo-invalid-string-error.html
|
|
171
|
+
- doc/ja/cairo-invalid-visual-error.html
|
|
172
|
+
- doc/ja/cairo-line-cap.html
|
|
173
|
+
- doc/ja/cairo-line-join.html
|
|
174
|
+
- doc/ja/cairo-linear-pattern.html
|
|
175
|
+
- doc/ja/cairo-matrix.html
|
|
176
|
+
- doc/ja/cairo-no-current-point-error.html
|
|
177
|
+
- doc/ja/cairo-null-pointer-error.html
|
|
178
|
+
- doc/ja/cairo-operator.html
|
|
179
|
+
- doc/ja/cairo-paper-parse-error.html
|
|
180
|
+
- doc/ja/cairo-paper-unknown-paper-name.html
|
|
181
|
+
- doc/ja/cairo-paper-unknown-unit.html
|
|
182
|
+
- doc/ja/cairo-paper-unrecognized-paper-description.html
|
|
183
|
+
- doc/ja/cairo-paper.html
|
|
184
|
+
- doc/ja/cairo-path-close-path.html
|
|
185
|
+
- doc/ja/cairo-path-curve-to.html
|
|
186
|
+
- doc/ja/cairo-path-data-type.html
|
|
187
|
+
- doc/ja/cairo-path-data.html
|
|
188
|
+
- doc/ja/cairo-path-line-to.html
|
|
189
|
+
- doc/ja/cairo-path-move-to.html
|
|
190
|
+
- doc/ja/cairo-path.html
|
|
191
|
+
- doc/ja/cairo-pattern-type-mismatch-error.html
|
|
192
|
+
- doc/ja/cairo-pattern.html
|
|
193
|
+
- doc/ja/cairo-pdf-surface.html
|
|
194
|
+
- doc/ja/cairo-point.html
|
|
195
|
+
- doc/ja/cairo-ps-level.html
|
|
196
|
+
- doc/ja/cairo-ps-surface.html
|
|
197
|
+
- doc/ja/cairo-quartz-surface.html
|
|
198
|
+
- doc/ja/cairo-radial-pattern.html
|
|
199
|
+
- doc/ja/cairo-read-error.html
|
|
200
|
+
- doc/ja/cairo-rectangle.html
|
|
201
|
+
- doc/ja/cairo-scaled-font.html
|
|
202
|
+
- doc/ja/cairo-solid-pattern.html
|
|
203
|
+
- doc/ja/cairo-subpixel-order.html
|
|
204
|
+
- doc/ja/cairo-surface-finished-error.html
|
|
205
|
+
- doc/ja/cairo-surface-pattern.html
|
|
206
|
+
- doc/ja/cairo-surface-type-mismatch-error.html
|
|
207
|
+
- doc/ja/cairo-surface.html
|
|
208
|
+
- doc/ja/cairo-svg-surface.html
|
|
209
|
+
- doc/ja/cairo-svg-version.html
|
|
210
|
+
- doc/ja/cairo-temp-file-error.html
|
|
211
|
+
- doc/ja/cairo-text-extents.html
|
|
212
|
+
- doc/ja/cairo-win32-surface.html
|
|
213
|
+
- doc/ja/cairo-write-error.html
|
|
214
|
+
- doc/ja/cairo.html
|
|
215
|
+
- doc/ja/index.html
|
|
36
216
|
- extconf.rb
|
|
37
217
|
- misc/update-colors.rb
|
|
38
218
|
- pkg-config.rb
|
|
39
|
-
- samples/.#blur.rb.1.1
|
|
40
219
|
- samples/agg/README
|
|
41
220
|
- samples/agg/aa_demo.rb
|
|
42
221
|
- samples/agg/aa_test.rb
|
|
@@ -59,6 +238,8 @@ files:
|
|
|
59
238
|
- src/lib/cairo/context/path.rb
|
|
60
239
|
- src/lib/cairo/context/rectangle.rb
|
|
61
240
|
- src/lib/cairo/context/triangle.rb
|
|
241
|
+
- src/lib/cairo/paper.rb
|
|
242
|
+
- src/lib/cairo/papers.rb
|
|
62
243
|
- src/lib/cairo/path.rb
|
|
63
244
|
- src/lib/cairo/point.rb
|
|
64
245
|
- src/rb_cairo.c
|
|
@@ -78,6 +259,9 @@ files:
|
|
|
78
259
|
- src/rb_cairo_scaled_font.c
|
|
79
260
|
- src/rb_cairo_surface.c
|
|
80
261
|
- src/rb_cairo_text_extents.c
|
|
262
|
+
- test/run-test.rb
|
|
263
|
+
- test/test_paper.rb
|
|
264
|
+
- test/test_pkg_config.rb
|
|
81
265
|
has_rdoc: false
|
|
82
266
|
homepage: http://cairographics.org/rcairo
|
|
83
267
|
post_install_message:
|
data/samples/.#blur.rb.1.1
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/USO/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require 'cairo'
|
|
4
|
-
|
|
5
|
-
margin = 10
|
|
6
|
-
rectangle_width = 300
|
|
7
|
-
rectangle_height = 100
|
|
8
|
-
|
|
9
|
-
width = rectangle_width + 2 * margin
|
|
10
|
-
height = (rectangle_height + 2 * margin) * 3
|
|
11
|
-
|
|
12
|
-
surface = Cairo::ImageSurface.new(Cairo::FORMAT_ARGB32, width, height)
|
|
13
|
-
context = Cairo::Context.new(surface)
|
|
14
|
-
|
|
15
|
-
context.set_source_rgb(1, 1, 1)
|
|
16
|
-
context.paint
|
|
17
|
-
|
|
18
|
-
context.set_source_rgba(0.3, 0.3, 0.3)
|
|
19
|
-
context.rectangle(margin, margin, rectangle_width, rectangle_height)
|
|
20
|
-
context.fill
|
|
21
|
-
|
|
22
|
-
context.pseudo_blur do
|
|
23
|
-
context.set_source_rgb(0.3, 0.3, 0.3)
|
|
24
|
-
context.rectangle(margin, rectangle_height + 2 * margin + margin / 2,
|
|
25
|
-
rectangle_width, rectangle_height)
|
|
26
|
-
context.fill
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
context.pseudo_blur(5) do
|
|
30
|
-
context.set_source_rgb(0.3, 0.3, 0.3)
|
|
31
|
-
context.rectangle(margin, (rectangle_height + 2 * margin) * 2 + margin / 2,
|
|
32
|
-
rectangle_width, rectangle_height)
|
|
33
|
-
context.fill
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
surface.write_to_png("blur.png")
|