cairo 1.7.0 → 1.8.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.

Potentially problematic release.


This version of cairo might be problematic. Click here for more details.

@@ -0,0 +1,63 @@
1
+ # This is a shell script that calls functions and scripts from
2
+ # tml@iki.fi's personal work environment. It is not expected to be
3
+ # usable unmodified by others, and is included only for reference.
4
+
5
+ MOD=libpng
6
+ VER=1.2.32
7
+ REV=1
8
+ ARCH=win32
9
+
10
+ THIS=${MOD}_${VER}-${REV}_${ARCH}
11
+
12
+ RUNZIP=${THIS}.zip
13
+ DEVZIP=${MOD}-dev_${VER}-${REV}_${ARCH}.zip
14
+
15
+ HEX=`echo $THIS | md5sum | cut -d' ' -f1`
16
+ TARGET=c:/devel/target/$HEX
17
+
18
+ ZLIB=`latest --arch=${ARCH} zlib`
19
+
20
+ usedev
21
+ usemsvs6
22
+
23
+ (
24
+
25
+ set -x
26
+
27
+ # Avoid the silly "relink" stuff in libtool
28
+ sed -e 's/need_relink=yes/need_relink=no # no way --tml/' <ltmain.sh >ltmain.temp && mv ltmain.temp ltmain.sh
29
+
30
+ patch -p0 <<'EOF' &&
31
+ --- Makefile.in
32
+ +++ Makefile.in
33
+ @@ -1285,7 +1285,7 @@
34
+ # do evil things to libpng to cause libpng12 to be used
35
+ install-exec-hook:
36
+ cd $(DESTDIR)$(bindir); rm -f libpng-config
37
+ - cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
38
+ + -cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
39
+ @set -x;\
40
+ cd $(DESTDIR)$(libdir);\
41
+ for ext in a la so sl dylib; do\
42
+ EOF
43
+
44
+ CC='gcc -mtune=pentium3 -mthreads -mms-bitfields' CPPFLAGS="-I /devel/dist/${ARCH}/${ZLIB}/include" LDFLAGS="-L/devel/dist/${ARCH}/${ZLIB}/lib -Wl,--enable-auto-image-base" CFLAGS=-O2 ./configure --disable-static --without-libpng-compat --without-binconfigs --prefix=$TARGET &&
45
+ make install &&
46
+
47
+ rm -f /tmp/$RUNZIP /tmp/$DEVZIP &&
48
+
49
+ (cd /devel/target/$HEX &&
50
+ zip /tmp/$RUNZIP bin/libpng12-0.dll &&
51
+ zip -r -D /tmp/$DEVZIP include &&
52
+ zip /tmp/$DEVZIP lib/libpng12.dll.a &&
53
+ pexports bin/libpng12-0.dll >lib/libpng.def &&
54
+ lib -machine:X86 -def:lib/libpng.def -name:libpng12-0.dll -out:lib/libpng.lib &&
55
+ zip /tmp/$DEVZIP lib/libpng.def lib/libpng.lib &&
56
+ zip /tmp/$DEVZIP lib/pkgconfig/libpng*.pc &&
57
+ zip -r -D /tmp/$DEVZIP share/man
58
+ )
59
+
60
+ ) 2>&1 | tee /devel/src/tml/make/$THIS.log &&
61
+
62
+ (cd /devel && zip /tmp/$DEVZIP src/tml/make/$THIS.{sh,log}) &&
63
+ manifestify /tmp/$RUNZIP /tmp/$DEVZIP
Binary file
Binary file
@@ -1,19 +1,16 @@
1
1
  require 'cairo'
2
2
 
3
3
  class ConstantsTest < Test::Unit::TestCase
4
- def test_lcd_filter
5
- constant_name = "LCDFilter"
6
- unless Cairo.satisfied_version?(1, 7, 2)
4
+ def test_text_cluster_flags
5
+ constant_name = "TextClusterFlag"
6
+ unless Cairo.satisfied_version?(1, 7, 6)
7
7
  assert_false(Cairo.const_defined?(constant_name))
8
8
  return
9
9
  end
10
10
 
11
11
  assert_true(Cairo.const_defined?(constant_name))
12
- assert_equal((0..4).to_a,
13
- [Cairo::LCDFilter::DEFAULT,
14
- Cairo::LCDFilter::NONE,
15
- Cairo::LCDFilter::INTRA_PIXEL,
16
- Cairo::LCDFilter::FIR3,
17
- Cairo::LCDFilter::FIR5])
12
+ assert_equal((0..1).to_a,
13
+ [0,
14
+ Cairo::TextClusterFlag::BACKWARD])
18
15
  end
19
16
  end
@@ -49,18 +49,6 @@ class ContextTest < Test::Unit::TestCase
49
49
  assert_equal("sans", context.font_face.family)
50
50
  end
51
51
 
52
- def test_have_show_text_glyphs?
53
- only_cairo_version(1, 7, 2)
54
-
55
- pdf_surface = Cairo::PDFSurface.new(@output, 10, 10)
56
- context = Cairo::Context.new(pdf_surface)
57
- assert_true(context.have_show_text_glyphs?)
58
-
59
- image_surface = Cairo::ImageSurface.new(10, 10)
60
- context = Cairo::Context.new(image_surface)
61
- assert_false(context.have_show_text_glyphs?)
62
- end
63
-
64
52
  def test_text_to_glyphs
65
53
  only_cairo_version(1, 7, 2)
66
54
 
@@ -54,7 +54,7 @@ class FontFaceTest < Test::Unit::TestCase
54
54
  Cairo::Matrix.identity,
55
55
  Cairo::Matrix.identity,
56
56
  Cairo::FontOptions.new)
57
- assert_equal([[], [], false],
57
+ assert_equal([[], [], 0],
58
58
  scaled_font.text_to_glyphs(0, 0, "text"))
59
59
  end
60
60
 
@@ -77,7 +77,7 @@ class FontFaceTest < Test::Unit::TestCase
77
77
  face.on_text_to_glyphs do |*args|
78
78
  text_to_glyphs_args << args
79
79
  scaled_font, utf8, data = args
80
- data.backward = true
80
+ data.cluster_flags = :backward
81
81
  end
82
82
 
83
83
  unicode_to_glyph_args = []
@@ -102,7 +102,7 @@ class FontFaceTest < Test::Unit::TestCase
102
102
  [Cairo::ScaledFont, ?e],
103
103
  [Cairo::ScaledFont, ?x],
104
104
  [Cairo::ScaledFont, ?t]],
105
- [[], [], true]],
105
+ [[], [], Cairo::TextClusterFlag::BACKWARD]],
106
106
  [classify_cairo_object(init_args),
107
107
  classify_cairo_object(render_glyph_args),
108
108
  classify_cairo_object(text_to_glyphs_args),
@@ -133,7 +133,7 @@ class FontFaceTest < Test::Unit::TestCase
133
133
  def text_to_glyphs(*args)
134
134
  @text_to_glyphs_args << args
135
135
  scaled_font, utf8, data = args
136
- data.backward = true
136
+ data.cluster_flags = :backward
137
137
  end
138
138
 
139
139
  def unicode_to_glyph(*args)
@@ -164,7 +164,7 @@ class FontFaceTest < Test::Unit::TestCase
164
164
  [Cairo::ScaledFont, ?e],
165
165
  [Cairo::ScaledFont, ?x],
166
166
  [Cairo::ScaledFont, ?t]],
167
- [[], [], true]],
167
+ [[], [], Cairo::TextClusterFlag::BACKWARD]],
168
168
  [classify_cairo_object(face.init_args),
169
169
  classify_cairo_object(face.render_glyph_args),
170
170
  classify_cairo_object(face.text_to_glyphs_args),
@@ -191,7 +191,7 @@ class FontFaceTest < Test::Unit::TestCase
191
191
  face.on_text_to_glyphs do |*args|
192
192
  text_to_glyphs_args << args
193
193
  scaled_font, utf8, data = args
194
- data.backward = true
194
+ data.cluster_flags = :backward
195
195
  end
196
196
 
197
197
  unicode_to_glyph_args = []
@@ -220,7 +220,7 @@ class FontFaceTest < Test::Unit::TestCase
220
220
  [],
221
221
  [],
222
222
  [],
223
- [[], [], true]],
223
+ [[], [], Cairo::TextClusterFlag::BACKWARD]],
224
224
  [classify_cairo_object(init_args),
225
225
  classify_cairo_object(render_glyph_args),
226
226
  classify_cairo_object(text_to_glyphs_args),
@@ -7,26 +7,7 @@ class FontOptionsTest < Test::Unit::TestCase
7
7
  @options = Cairo::FontOptions.new
8
8
  end
9
9
 
10
- def test_lcd_filter
11
- only_cairo_version(1, 7, 2)
12
-
13
- assert_equal(Cairo::LCDFilter::DEFAULT, @options.lcd_filter)
14
- @options.lcd_filter = :fir3
15
- assert_equal(Cairo::LCDFilter::FIR3, @options.lcd_filter)
16
-
17
- assert_invalid_lcd_filter(Cairo::LCDFilter::DEFAULT - 1)
18
- assert_invalid_lcd_filter(Cairo::LCDFilter::FIR5 + 1)
19
- end
20
-
21
- def assert_invalid_lcd_filter(value)
22
- options = Cairo::FontOptions.new
23
- exception = assert_raise(ArgumentError) do
24
- options.lcd_filter = value
25
- end
26
- min = Cairo::LCDFilter::DEFAULT
27
- max = Cairo::LCDFilter::FIR5
28
- assert_equal("invalid lcd_filter: #{value} " +
29
- "(expect #{min} <= lcd_filter <= #{max})",
30
- exception.message)
10
+ def test_something
11
+ # WRITE ME!
31
12
  end
32
13
  end
@@ -17,7 +17,7 @@ class ScaledFontTest < Test::Unit::TestCase
17
17
  end
18
18
 
19
19
  def test_text_to_glyphs
20
- only_cairo_version(1, 7, 2)
20
+ only_cairo_version(1, 7, 6)
21
21
 
22
22
  surface = Cairo::PDFSurface.new(StringIO.new, 10, 10)
23
23
  context = Cairo::Context.new(surface)
@@ -27,8 +27,8 @@ class ScaledFontTest < Test::Unit::TestCase
27
27
  Cairo::FontOptions.new)
28
28
  expected_glyphs = []
29
29
  expected_clusters = []
30
- expected_backward = false
31
- assert_equal([expected_glyphs, expected_clusters, expected_backward],
30
+ expected_cluster_flags = 0
31
+ assert_equal([expected_glyphs, expected_clusters, expected_cluster_flags],
32
32
  scaled_font.text_to_glyphs(0, 0, "text"))
33
33
  end
34
34
  end
@@ -4,44 +4,48 @@ class TextToGlyphsDataTest < Test::Unit::TestCase
4
4
  include CairoTestUtils
5
5
 
6
6
  def test_new
7
- only_cairo_version(1, 7, 2)
7
+ only_cairo_version(1, 7, 6)
8
8
 
9
9
  data = Cairo::UserFontFace::TextToGlyphsData.new(false, false, false)
10
10
  assert_equal([false, false, false],
11
- [data.need_glyphs?, data.need_clusters?, data.need_backward?])
11
+ [data.need_glyphs?, data.need_clusters?,
12
+ data.need_cluster_flags?])
12
13
 
13
14
  data = Cairo::UserFontFace::TextToGlyphsData.new(true, false, false)
14
15
  assert_equal([true, false, false],
15
- [data.need_glyphs?, data.need_clusters?, data.need_backward?])
16
+ [data.need_glyphs?, data.need_clusters?,
17
+ data.need_cluster_flags?])
16
18
 
17
19
  data = Cairo::UserFontFace::TextToGlyphsData.new(false, true, false)
18
20
  assert_equal([false, true, false],
19
- [data.need_glyphs?, data.need_clusters?, data.need_backward?])
21
+ [data.need_glyphs?, data.need_clusters?,
22
+ data.need_cluster_flags?])
20
23
 
21
24
  data = Cairo::UserFontFace::TextToGlyphsData.new(false, false, true)
22
25
  assert_equal([false, false, true],
23
- [data.need_glyphs?, data.need_clusters?, data.need_backward?])
26
+ [data.need_glyphs?, data.need_clusters?,
27
+ data.need_cluster_flags?])
24
28
  end
25
29
 
26
30
  def test_accessor
27
- only_cairo_version(1, 7, 2)
31
+ only_cairo_version(1, 7, 6)
28
32
 
29
33
  data = Cairo::UserFontFace::TextToGlyphsData.new(true, true, true)
30
- assert_equal([nil, nil, false],
31
- [data.glyphs, data.clusters, data.backward?])
34
+ assert_equal([nil, nil, 0],
35
+ [data.glyphs, data.clusters, data.cluster_flags])
32
36
 
33
37
  glyph = Cairo::Glyph.new(0, 5, 10)
34
38
  data.glyphs = [glyph]
35
- assert_equal([[glyph], nil, false],
36
- [data.glyphs, data.clusters, data.backward?])
39
+ assert_equal([[glyph], nil, 0],
40
+ [data.glyphs, data.clusters, data.cluster_flags])
37
41
 
38
42
  cluster = Cairo::TextCluster.new(0, 1)
39
43
  data.clusters = [cluster]
40
- assert_equal([[glyph], [cluster], false],
41
- [data.glyphs, data.clusters, data.backward?])
44
+ assert_equal([[glyph], [cluster], 0],
45
+ [data.glyphs, data.clusters, data.cluster_flags])
42
46
 
43
- data.backward = true
44
- assert_equal([[glyph], [cluster], true],
45
- [data.glyphs, data.clusters, data.backward?])
47
+ data.cluster_flags = :backward
48
+ assert_equal([[glyph], [cluster], Cairo::TextClusterFlag::BACKWARD],
49
+ [data.glyphs, data.clusters, data.cluster_flags])
46
50
  end
47
51
  end
Binary file
Binary file
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.7.0
4
+ version: 1.8.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-08-17 00:00:00 +09:00
15
+ date: 2008-09-26 00:00:00 +09:00
16
16
  default_executable:
17
17
  dependencies: []
18
18
 
@@ -83,7 +83,6 @@ files:
83
83
  - doc/en/cairo-invalid-string-error.html
84
84
  - doc/en/cairo-invalid-visual-error.html
85
85
  - doc/en/cairo-invalid-weight.html
86
- - doc/en/cairo-lcd-filter.html
87
86
  - doc/en/cairo-line-cap.html
88
87
  - doc/en/cairo-line-join.html
89
88
  - doc/en/cairo-linear-pattern.html
@@ -125,6 +124,7 @@ files:
125
124
  - doc/en/cairo-svg-surface.html
126
125
  - doc/en/cairo-svg-version.html
127
126
  - doc/en/cairo-temp-file-error.html
127
+ - doc/en/cairo-text-cluster-flag.html
128
128
  - doc/en/cairo-text-cluster.html
129
129
  - doc/en/cairo-text-extents.html
130
130
  - doc/en/cairo-toy-font-face.html
@@ -187,7 +187,6 @@ files:
187
187
  - doc/ja/cairo-invalid-string-error.html
188
188
  - doc/ja/cairo-invalid-visual-error.html
189
189
  - doc/ja/cairo-invalid-weight.html
190
- - doc/ja/cairo-lcd-filter.html
191
190
  - doc/ja/cairo-line-cap.html
192
191
  - doc/ja/cairo-line-join.html
193
192
  - doc/ja/cairo-linear-pattern.html
@@ -229,6 +228,7 @@ files:
229
228
  - doc/ja/cairo-svg-surface.html
230
229
  - doc/ja/cairo-svg-version.html
231
230
  - doc/ja/cairo-temp-file-error.html
231
+ - doc/ja/cairo-text-cluster-flag.html
232
232
  - doc/ja/cairo-text-cluster.html
233
233
  - doc/ja/cairo-text-extents.html
234
234
  - doc/ja/cairo-toy-font-face.html
@@ -287,6 +287,8 @@ files:
287
287
  - src/rb_cairo_surface.c
288
288
  - src/rb_cairo_text_cluster.c
289
289
  - src/rb_cairo_text_extents.c
290
+ - src/tml/make/libpng_1.2.32-1_win32.log
291
+ - src/tml/make/libpng_1.2.32-1_win32.sh
290
292
  - test-unit/Rakefile
291
293
  - test-unit/bin/testrb
292
294
  - test-unit/lib/test/unit.rb
@@ -355,6 +357,8 @@ files:
355
357
  - test-unit/test/util/test_observable.rb
356
358
  - test-unit/test/util/test_procwrapper.rb
357
359
  - test/cairo-test-utils.rb
360
+ - test/example_d.exe
361
+ - test/minigzip_d.exe
358
362
  - test/run-test.rb
359
363
  - test/test_constants.rb
360
364
  - test/test_context.rb
@@ -369,6 +373,8 @@ files:
369
373
  - test/test_text_cluster.rb
370
374
  - test/test_text_extents.rb
371
375
  - test/test_text_to_glyphs_data.rb
376
+ - test/testzlib_d.exe
377
+ - test/untgz_d.exe
372
378
  has_rdoc: false
373
379
  homepage: http://cairographics.org/rcairo
374
380
  post_install_message:
@@ -393,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
393
399
  requirements: []
394
400
 
395
401
  rubyforge_project: cairo
396
- rubygems_version: 1.1.1
402
+ rubygems_version: 1.2.0
397
403
  signing_key:
398
404
  specification_version: 2
399
405
  summary: Ruby bindings for cairo
@@ -1,39 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
6
- <head>
7
- <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
8
- <title>module Cairo::LCDFilter</title>
9
- <link href="../doc.css" type="text/css" rel="stylesheet" />
10
- </head>
11
- <div class="footer">
12
- <ul>
13
- <li><a href="./">Index</a></li>
14
- </ul>
15
-
16
- </div>
17
- </body>
18
-
19
- <h1><a name="label-0" id="label-0">module Cairo::LCDFilter</a></h1><!-- RDLabel: "module Cairo::LCDFilter" -->
20
- <h2><a name="label-1" id="label-1">Constants</a></h2><!-- RDLabel: "Constants" -->
21
- <dl>
22
- <dt><a name="label-2" id="label-2"><code>DEFAULT</code></a></dt><!-- RDLabel: "DEFAULT" -->
23
- <dt><a name="label-3" id="label-3"><code>FIR3</code></a></dt><!-- RDLabel: "FIR3" -->
24
- <dt><a name="label-4" id="label-4"><code>FIR5</code></a></dt><!-- RDLabel: "FIR5" -->
25
- <dt><a name="label-5" id="label-5"><code>INTRA_PIXEL</code></a></dt><!-- RDLabel: "INTRA_PIXEL" -->
26
- <dt><a name="label-6" id="label-6"><code>NONE</code></a></dt><!-- RDLabel: "NONE" -->
27
- </dl>
28
- <h2><a name="label-7" id="label-7">See Also</a></h2><!-- RDLabel: "See Also" -->
29
- <h2><a name="label-8" id="label-8">ChangeLog</a></h2><!-- RDLabel: "ChangeLog" -->
30
-
31
- <div class="footer">
32
- <ul>
33
- <li><a href="./">Index</a></li>
34
- </ul>
35
-
36
- </div>
37
- </body>
38
-
39
- </html>
@@ -1,63 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
- <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
6
- <head>
7
- <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
8
- <title>Cairo::LCDFilterモジュール</title>
9
- <link href="../doc.css" type="text/css" rel="stylesheet" />
10
- </head>
11
- <div class="footer">
12
- <ul>
13
- <li><a href="./">索引</a></li>
14
- </ul>
15
-
16
- </div>
17
- </body>
18
-
19
- <h1><a name="label-0" id="label-0">Cairo::LCDFilterモジュール</a></h1><!-- RDLabel: "Cairo::LCDFilterモジュール" -->
20
- <p><em>Since 1.7</em>: <a href="cairo-lcd-filter.html">Cairo::LCDFilter</a>に定義されている定数は、
21
- <a href="cairo-antialias.html#label-5">Cairo::Antialias::SUBPIXEL</a>アンチエイリアスモードでLCD(液晶ディ
22
- スプレイ)に最適化されたビットマップを生成する時に適用するロー
23
- パスフィルタ(low-pass filter)を指定します。</p>
24
- <h2><a name="label-1" id="label-1">定数</a></h2><!-- RDLabel: "定数" -->
25
- <dl>
26
- <dt><a name="label-2" id="label-2"><code>DEFAULT</code></a></dt><!-- RDLabel: "DEFAULT" -->
27
- <dd>
28
- フォントバックエンドと対象装置のデフォルトLCDフィルタを
29
- 使います。</dd>
30
- <dt><a name="label-3" id="label-3"><code>FIR3</code></a></dt><!-- RDLabel: "FIR3" -->
31
- <dd>
32
- 周辺3x3ピクセル(あってる?FIXME: with a 3x3 kernel)で
33
- 有限インパルス応答フィルタ(FIRフィルタ)を使います。</dd>
34
- <dt><a name="label-4" id="label-4"><code>FIR5</code></a></dt><!-- RDLabel: "FIR5" -->
35
- <dd>
36
- 周辺5x5ピクセル(あってる?FIXME: with a 5x5 kernel)で
37
- 有限インパルス応答フィルタ(FIRフィルタ)を使います。</dd>
38
- <dt><a name="label-5" id="label-5"><code>INTRA_PIXEL</code></a></dt><!-- RDLabel: "INTRA_PIXEL" -->
39
- <dd>
40
- ピクセル内フィルタ(あってる?FIXME: intra-pixel filter)
41
- を使います。</dd>
42
- <dt><a name="label-6" id="label-6"><code>NONE</code></a></dt><!-- RDLabel: "NONE" -->
43
- <dd>
44
- LCDフィルタを実行しません。</dd>
45
- </dl>
46
- <h2><a name="label-7" id="label-7">参考</a></h2><!-- RDLabel: "参考" -->
47
- <ul>
48
- <li><a href="cairo-antialias.html#label-5">Cairo::Antialias::SUBPIXEL</a></li>
49
- </ul>
50
- <h2><a name="label-8" id="label-8">変更履歴</a></h2><!-- RDLabel: "変更履歴" -->
51
- <ul>
52
- <li>2008-08-17: kou: スタート。</li>
53
- </ul>
54
-
55
- <div class="footer">
56
- <ul>
57
- <li><a href="./">索引</a></li>
58
- </ul>
59
-
60
- </div>
61
- </body>
62
-
63
- </html>