cairo 1.6.1 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

Files changed (267) hide show
  1. data/ChangeLog +48 -0
  2. data/NEWS +10 -0
  3. data/Rakefile +6 -7
  4. data/doc/en/cairo-antialias.html +1 -1
  5. data/doc/en/cairo-antialias.rbl +8 -0
  6. data/doc/en/cairo-antialias.rd +16 -0
  7. data/doc/en/cairo-antialias.rdc +16 -0
  8. data/doc/en/cairo-clip-not-representable-error.html +1 -1
  9. data/doc/en/cairo-clip-not-representable-error.rbl +4 -0
  10. data/doc/en/cairo-clip-not-representable-error.rd +17 -0
  11. data/doc/en/cairo-clip-not-representable-error.rdc +17 -0
  12. data/doc/en/cairo-color-base.rbl +11 -0
  13. data/doc/en/cairo-color-base.rd +38 -0
  14. data/doc/en/cairo-color-base.rdc +38 -0
  15. data/doc/en/cairo-color-cmyk.html +1 -1
  16. data/doc/en/cairo-color-cmyk.rbl +28 -0
  17. data/doc/en/cairo-color-cmyk.rd +107 -0
  18. data/doc/en/cairo-color-cmyk.rdc +107 -0
  19. data/doc/en/cairo-color-hsv.rd +91 -0
  20. data/doc/en/cairo-color-rgb.rd +95 -0
  21. data/doc/en/cairo-color-x11.rd +151 -0
  22. data/doc/en/cairo-color.rd +213 -0
  23. data/doc/en/cairo-content.rd +15 -0
  24. data/doc/en/cairo-context-blur.rd +15 -0
  25. data/doc/en/cairo-context-circle.rd +15 -0
  26. data/doc/en/cairo-context-color.rd +15 -0
  27. data/doc/en/cairo-context-path.rd +19 -0
  28. data/doc/en/cairo-context-rectangle.html +1 -1
  29. data/doc/en/cairo-context-rectangle.rbl +5 -0
  30. data/doc/en/cairo-context-rectangle.rd +15 -0
  31. data/doc/en/cairo-context-rectangle.rdc +15 -0
  32. data/doc/en/cairo-context-triangle.rd +15 -0
  33. data/doc/en/cairo-context.html +5 -5
  34. data/doc/en/cairo-context.rbl +123 -0
  35. data/doc/en/cairo-context.rd +491 -0
  36. data/doc/en/cairo-context.rdc +491 -0
  37. data/doc/en/cairo-error.rd +16 -0
  38. data/doc/en/cairo-extend.rd +16 -0
  39. data/doc/en/cairo-file-not-found.html +1 -1
  40. data/doc/en/cairo-file-not-found.rbl +4 -0
  41. data/doc/en/cairo-file-not-found.rd +17 -0
  42. data/doc/en/cairo-file-not-found.rdc +17 -0
  43. data/doc/en/cairo-fill-rule.rd +14 -0
  44. data/doc/en/cairo-filter.rbl +10 -0
  45. data/doc/en/cairo-filter.rd +18 -0
  46. data/doc/en/cairo-filter.rdc +18 -0
  47. data/doc/en/cairo-font-extents.rd +40 -0
  48. data/doc/en/cairo-font-face.rd +14 -0
  49. data/doc/en/cairo-font-options.rd +94 -0
  50. data/doc/en/cairo-font-slant.rbl +7 -0
  51. data/doc/en/cairo-font-slant.rd +15 -0
  52. data/doc/en/cairo-font-slant.rdc +15 -0
  53. data/doc/en/cairo-font-weight.html +1 -1
  54. data/doc/en/cairo-font-weight.rbl +6 -0
  55. data/doc/en/cairo-font-weight.rd +14 -0
  56. data/doc/en/cairo-font-weight.rdc +14 -0
  57. data/doc/en/cairo-format.rbl +10 -0
  58. data/doc/en/cairo-format.rd +22 -0
  59. data/doc/en/cairo-format.rdc +22 -0
  60. data/doc/en/cairo-glyph.rd +62 -0
  61. data/doc/en/cairo-gradient-pattern.rd +41 -0
  62. data/doc/en/cairo-hint-metrics.rd +15 -0
  63. data/doc/en/cairo-hint-style.html +1 -1
  64. data/doc/en/cairo-hint-style.rbl +9 -0
  65. data/doc/en/cairo-hint-style.rd +17 -0
  66. data/doc/en/cairo-hint-style.rdc +17 -0
  67. data/doc/en/cairo-image-surface.rd +47 -0
  68. data/doc/en/cairo-invalid-content-error.rd +17 -0
  69. data/doc/en/cairo-invalid-dash-error.html +1 -1
  70. data/doc/en/cairo-invalid-dash-error.rbl +4 -0
  71. data/doc/en/cairo-invalid-dash-error.rd +17 -0
  72. data/doc/en/cairo-invalid-dash-error.rdc +17 -0
  73. data/doc/en/cairo-invalid-dsc-comment-error.rd +17 -0
  74. data/doc/en/cairo-invalid-format-error.rd +17 -0
  75. data/doc/en/cairo-invalid-index-error.rd +17 -0
  76. data/doc/en/cairo-invalid-matrix-error.rbl +4 -0
  77. data/doc/en/cairo-invalid-matrix-error.rd +17 -0
  78. data/doc/en/cairo-invalid-matrix-error.rdc +17 -0
  79. data/doc/en/cairo-invalid-path-data-error.rd +17 -0
  80. data/doc/en/cairo-invalid-pop-group-error.html +1 -1
  81. data/doc/en/cairo-invalid-pop-group-error.rbl +4 -0
  82. data/doc/en/cairo-invalid-pop-group-error.rd +17 -0
  83. data/doc/en/cairo-invalid-pop-group-error.rdc +17 -0
  84. data/doc/en/cairo-invalid-restore-error.rd +17 -0
  85. data/doc/en/cairo-invalid-status-error.rd +17 -0
  86. data/doc/en/cairo-invalid-stride-error.rbl +4 -0
  87. data/doc/en/cairo-invalid-stride-error.rd +17 -0
  88. data/doc/en/cairo-invalid-stride-error.rdc +17 -0
  89. data/doc/en/cairo-invalid-string-error.rd +17 -0
  90. data/doc/en/cairo-invalid-visual-error.rd +17 -0
  91. data/doc/en/cairo-line-cap.rd +15 -0
  92. data/doc/en/cairo-line-join.rd +15 -0
  93. data/doc/en/cairo-linear-pattern.rd +28 -0
  94. data/doc/en/cairo-matrix.rd +186 -0
  95. data/doc/en/cairo-no-current-point-error.rd +17 -0
  96. data/doc/en/cairo-null-pointer-error.rbl +4 -0
  97. data/doc/en/cairo-null-pointer-error.rd +17 -0
  98. data/doc/en/cairo-null-pointer-error.rdc +17 -0
  99. data/doc/en/cairo-operator.rbl +18 -0
  100. data/doc/en/cairo-operator.rd +26 -0
  101. data/doc/en/cairo-operator.rdc +26 -0
  102. data/doc/en/cairo-paper-parse-error.html +1 -1
  103. data/doc/en/cairo-paper-parse-error.rbl +4 -0
  104. data/doc/en/cairo-paper-parse-error.rd +17 -0
  105. data/doc/en/cairo-paper-parse-error.rdc +17 -0
  106. data/doc/en/cairo-paper-unknown-paper-name.rd +30 -0
  107. data/doc/en/cairo-paper-unknown-unit.rd +30 -0
  108. data/doc/en/cairo-paper-unrecognized-paper-description.html +2 -2
  109. data/doc/en/cairo-paper-unrecognized-paper-description.rbl +8 -0
  110. data/doc/en/cairo-paper-unrecognized-paper-description.rd +30 -0
  111. data/doc/en/cairo-paper-unrecognized-paper-description.rdc +30 -0
  112. data/doc/en/cairo-paper.rbl +76 -0
  113. data/doc/en/cairo-paper.rd +141 -0
  114. data/doc/en/cairo-paper.rdc +141 -0
  115. data/doc/en/cairo-path-close-path.rd +21 -0
  116. data/doc/en/cairo-path-curve-to.html +1 -1
  117. data/doc/en/cairo-path-curve-to.rbl +6 -0
  118. data/doc/en/cairo-path-curve-to.rd +21 -0
  119. data/doc/en/cairo-path-curve-to.rdc +21 -0
  120. data/doc/en/cairo-path-data-type.html +1 -1
  121. data/doc/en/cairo-path-data-type.rbl +8 -0
  122. data/doc/en/cairo-path-data-type.rd +16 -0
  123. data/doc/en/cairo-path-data-type.rdc +16 -0
  124. data/doc/en/cairo-path-data.rbl +17 -0
  125. data/doc/en/cairo-path-data.rd +62 -0
  126. data/doc/en/cairo-path-data.rdc +62 -0
  127. data/doc/en/cairo-path-line-to.html +1 -1
  128. data/doc/en/cairo-path-line-to.rbl +6 -0
  129. data/doc/en/cairo-path-line-to.rd +21 -0
  130. data/doc/en/cairo-path-line-to.rdc +21 -0
  131. data/doc/en/cairo-path-move-to.html +1 -1
  132. data/doc/en/cairo-path-move-to.rbl +6 -0
  133. data/doc/en/cairo-path-move-to.rd +21 -0
  134. data/doc/en/cairo-path-move-to.rdc +21 -0
  135. data/doc/en/cairo-path.html +1 -1
  136. data/doc/en/cairo-path.rbl +32 -0
  137. data/doc/en/cairo-path.rd +109 -0
  138. data/doc/en/cairo-path.rdc +109 -0
  139. data/doc/en/cairo-pattern-type-mismatch-error.rd +17 -0
  140. data/doc/en/cairo-pattern.rbl +17 -0
  141. data/doc/en/cairo-pattern.rd +62 -0
  142. data/doc/en/cairo-pattern.rdc +62 -0
  143. data/doc/en/cairo-pdf-surface.html +2 -2
  144. data/doc/en/cairo-pdf-surface.rbl +8 -0
  145. data/doc/en/cairo-pdf-surface.rd +27 -0
  146. data/doc/en/cairo-pdf-surface.rdc +27 -0
  147. data/doc/en/cairo-point.rbl +12 -0
  148. data/doc/en/cairo-point.rd +42 -0
  149. data/doc/en/cairo-point.rdc +42 -0
  150. data/doc/en/cairo-ps-level.rd +24 -0
  151. data/doc/en/cairo-ps-surface.html +1 -1
  152. data/doc/en/cairo-ps-surface.rbl +15 -0
  153. data/doc/en/cairo-ps-surface.rd +55 -0
  154. data/doc/en/cairo-ps-surface.rdc +55 -0
  155. data/doc/en/cairo-quartz-image-surface.rd +27 -0
  156. data/doc/en/cairo-quartz-surface.html +2 -2
  157. data/doc/en/cairo-quartz-surface.rbl +8 -0
  158. data/doc/en/cairo-quartz-surface.rd +27 -0
  159. data/doc/en/cairo-quartz-surface.rdc +27 -0
  160. data/doc/en/cairo-radial-pattern.rd +28 -0
  161. data/doc/en/cairo-read-error.rd +17 -0
  162. data/doc/en/cairo-rectangle.rbl +15 -0
  163. data/doc/en/cairo-rectangle.rd +54 -0
  164. data/doc/en/cairo-rectangle.rdc +54 -0
  165. data/doc/en/cairo-scaled-font.rd +50 -0
  166. data/doc/en/cairo-solid-pattern.rd +31 -0
  167. data/doc/en/cairo-subpixel-order.rbl +9 -0
  168. data/doc/en/cairo-subpixel-order.rd +17 -0
  169. data/doc/en/cairo-subpixel-order.rdc +17 -0
  170. data/doc/en/cairo-surface-finished-error.html +1 -1
  171. data/doc/en/cairo-surface-finished-error.rbl +4 -0
  172. data/doc/en/cairo-surface-finished-error.rd +17 -0
  173. data/doc/en/cairo-surface-finished-error.rdc +17 -0
  174. data/doc/en/cairo-surface-pattern.rbl +8 -0
  175. data/doc/en/cairo-surface-pattern.rd +27 -0
  176. data/doc/en/cairo-surface-pattern.rdc +27 -0
  177. data/doc/en/cairo-surface-type-mismatch-error.rd +17 -0
  178. data/doc/en/cairo-surface.rbl +19 -0
  179. data/doc/en/cairo-surface.rd +72 -0
  180. data/doc/en/cairo-surface.rdc +72 -0
  181. data/doc/en/cairo-svg-surface.rd +44 -0
  182. data/doc/en/cairo-svg-version.rbl +9 -0
  183. data/doc/en/cairo-svg-version.rd +24 -0
  184. data/doc/en/cairo-svg-version.rdc +24 -0
  185. data/doc/en/cairo-temp-file-error.rd +17 -0
  186. data/doc/en/cairo-text-extents.rd +44 -0
  187. data/doc/en/cairo-win32-printing-surface.rd +27 -0
  188. data/doc/en/cairo-win32-surface.rd +31 -0
  189. data/doc/en/cairo-write-error.rd +17 -0
  190. data/doc/en/cairo.html +1 -1
  191. data/doc/en/cairo.rbl +80 -0
  192. data/doc/en/cairo.rd +95 -0
  193. data/doc/en/cairo.rdc +95 -0
  194. data/doc/en/index.html +915 -915
  195. data/doc/en/index.rbl +1 -0
  196. data/doc/en/index.rd +1051 -0
  197. data/doc/en/index.rdc +1051 -0
  198. data/extconf.rb +3 -2
  199. data/misc/update-colors.rb +0 -0
  200. data/pkg-config.rb +7 -2
  201. data/samples/agg/aa_demo.rb +0 -0
  202. data/samples/agg/aa_test.rb +0 -0
  203. data/samples/blur.rb +0 -0
  204. data/samples/png.rb +0 -0
  205. data/samples/scalable.rb +0 -0
  206. data/samples/text-on-path.rb +0 -0
  207. data/samples/text2.rb +0 -0
  208. data/src/lib/cairo/table.rb +29 -0
  209. data/src/rb_cairo.c +2 -2
  210. data/src/rb_cairo.h +1 -11
  211. data/src/rb_cairo_context.c +10 -10
  212. data/src/rb_cairo_pattern.c +4 -4
  213. data/src/rb_cairo_private.h +10 -2
  214. data/src/rb_cairo_surface.c +19 -2
  215. data/test/run-test.rb +0 -0
  216. metadata +175 -54
  217. data/doc/en/cairo-color-hsv.html +0 -140
  218. data/doc/en/cairo-color-rgb.html +0 -145
  219. data/doc/en/cairo-color-x11.html +0 -176
  220. data/doc/en/cairo-color.html +0 -241
  221. data/doc/en/cairo-content.html +0 -40
  222. data/doc/en/cairo-context-blur.html +0 -42
  223. data/doc/en/cairo-context-circle.html +0 -42
  224. data/doc/en/cairo-context-color.html +0 -42
  225. data/doc/en/cairo-context-path.html +0 -47
  226. data/doc/en/cairo-context-triangle.html +0 -42
  227. data/doc/en/cairo-error.html +0 -47
  228. data/doc/en/cairo-extend.html +0 -41
  229. data/doc/en/cairo-fill-rule.html +0 -39
  230. data/doc/en/cairo-font-extents.html +0 -74
  231. data/doc/en/cairo-font-face.html +0 -41
  232. data/doc/en/cairo-font-options.html +0 -142
  233. data/doc/en/cairo-glyph.html +0 -102
  234. data/doc/en/cairo-gradient-pattern.html +0 -77
  235. data/doc/en/cairo-hint-metrics.html +0 -40
  236. data/doc/en/cairo-image-surface.html +0 -85
  237. data/doc/en/cairo-invalid-content-error.html +0 -50
  238. data/doc/en/cairo-invalid-dsc-comment-error.html +0 -50
  239. data/doc/en/cairo-invalid-format-error.html +0 -50
  240. data/doc/en/cairo-invalid-index-error.html +0 -50
  241. data/doc/en/cairo-invalid-path-data-error.html +0 -50
  242. data/doc/en/cairo-invalid-restore-error.html +0 -50
  243. data/doc/en/cairo-invalid-status-error.html +0 -50
  244. data/doc/en/cairo-invalid-string-error.html +0 -50
  245. data/doc/en/cairo-invalid-visual-error.html +0 -50
  246. data/doc/en/cairo-line-cap.html +0 -40
  247. data/doc/en/cairo-line-join.html +0 -40
  248. data/doc/en/cairo-linear-pattern.html +0 -63
  249. data/doc/en/cairo-matrix.html +0 -257
  250. data/doc/en/cairo-no-current-point-error.html +0 -50
  251. data/doc/en/cairo-paper-unknown-paper-name.html +0 -69
  252. data/doc/en/cairo-paper-unknown-unit.html +0 -69
  253. data/doc/en/cairo-path-close-path.html +0 -52
  254. data/doc/en/cairo-pattern-type-mismatch-error.html +0 -50
  255. data/doc/en/cairo-ps-level.html +0 -52
  256. data/doc/en/cairo-quartz-image-surface.html +0 -60
  257. data/doc/en/cairo-radial-pattern.html +0 -63
  258. data/doc/en/cairo-read-error.html +0 -50
  259. data/doc/en/cairo-scaled-font.html +0 -87
  260. data/doc/en/cairo-solid-pattern.html +0 -65
  261. data/doc/en/cairo-surface-type-mismatch-error.html +0 -50
  262. data/doc/en/cairo-svg-surface.html +0 -80
  263. data/doc/en/cairo-temp-file-error.html +0 -50
  264. data/doc/en/cairo-text-extents.html +0 -79
  265. data/doc/en/cairo-win32-printing-surface.html +0 -60
  266. data/doc/en/cairo-win32-surface.html +0 -65
  267. data/doc/en/cairo-write-error.html +0 -50
data/extconf.rb CHANGED
@@ -80,7 +80,8 @@ major, minor, micro = 1, 2, 0
80
80
 
81
81
  PKGConfig.have_package(pkg, major, minor, micro) or exit 1
82
82
 
83
- have_func("rb_errinfo")
83
+ have_func("rb_errinfo", "ruby.h")
84
+ have_type("enum ruby_value_type", "ruby.h")
84
85
 
85
86
  check_win32
86
87
  target_name = File.basename(modname)
@@ -96,7 +97,7 @@ File.open("Makefile", "w") do |f|
96
97
  co = nil
97
98
  makefile.each_line do |line|
98
99
  if wine
99
- line.gsub!(/\bgcc\b/, "i586-mingw32msvc-gcc")
100
+ line.gsub!(/\s+gcc\b/, " i586-mingw32msvc-gcc")
100
101
  line.gsub!(/C:/, "$(HOME)/.wine/drive_c")
101
102
  line.gsub!(/Z:/, "")
102
103
  end
File without changes
data/pkg-config.rb CHANGED
@@ -165,7 +165,10 @@ class PackageConfig
165
165
  end
166
166
 
167
167
  def guess_default_path
168
- default_path = "/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
168
+ default_path = ["/usr/local/lib64/pkgconfig",
169
+ "/usr/local/lib/pkgconfig",
170
+ "/usr/lib64/pkgconfig",
171
+ "/usr/lib/pkgconfig"].join(":")
169
172
  libdir = ENV["PKG_CONFIG_LIBDIR"]
170
173
  default_path = "#{libdir}:#{default_path}" if libdir
171
174
  pkg_config = with_config("pkg-config", ENV["PKG_CONFIG"] || "pkg-config")
@@ -187,14 +190,16 @@ class PackageConfig
187
190
  dlload RbConfig::CONFIG["LIBRUBY"]
188
191
  rescue RuntimeError
189
192
  return default_path if $!.message == "unknown error"
193
+ return default_path if /: image not found\z/ =~ $!.message
190
194
  raise
191
195
  rescue DL::DLError
192
196
  return default_path
193
197
  end
194
198
  extern "const char *dln_find_exe(const char *, const char *)"
195
199
  end
196
- pkg_config = dln.dln_find_exe(pkg_config.to_s, nil)
200
+ pkg_config = dln.dln_find_exe(pkg_config.to_s, ".")
197
201
  return default_path if pkg_config.nil?
202
+ return default_path if pkg_config.size.zero?
198
203
  pkg_config = Pathname.new(pkg_config)
199
204
  end
200
205
  [(pkg_config.parent.parent + "lib" + "pkgconfig").to_s,
File without changes
File without changes
data/samples/blur.rb CHANGED
File without changes
data/samples/png.rb CHANGED
File without changes
data/samples/scalable.rb CHANGED
File without changes
File without changes
data/samples/text2.rb CHANGED
File without changes
@@ -0,0 +1,29 @@
1
+ require 'pango'
2
+
3
+ module Cairo
4
+ class Table
5
+ class Row
6
+ def render_to(context)
7
+
8
+ end
9
+ end
10
+
11
+ class Cell
12
+ def initialize
13
+ end
14
+
15
+ def render_to(context)
16
+ end
17
+ end
18
+
19
+ class Heading < Cell
20
+ end
21
+
22
+ def initialize
23
+ @rows = []
24
+ end
25
+
26
+ def render_to(context)
27
+ end
28
+ end
29
+ end
data/src/rb_cairo.c CHANGED
@@ -3,7 +3,7 @@
3
3
  * Ruby Cairo Binding
4
4
  *
5
5
  * $Author: kou $
6
- * $Date: 2008-04-24 06:01:56 $
6
+ * $Date: 2008-06-14 12:17:39 $
7
7
  *
8
8
  * Copyright 2006-2007 Kouhei Sutou <kou@cozmixng.org>
9
9
  * Copyright 2005 Øyvind Kolås <pippin@freedesktop.org>
@@ -58,7 +58,7 @@ Init_cairo ()
58
58
 
59
59
  rb_define_const (rb_mCairo, "BINDINGS_VERSION",
60
60
  rb_ary_new3 (4,
61
- INT2FIX (1), INT2FIX (6), INT2FIX (1), Qnil));
61
+ INT2FIX (1), INT2FIX (6), INT2FIX (2), Qnil));
62
62
 
63
63
  rb_mCairo_Color = rb_const_get (rb_mCairo, rb_intern ("Color"));
64
64
  rb_cCairo_Color_Base = rb_const_get (rb_mCairo_Color, rb_intern ("Base"));
data/src/rb_cairo.h CHANGED
@@ -3,7 +3,7 @@
3
3
  * Ruby Cairo Binding
4
4
  *
5
5
  * $Author: kou $
6
- * $Date: 2008-04-11 03:01:33 $
6
+ * $Date: 2008-04-30 04:57:51 $
7
7
  *
8
8
  * Copyright 2005 Øyvind Kolås <pippin@freedesktop.org>
9
9
  * Copyright 2004-2005 MenTaLguY <mental@rydia.com>
@@ -30,16 +30,6 @@
30
30
  # include <cairo-svg.h>
31
31
  #endif
32
32
 
33
- #if CAIRO_HAS_WIN32_SURFACE
34
- # define OpenFile OpenFile_win32
35
- # include <cairo-win32.h>
36
- # undef OpenFile
37
- #endif
38
-
39
- #if CAIRO_HAS_QUARTZ_SURFACE
40
- # include <cairo-quartz.h>
41
- #endif
42
-
43
33
  #define CAIRO_CHECK_VERSION(major, minor, micro) \
44
34
  (CAIRO_VERSION_MAJOR > (major) || \
45
35
  (CAIRO_VERSION_MAJOR == (major) && CAIRO_VERSION_MINOR > (minor)) || \
@@ -3,7 +3,7 @@
3
3
  * Ruby Cairo Binding
4
4
  *
5
5
  * $Author: kou $
6
- * $Date: 2008-03-25 13:43:50 $
6
+ * $Date: 2008-06-12 10:59:54 $
7
7
  *
8
8
  * Copyright 2005 Øyvind Kolås <pippin@freedesktop.org>
9
9
  * Copyright 2004-2005 MenTaLguY <mental@rydia.com>
@@ -211,7 +211,7 @@ cr_set_source_rgb (int argc, VALUE *argv, VALUE self)
211
211
  if (n == 1 && rb_cairo__is_kind_of (red, rb_cArray))
212
212
  {
213
213
  VALUE ary = red;
214
- n = RARRAY (ary)->len;
214
+ n = RARRAY_LEN (ary);
215
215
  red = rb_ary_entry (ary, 0);
216
216
  green = rb_ary_entry (ary, 1);
217
217
  blue = rb_ary_entry (ary, 2);
@@ -248,7 +248,7 @@ cr_set_source_rgba (int argc, VALUE *argv, VALUE self)
248
248
  if (n == 1 && rb_cairo__is_kind_of (red, rb_cArray))
249
249
  {
250
250
  VALUE ary = red;
251
- n = RARRAY (ary)->len;
251
+ n = RARRAY_LEN (ary);
252
252
  red = rb_ary_entry (ary, 0);
253
253
  green = rb_ary_entry (ary, 1);
254
254
  blue = rb_ary_entry (ary, 2);
@@ -413,7 +413,7 @@ cr_set_dash (int argc, VALUE *argv, VALUE self)
413
413
  values[0] = NUM2DBL (dash_array);
414
414
  cairo_set_dash (_SELF, values, 1, offset);
415
415
  }
416
- else if (NIL_P (dash_array) || RARRAY (dash_array)->len == 0)
416
+ else if (NIL_P (dash_array) || RARRAY_LEN (dash_array) == 0)
417
417
  {
418
418
  cairo_set_dash (_SELF, NULL, 0, offset);
419
419
  }
@@ -421,7 +421,7 @@ cr_set_dash (int argc, VALUE *argv, VALUE self)
421
421
  {
422
422
  int i, length;
423
423
  double *values;
424
- length = RARRAY (dash_array)->len;
424
+ length = RARRAY_LEN (dash_array);
425
425
  values = ALLOCA_N (double, length);
426
426
  if (!values)
427
427
  {
@@ -429,7 +429,7 @@ cr_set_dash (int argc, VALUE *argv, VALUE self)
429
429
  }
430
430
  for (i = 0; i < length; i++)
431
431
  {
432
- values[i] = NUM2DBL (RARRAY (dash_array)->ptr[i]);
432
+ values[i] = NUM2DBL (RARRAY_PTR (dash_array)[i]);
433
433
  }
434
434
  cairo_set_dash (_SELF, values, length, offset);
435
435
  }
@@ -588,8 +588,8 @@ cr_quadratic_curve_to (VALUE self, VALUE x1, VALUE y1, VALUE x2, VALUE y2)
588
588
  VALUE current_point, x0, y0, cx1, cy1, cx2, cy2;
589
589
 
590
590
  current_point = cr_get_current_point (self);
591
- x0 = RARRAY (current_point)->ptr[0];
592
- y0 = RARRAY (current_point)->ptr[1];
591
+ x0 = RARRAY_PTR (current_point)[0];
592
+ y0 = RARRAY_PTR (current_point)[1];
593
593
 
594
594
  /* cx1 = x0 + 2 * ((x1 - x0) / 3.0) */
595
595
  cx1 = rb_funcall (x0, cr_id_plus, 1,
@@ -689,8 +689,8 @@ cr_rel_quadratic_curve_to (VALUE self, VALUE dx1, VALUE dy1,
689
689
  VALUE current_point, x0, y0;
690
690
 
691
691
  current_point = cr_get_current_point (self);
692
- x0 = RARRAY (current_point)->ptr[0];
693
- y0 = RARRAY (current_point)->ptr[1];
692
+ x0 = RARRAY_PTR (current_point)[0];
693
+ y0 = RARRAY_PTR (current_point)[1];
694
694
  return cr_quadratic_curve_to (self,
695
695
  rb_funcall (dx1, cr_id_plus, 1, x0),
696
696
  rb_funcall (dy1, cr_id_plus, 1, y0),
@@ -3,7 +3,7 @@
3
3
  * Ruby Cairo Binding
4
4
  *
5
5
  * $Author: kou $
6
- * $Date: 2007/05/22 14:24:34 $
6
+ * $Date: 2008-06-12 10:59:54 $
7
7
  *
8
8
  * Copyright 2005 Øyvind Kolås <pippin@freedesktop.org>
9
9
  * Copyright 2004-2005 MenTaLguY <mental@rydia.com>
@@ -137,10 +137,10 @@ cr_solid_pattern_initialize (int argc, VALUE *argv, VALUE self)
137
137
  }
138
138
 
139
139
  if (n == 1 && rb_cairo__is_kind_of (red, rb_cArray) &&
140
- (RARRAY (red)->len == 3 || RARRAY (red)->len == 4))
140
+ (RARRAY_LEN (red) == 3 || RARRAY_LEN (red) == 4))
141
141
  {
142
142
  VALUE ary = red;
143
- n = RARRAY (ary)->len;
143
+ n = RARRAY_LEN (ary);
144
144
 
145
145
  red = rb_ary_entry (ary, 0);
146
146
  green = rb_ary_entry (ary, 1);
@@ -247,7 +247,7 @@ cr_gradient_pattern_add_color_stop_generic (int argc, VALUE *argv, VALUE self)
247
247
  if (n == 2 && rb_cairo__is_kind_of (red, rb_cArray))
248
248
  {
249
249
  VALUE ary = red;
250
- n = RARRAY (ary)->len + 1;
250
+ n = RARRAY_LEN (ary) + 1;
251
251
 
252
252
  red = rb_ary_entry (ary, 0);
253
253
  green = rb_ary_entry (ary, 1);
@@ -3,7 +3,7 @@
3
3
  * Ruby Cairo Binding
4
4
  *
5
5
  * $Author: kou $
6
- * $Date: 2008-01-11 08:03:39 $
6
+ * $Date: 2008-06-12 10:59:54 $
7
7
  *
8
8
  * Copyright 2005 Kouhei Sutou <kou@cozmixng.org>
9
9
  *
@@ -27,6 +27,14 @@
27
27
  # define RSTRING_LEN(string) (RSTRING(string)->len)
28
28
  #endif
29
29
 
30
+ #ifndef RARRAY_PTR
31
+ # define RARRAY_PTR(array) (RARRAY(array)->ptr)
32
+ #endif
33
+
34
+ #ifndef RARRAY_LEN
35
+ # define RARRAY_LEN(array) (RARRAY(array)->len)
36
+ #endif
37
+
30
38
  #ifdef HAVE_RB_ERRINFO
31
39
  # define RB_ERRINFO (rb_errinfo())
32
40
  #else
@@ -54,7 +62,7 @@ extern void Init_cairo_glyph (void);
54
62
  do \
55
63
  { \
56
64
  Check_Type (rb_array, T_ARRAY); \
57
- length = RARRAY (rb_array)->len; \
65
+ length = RARRAY_LEN (rb_array); \
58
66
  glyphs = ALLOCA_N (cairo_glyph_t, length); \
59
67
  \
60
68
  if (!glyphs) \
@@ -3,7 +3,7 @@
3
3
  * Ruby Cairo Binding
4
4
  *
5
5
  * $Author: kou $
6
- * $Date: 2008-04-16 14:48:23 $
6
+ * $Date: 2008-06-14 12:38:25 $
7
7
  *
8
8
  * Copyright 2005 Øyvind Kolås <pippin@freedesktop.org>
9
9
  * Copyright 2004-2005 MenTaLguY <mental@rydia.com>
@@ -15,7 +15,24 @@
15
15
  #include "rb_cairo.h"
16
16
  #include "rb_cairo_private.h"
17
17
 
18
- #include "rubyio.h"
18
+ #if CAIRO_HAS_WIN32_SURFACE
19
+ # define OpenFile OpenFile_win32
20
+ # include <cairo-win32.h>
21
+ # undef OpenFile
22
+ #endif
23
+
24
+ #include <rubyio.h>
25
+
26
+ #if CAIRO_HAS_QUARTZ_SURFACE
27
+ # ifndef HAVE_TYPE_ENUM_RUBY_VALUE_TYPE
28
+ enum ruby_value_type {
29
+ RUBY_T_DATA = T_DATA
30
+ };
31
+ # endif
32
+ # undef T_DATA
33
+ # include <cairo-quartz.h>
34
+ # define T_DATA RUBY_T_DATA
35
+ #endif
19
36
 
20
37
  #if CAIRO_HAS_PS_SURFACE || CAIRO_HAS_PDF_SURFACE || CAIRO_HAS_SVG_SURFACE
21
38
  # define HAS_CREATE_CR_CLOSURE_SURFACE 1
data/test/run-test.rb CHANGED
File without changes
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.6.1
4
+ version: 1.6.2
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-04-24 00:00:00 +09:00
15
+ date: 2008-06-14 00:00:00 +09:00
16
16
  default_executable:
17
17
  dependencies: []
18
18
 
@@ -35,96 +35,216 @@ files:
35
35
  - Rakefile
36
36
  - doc/doc.css
37
37
  - doc/en/cairo-antialias.html
38
+ - doc/en/cairo-antialias.rbl
39
+ - doc/en/cairo-antialias.rd
40
+ - doc/en/cairo-antialias.rdc
38
41
  - doc/en/cairo-clip-not-representable-error.html
42
+ - doc/en/cairo-clip-not-representable-error.rbl
43
+ - doc/en/cairo-clip-not-representable-error.rd
44
+ - doc/en/cairo-clip-not-representable-error.rdc
39
45
  - doc/en/cairo-color-base.html
46
+ - doc/en/cairo-color-base.rbl
47
+ - doc/en/cairo-color-base.rd
48
+ - doc/en/cairo-color-base.rdc
40
49
  - 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-color-cmyk.rbl
51
+ - doc/en/cairo-color-cmyk.rd
52
+ - doc/en/cairo-color-cmyk.rdc
53
+ - doc/en/cairo-color-hsv.rd
54
+ - doc/en/cairo-color-rgb.rd
55
+ - doc/en/cairo-color-x11.rd
56
+ - doc/en/cairo-color.rd
57
+ - doc/en/cairo-content.rd
58
+ - doc/en/cairo-context-blur.rd
59
+ - doc/en/cairo-context-circle.rd
60
+ - doc/en/cairo-context-color.rd
61
+ - doc/en/cairo-context-path.rd
50
62
  - doc/en/cairo-context-rectangle.html
51
- - doc/en/cairo-context-triangle.html
63
+ - doc/en/cairo-context-rectangle.rbl
64
+ - doc/en/cairo-context-rectangle.rd
65
+ - doc/en/cairo-context-rectangle.rdc
66
+ - doc/en/cairo-context-triangle.rd
52
67
  - doc/en/cairo-context.html
53
- - doc/en/cairo-error.html
54
- - doc/en/cairo-extend.html
68
+ - doc/en/cairo-context.rbl
69
+ - doc/en/cairo-context.rd
70
+ - doc/en/cairo-context.rdc
71
+ - doc/en/cairo-error.rd
72
+ - doc/en/cairo-extend.rd
55
73
  - doc/en/cairo-file-not-found.html
56
- - doc/en/cairo-fill-rule.html
74
+ - doc/en/cairo-file-not-found.rbl
75
+ - doc/en/cairo-file-not-found.rd
76
+ - doc/en/cairo-file-not-found.rdc
77
+ - doc/en/cairo-fill-rule.rd
57
78
  - 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
79
+ - doc/en/cairo-filter.rbl
80
+ - doc/en/cairo-filter.rd
81
+ - doc/en/cairo-filter.rdc
82
+ - doc/en/cairo-font-extents.rd
83
+ - doc/en/cairo-font-face.rd
84
+ - doc/en/cairo-font-options.rd
61
85
  - doc/en/cairo-font-slant.html
86
+ - doc/en/cairo-font-slant.rbl
87
+ - doc/en/cairo-font-slant.rd
88
+ - doc/en/cairo-font-slant.rdc
62
89
  - doc/en/cairo-font-weight.html
90
+ - doc/en/cairo-font-weight.rbl
91
+ - doc/en/cairo-font-weight.rd
92
+ - doc/en/cairo-font-weight.rdc
63
93
  - 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
94
+ - doc/en/cairo-format.rbl
95
+ - doc/en/cairo-format.rd
96
+ - doc/en/cairo-format.rdc
97
+ - doc/en/cairo-glyph.rd
98
+ - doc/en/cairo-gradient-pattern.rd
99
+ - doc/en/cairo-hint-metrics.rd
67
100
  - doc/en/cairo-hint-style.html
68
- - doc/en/cairo-image-surface.html
69
- - doc/en/cairo-invalid-content-error.html
101
+ - doc/en/cairo-hint-style.rbl
102
+ - doc/en/cairo-hint-style.rd
103
+ - doc/en/cairo-hint-style.rdc
104
+ - doc/en/cairo-image-surface.rd
105
+ - doc/en/cairo-invalid-content-error.rd
70
106
  - 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
107
+ - doc/en/cairo-invalid-dash-error.rbl
108
+ - doc/en/cairo-invalid-dash-error.rd
109
+ - doc/en/cairo-invalid-dash-error.rdc
110
+ - doc/en/cairo-invalid-dsc-comment-error.rd
111
+ - doc/en/cairo-invalid-format-error.rd
112
+ - doc/en/cairo-invalid-index-error.rd
74
113
  - doc/en/cairo-invalid-matrix-error.html
75
- - doc/en/cairo-invalid-path-data-error.html
114
+ - doc/en/cairo-invalid-matrix-error.rbl
115
+ - doc/en/cairo-invalid-matrix-error.rd
116
+ - doc/en/cairo-invalid-matrix-error.rdc
117
+ - doc/en/cairo-invalid-path-data-error.rd
76
118
  - doc/en/cairo-invalid-pop-group-error.html
77
- - doc/en/cairo-invalid-restore-error.html
78
- - doc/en/cairo-invalid-status-error.html
119
+ - doc/en/cairo-invalid-pop-group-error.rbl
120
+ - doc/en/cairo-invalid-pop-group-error.rd
121
+ - doc/en/cairo-invalid-pop-group-error.rdc
122
+ - doc/en/cairo-invalid-restore-error.rd
123
+ - doc/en/cairo-invalid-status-error.rd
79
124
  - 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
125
+ - doc/en/cairo-invalid-stride-error.rbl
126
+ - doc/en/cairo-invalid-stride-error.rd
127
+ - doc/en/cairo-invalid-stride-error.rdc
128
+ - doc/en/cairo-invalid-string-error.rd
129
+ - doc/en/cairo-invalid-visual-error.rd
130
+ - doc/en/cairo-line-cap.rd
131
+ - doc/en/cairo-line-join.rd
132
+ - doc/en/cairo-linear-pattern.rd
133
+ - doc/en/cairo-matrix.rd
134
+ - doc/en/cairo-no-current-point-error.rd
87
135
  - doc/en/cairo-null-pointer-error.html
136
+ - doc/en/cairo-null-pointer-error.rbl
137
+ - doc/en/cairo-null-pointer-error.rd
138
+ - doc/en/cairo-null-pointer-error.rdc
88
139
  - doc/en/cairo-operator.html
140
+ - doc/en/cairo-operator.rbl
141
+ - doc/en/cairo-operator.rd
142
+ - doc/en/cairo-operator.rdc
89
143
  - doc/en/cairo-paper-parse-error.html
90
- - doc/en/cairo-paper-unknown-paper-name.html
91
- - doc/en/cairo-paper-unknown-unit.html
144
+ - doc/en/cairo-paper-parse-error.rbl
145
+ - doc/en/cairo-paper-parse-error.rd
146
+ - doc/en/cairo-paper-parse-error.rdc
147
+ - doc/en/cairo-paper-unknown-paper-name.rd
148
+ - doc/en/cairo-paper-unknown-unit.rd
92
149
  - doc/en/cairo-paper-unrecognized-paper-description.html
150
+ - doc/en/cairo-paper-unrecognized-paper-description.rbl
151
+ - doc/en/cairo-paper-unrecognized-paper-description.rd
152
+ - doc/en/cairo-paper-unrecognized-paper-description.rdc
93
153
  - doc/en/cairo-paper.html
94
- - doc/en/cairo-path-close-path.html
154
+ - doc/en/cairo-paper.rbl
155
+ - doc/en/cairo-paper.rd
156
+ - doc/en/cairo-paper.rdc
157
+ - doc/en/cairo-path-close-path.rd
95
158
  - doc/en/cairo-path-curve-to.html
159
+ - doc/en/cairo-path-curve-to.rbl
160
+ - doc/en/cairo-path-curve-to.rd
161
+ - doc/en/cairo-path-curve-to.rdc
96
162
  - doc/en/cairo-path-data-type.html
163
+ - doc/en/cairo-path-data-type.rbl
164
+ - doc/en/cairo-path-data-type.rd
165
+ - doc/en/cairo-path-data-type.rdc
97
166
  - doc/en/cairo-path-data.html
167
+ - doc/en/cairo-path-data.rbl
168
+ - doc/en/cairo-path-data.rd
169
+ - doc/en/cairo-path-data.rdc
98
170
  - doc/en/cairo-path-line-to.html
171
+ - doc/en/cairo-path-line-to.rbl
172
+ - doc/en/cairo-path-line-to.rd
173
+ - doc/en/cairo-path-line-to.rdc
99
174
  - doc/en/cairo-path-move-to.html
175
+ - doc/en/cairo-path-move-to.rbl
176
+ - doc/en/cairo-path-move-to.rd
177
+ - doc/en/cairo-path-move-to.rdc
100
178
  - doc/en/cairo-path.html
101
- - doc/en/cairo-pattern-type-mismatch-error.html
179
+ - doc/en/cairo-path.rbl
180
+ - doc/en/cairo-path.rd
181
+ - doc/en/cairo-path.rdc
182
+ - doc/en/cairo-pattern-type-mismatch-error.rd
102
183
  - doc/en/cairo-pattern.html
184
+ - doc/en/cairo-pattern.rbl
185
+ - doc/en/cairo-pattern.rd
186
+ - doc/en/cairo-pattern.rdc
103
187
  - doc/en/cairo-pdf-surface.html
188
+ - doc/en/cairo-pdf-surface.rbl
189
+ - doc/en/cairo-pdf-surface.rd
190
+ - doc/en/cairo-pdf-surface.rdc
104
191
  - doc/en/cairo-point.html
105
- - doc/en/cairo-ps-level.html
192
+ - doc/en/cairo-point.rbl
193
+ - doc/en/cairo-point.rd
194
+ - doc/en/cairo-point.rdc
195
+ - doc/en/cairo-ps-level.rd
106
196
  - doc/en/cairo-ps-surface.html
107
- - doc/en/cairo-quartz-image-surface.html
197
+ - doc/en/cairo-ps-surface.rbl
198
+ - doc/en/cairo-ps-surface.rd
199
+ - doc/en/cairo-ps-surface.rdc
200
+ - doc/en/cairo-quartz-image-surface.rd
108
201
  - doc/en/cairo-quartz-surface.html
109
- - doc/en/cairo-radial-pattern.html
110
- - doc/en/cairo-read-error.html
202
+ - doc/en/cairo-quartz-surface.rbl
203
+ - doc/en/cairo-quartz-surface.rd
204
+ - doc/en/cairo-quartz-surface.rdc
205
+ - doc/en/cairo-radial-pattern.rd
206
+ - doc/en/cairo-read-error.rd
111
207
  - doc/en/cairo-rectangle.html
112
- - doc/en/cairo-scaled-font.html
113
- - doc/en/cairo-solid-pattern.html
208
+ - doc/en/cairo-rectangle.rbl
209
+ - doc/en/cairo-rectangle.rd
210
+ - doc/en/cairo-rectangle.rdc
211
+ - doc/en/cairo-scaled-font.rd
212
+ - doc/en/cairo-solid-pattern.rd
114
213
  - doc/en/cairo-subpixel-order.html
214
+ - doc/en/cairo-subpixel-order.rbl
215
+ - doc/en/cairo-subpixel-order.rd
216
+ - doc/en/cairo-subpixel-order.rdc
115
217
  - doc/en/cairo-surface-finished-error.html
218
+ - doc/en/cairo-surface-finished-error.rbl
219
+ - doc/en/cairo-surface-finished-error.rd
220
+ - doc/en/cairo-surface-finished-error.rdc
116
221
  - doc/en/cairo-surface-pattern.html
117
- - doc/en/cairo-surface-type-mismatch-error.html
222
+ - doc/en/cairo-surface-pattern.rbl
223
+ - doc/en/cairo-surface-pattern.rd
224
+ - doc/en/cairo-surface-pattern.rdc
225
+ - doc/en/cairo-surface-type-mismatch-error.rd
118
226
  - doc/en/cairo-surface.html
119
- - doc/en/cairo-svg-surface.html
227
+ - doc/en/cairo-surface.rbl
228
+ - doc/en/cairo-surface.rd
229
+ - doc/en/cairo-surface.rdc
230
+ - doc/en/cairo-svg-surface.rd
120
231
  - doc/en/cairo-svg-version.html
121
- - doc/en/cairo-temp-file-error.html
122
- - doc/en/cairo-text-extents.html
123
- - doc/en/cairo-win32-printing-surface.html
124
- - doc/en/cairo-win32-surface.html
125
- - doc/en/cairo-write-error.html
232
+ - doc/en/cairo-svg-version.rbl
233
+ - doc/en/cairo-svg-version.rd
234
+ - doc/en/cairo-svg-version.rdc
235
+ - doc/en/cairo-temp-file-error.rd
236
+ - doc/en/cairo-text-extents.rd
237
+ - doc/en/cairo-win32-printing-surface.rd
238
+ - doc/en/cairo-win32-surface.rd
239
+ - doc/en/cairo-write-error.rd
126
240
  - doc/en/cairo.html
241
+ - doc/en/cairo.rbl
242
+ - doc/en/cairo.rd
243
+ - doc/en/cairo.rdc
127
244
  - doc/en/index.html
245
+ - doc/en/index.rbl
246
+ - doc/en/index.rd
247
+ - doc/en/index.rdc
128
248
  - doc/index.html
129
249
  - doc/ja/cairo-antialias.html
130
250
  - doc/ja/cairo-clip-not-representable-error.html
@@ -246,6 +366,7 @@ files:
246
366
  - src/lib/cairo/papers.rb
247
367
  - src/lib/cairo/path.rb
248
368
  - src/lib/cairo/point.rb
369
+ - src/lib/cairo/table.rb
249
370
  - src/rb_cairo.c
250
371
  - src/rb_cairo.h
251
372
  - src/rb_cairo_constants.c
@@ -290,7 +411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
411
  requirements: []
291
412
 
292
413
  rubyforge_project: cairo
293
- rubygems_version: 1.0.1
414
+ rubygems_version: 1.1.1
294
415
  signing_key:
295
416
  specification_version: 2
296
417
  summary: Ruby bindings for cairo