cairo 1.12.1-x86-mingw32 → 1.12.2-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.
Potentially problematic release.
This version of cairo might be problematic. Click here for more details.
- data/Gemfile +1 -1
- data/NEWS +23 -0
- data/ext/cairo/extconf.rb +121 -1
- data/ext/cairo/rb_cairo.h +1 -1
- data/ext/cairo/rb_cairo_device.c +35 -0
- data/ext/cairo/rb_cairo_pattern.c +81 -7
- data/ext/cairo/rb_cairo_surface.c +632 -444
- data/lib/1.8/cairo.so +0 -0
- data/lib/1.9/cairo.so +0 -0
- data/lib/cairo.rb +3 -0
- data/lib/cairo/device.rb +13 -0
- data/lib/cairo/pattern.rb +12 -0
- data/lib/cairo/surface.rb +11 -0
- data/test/cairo-test-utils.rb +12 -6
- data/test/run-test.rb +1 -1
- data/test/test_raster_source_pattern.rb +15 -1
- metadata +7 -4
data/lib/1.8/cairo.so
CHANGED
Binary file
|
data/lib/1.9/cairo.so
CHANGED
Binary file
|
data/lib/cairo.rb
CHANGED
data/lib/cairo/device.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
module Cairo
|
2
|
+
if const_defined?(:Device)
|
3
|
+
class Device
|
4
|
+
class << self
|
5
|
+
def supported?(type)
|
6
|
+
supported_predicate = "#{type.to_s.downcase}_supported?"
|
7
|
+
return false unless respond_to?(supported_predicate)
|
8
|
+
send(supported_predicate)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Cairo
|
2
|
+
class Pattern
|
3
|
+
class << self
|
4
|
+
def supported?(type)
|
5
|
+
type = type.to_s.gsub(/([a-z])([A-Z])/, '\\1_\\2').downcase
|
6
|
+
supported_predicate = "#{type}_supported?"
|
7
|
+
return false unless respond_to?(supported_predicate)
|
8
|
+
send(supported_predicate)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/test/cairo-test-utils.rb
CHANGED
@@ -18,16 +18,22 @@ module CairoTestUtils
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def only_device(name)
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
only_cairo_version(1, 10)
|
22
|
+
|
23
|
+
unless Cairo::Device.supported?(name)
|
24
|
+
omit("Only for #{name} device available")
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|
27
28
|
def only_surface(name)
|
28
|
-
|
29
|
-
|
30
|
-
|
29
|
+
unless Cairo::Surface.supported?(name)
|
30
|
+
omit("Only for #{name} device available")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def only_pattern(name)
|
35
|
+
unless Cairo::Pattern.supported?(name)
|
36
|
+
omit("Only for #{name} device available")
|
31
37
|
end
|
32
38
|
end
|
33
39
|
end
|
data/test/run-test.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
require "cairo"
|
2
2
|
require "tempfile"
|
3
3
|
|
4
|
-
class
|
4
|
+
class RasterSourcePatternTest < Test::Unit::TestCase
|
5
5
|
include CairoTestUtils
|
6
6
|
|
7
|
+
def setup
|
8
|
+
only_pattern("RasterSource")
|
9
|
+
end
|
10
|
+
|
7
11
|
def test_acquire_and_release
|
8
12
|
Cairo::ImageSurface.new(100, 100) do |surface|
|
9
13
|
Cairo::Context.new(surface) do |context|
|
@@ -36,6 +40,11 @@ class RasterPatternSourceTest < Test::Unit::TestCase
|
|
36
40
|
end
|
37
41
|
|
38
42
|
class SnapshotTest < self
|
43
|
+
def setup
|
44
|
+
super
|
45
|
+
only_surface("Recording")
|
46
|
+
end
|
47
|
+
|
39
48
|
def test_success
|
40
49
|
Cairo::RecordingSurface.new(0, 0, 100, 100) do |surface|
|
41
50
|
Cairo::Context.new(surface) do |context|
|
@@ -75,6 +84,11 @@ class RasterPatternSourceTest < Test::Unit::TestCase
|
|
75
84
|
end
|
76
85
|
|
77
86
|
class CopyTest < self
|
87
|
+
def setup
|
88
|
+
super
|
89
|
+
only_surface("Script")
|
90
|
+
end
|
91
|
+
|
78
92
|
def test_success
|
79
93
|
output = StringIO.new
|
80
94
|
device = Cairo::ScriptDevice.new(output)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cairo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 35
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 12
|
9
|
-
-
|
10
|
-
version: 1.12.
|
9
|
+
- 2
|
10
|
+
version: 1.12.2
|
11
11
|
platform: x86-mingw32
|
12
12
|
authors:
|
13
13
|
- Kouhei Sutou
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-03
|
18
|
+
date: 2012-06-03 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -106,9 +106,11 @@ files:
|
|
106
106
|
- ext/cairo/extconf.rb
|
107
107
|
- Rakefile
|
108
108
|
- lib/cairo/color.rb
|
109
|
+
- lib/cairo/pattern.rb
|
109
110
|
- lib/cairo/papers.rb
|
110
111
|
- lib/cairo/point.rb
|
111
112
|
- lib/cairo/context.rb
|
113
|
+
- lib/cairo/device.rb
|
112
114
|
- lib/cairo/colors.rb
|
113
115
|
- lib/cairo/context/circle.rb
|
114
116
|
- lib/cairo/context/rectangle.rb
|
@@ -117,6 +119,7 @@ files:
|
|
117
119
|
- lib/cairo/context/triangle.rb
|
118
120
|
- lib/cairo/context/path.rb
|
119
121
|
- lib/cairo/path.rb
|
122
|
+
- lib/cairo/surface.rb
|
120
123
|
- lib/cairo/constants.rb
|
121
124
|
- lib/cairo/paper.rb
|
122
125
|
- lib/cairo.rb
|