cairo 1.6.1-x86-mswin32

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 (418) hide show
  1. data/AUTHORS +4 -0
  2. data/COPYING +59 -0
  3. data/ChangeLog +1320 -0
  4. data/GPL +340 -0
  5. data/NEWS +98 -0
  6. data/README +70 -0
  7. data/Rakefile +215 -0
  8. data/cairo/bin/libcairo-2.dll +0 -0
  9. data/cairo/bin/libpng13.dll +0 -0
  10. data/cairo/bin/zlib1.dll +0 -0
  11. data/cairo/include/cairo/cairo-deprecated.h +142 -0
  12. data/cairo/include/cairo/cairo-features.h +35 -0
  13. data/cairo/include/cairo/cairo-pdf.h +68 -0
  14. data/cairo/include/cairo/cairo-ps.h +114 -0
  15. data/cairo/include/cairo/cairo-svg.h +82 -0
  16. data/cairo/include/cairo/cairo-win32.h +104 -0
  17. data/cairo/include/cairo/cairo.h +1945 -0
  18. data/cairo/include/libpng13/png.h +3419 -0
  19. data/cairo/include/libpng13/pngconf.h +1437 -0
  20. data/cairo/lib/cairo.def +251 -0
  21. data/cairo/lib/cairo.lib +0 -0
  22. data/cairo/lib/libcairo.dll.a +0 -0
  23. data/cairo/lib/libpng.def +372 -0
  24. data/cairo/lib/libpng13.dll.a +0 -0
  25. data/cairo/lib/pkgconfig/cairo-pdf.pc +12 -0
  26. data/cairo/lib/pkgconfig/cairo-png.pc +12 -0
  27. data/cairo/lib/pkgconfig/cairo-ps.pc +12 -0
  28. data/cairo/lib/pkgconfig/cairo-svg.pc +12 -0
  29. data/cairo/lib/pkgconfig/cairo-win32-font.pc +12 -0
  30. data/cairo/lib/pkgconfig/cairo-win32.pc +12 -0
  31. data/cairo/lib/pkgconfig/cairo.pc +13 -0
  32. data/cairo/lib/pkgconfig/libpng.pc +14 -0
  33. data/cairo/lib/pkgconfig/libpng13.pc +14 -0
  34. data/cairo/make/cairo-1.6.4-1.sh +55 -0
  35. data/cairo/manifest/cairo-1.6.4-1.mft +6 -0
  36. data/cairo/manifest/cairo-dev-1.6.4-1.mft +72 -0
  37. data/cairo/manifest/libpng-dev-1.2.8.mft +7 -0
  38. data/cairo/share/doc/cairo-1.6.4-1/COPYING +32 -0
  39. data/cairo/share/doc/cairo-1.6.4-1/COPYING-LGPL-2.1 +510 -0
  40. data/cairo/share/doc/cairo-1.6.4-1/COPYING-MPL-1.1 +470 -0
  41. data/cairo/share/gtk-doc/html/cairo/Drawing.html +53 -0
  42. data/cairo/share/gtk-doc/html/cairo/Fonts.html +56 -0
  43. data/cairo/share/gtk-doc/html/cairo/Support.html +50 -0
  44. data/cairo/share/gtk-doc/html/cairo/Surfaces.html +65 -0
  45. data/cairo/share/gtk-doc/html/cairo/bindings-errors.html +128 -0
  46. data/cairo/share/gtk-doc/html/cairo/bindings-fonts.html +59 -0
  47. data/cairo/share/gtk-doc/html/cairo/bindings-memory.html +129 -0
  48. data/cairo/share/gtk-doc/html/cairo/bindings-overloading.html +127 -0
  49. data/cairo/share/gtk-doc/html/cairo/bindings-path.html +123 -0
  50. data/cairo/share/gtk-doc/html/cairo/bindings-patterns.html +63 -0
  51. data/cairo/share/gtk-doc/html/cairo/bindings-return-values.html +126 -0
  52. data/cairo/share/gtk-doc/html/cairo/bindings-streams.html +98 -0
  53. data/cairo/share/gtk-doc/html/cairo/bindings-surfaces.html +99 -0
  54. data/cairo/share/gtk-doc/html/cairo/cairo-Error-Handling.html +328 -0
  55. data/cairo/share/gtk-doc/html/cairo/cairo-Font-Options.html +720 -0
  56. data/cairo/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +297 -0
  57. data/cairo/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +484 -0
  58. data/cairo/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +246 -0
  59. data/cairo/share/gtk-doc/html/cairo/cairo-PNG-Support.html +345 -0
  60. data/cairo/share/gtk-doc/html/cairo/cairo-Paths.html +1336 -0
  61. data/cairo/share/gtk-doc/html/cairo/cairo-Patterns.html +1560 -0
  62. data/cairo/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +656 -0
  63. data/cairo/share/gtk-doc/html/cairo/cairo-Quartz-Fonts.html +161 -0
  64. data/cairo/share/gtk-doc/html/cairo/cairo-Quartz-Surfaces.html +232 -0
  65. data/cairo/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +337 -0
  66. data/cairo/share/gtk-doc/html/cairo/cairo-Scaled-Fonts.html +823 -0
  67. data/cairo/share/gtk-doc/html/cairo/cairo-Text.html +836 -0
  68. data/cairo/share/gtk-doc/html/cairo/cairo-Transformations.html +462 -0
  69. data/cairo/share/gtk-doc/html/cairo/cairo-Types.html +143 -0
  70. data/cairo/share/gtk-doc/html/cairo/cairo-Version-Information.html +325 -0
  71. data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +381 -0
  72. data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +331 -0
  73. data/cairo/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +525 -0
  74. data/cairo/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +427 -0
  75. data/cairo/share/gtk-doc/html/cairo/cairo-cairo-matrix-t.html +626 -0
  76. data/cairo/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +995 -0
  77. data/cairo/share/gtk-doc/html/cairo/cairo-cairo-t.html +2795 -0
  78. data/cairo/share/gtk-doc/html/cairo/cairo.devhelp +432 -0
  79. data/cairo/share/gtk-doc/html/cairo/cairo.devhelp2 +432 -0
  80. data/cairo/share/gtk-doc/html/cairo/home.png +0 -0
  81. data/cairo/share/gtk-doc/html/cairo/index-1.2.html +137 -0
  82. data/cairo/share/gtk-doc/html/cairo/index-1.4.html +105 -0
  83. data/cairo/share/gtk-doc/html/cairo/index-1.6.html +65 -0
  84. data/cairo/share/gtk-doc/html/cairo/index.html +134 -0
  85. data/cairo/share/gtk-doc/html/cairo/index.sgml +466 -0
  86. data/cairo/share/gtk-doc/html/cairo/ix01.html +693 -0
  87. data/cairo/share/gtk-doc/html/cairo/language-bindings.html +79 -0
  88. data/cairo/share/gtk-doc/html/cairo/left.png +0 -0
  89. data/cairo/share/gtk-doc/html/cairo/right.png +0 -0
  90. data/cairo/share/gtk-doc/html/cairo/style.css +148 -0
  91. data/cairo/share/gtk-doc/html/cairo/up.png +0 -0
  92. data/doc/doc.css +91 -0
  93. data/doc/en/cairo-antialias.html +41 -0
  94. data/doc/en/cairo-antialias.rd +16 -0
  95. data/doc/en/cairo-clip-not-representable-error.html +50 -0
  96. data/doc/en/cairo-clip-not-representable-error.rd +17 -0
  97. data/doc/en/cairo-color-base.html +72 -0
  98. data/doc/en/cairo-color-base.rd +38 -0
  99. data/doc/en/cairo-color-cmyk.html +160 -0
  100. data/doc/en/cairo-color-cmyk.rd +107 -0
  101. data/doc/en/cairo-color-hsv.html +140 -0
  102. data/doc/en/cairo-color-hsv.rd +91 -0
  103. data/doc/en/cairo-color-rgb.html +145 -0
  104. data/doc/en/cairo-color-rgb.rd +95 -0
  105. data/doc/en/cairo-color-x11.html +176 -0
  106. data/doc/en/cairo-color-x11.rd +151 -0
  107. data/doc/en/cairo-color.html +241 -0
  108. data/doc/en/cairo-color.rd +213 -0
  109. data/doc/en/cairo-content.html +40 -0
  110. data/doc/en/cairo-content.rd +15 -0
  111. data/doc/en/cairo-context-blur.html +42 -0
  112. data/doc/en/cairo-context-blur.rd +15 -0
  113. data/doc/en/cairo-context-circle.html +42 -0
  114. data/doc/en/cairo-context-circle.rd +15 -0
  115. data/doc/en/cairo-context-color.html +42 -0
  116. data/doc/en/cairo-context-color.rd +15 -0
  117. data/doc/en/cairo-context-path.html +47 -0
  118. data/doc/en/cairo-context-path.rd +19 -0
  119. data/doc/en/cairo-context-rectangle.html +42 -0
  120. data/doc/en/cairo-context-rectangle.rd +15 -0
  121. data/doc/en/cairo-context-triangle.html +42 -0
  122. data/doc/en/cairo-context-triangle.rd +15 -0
  123. data/doc/en/cairo-context.html +636 -0
  124. data/doc/en/cairo-context.rd +491 -0
  125. data/doc/en/cairo-error.html +47 -0
  126. data/doc/en/cairo-error.rd +16 -0
  127. data/doc/en/cairo-extend.html +41 -0
  128. data/doc/en/cairo-extend.rd +16 -0
  129. data/doc/en/cairo-file-not-found.html +50 -0
  130. data/doc/en/cairo-file-not-found.rd +17 -0
  131. data/doc/en/cairo-fill-rule.html +39 -0
  132. data/doc/en/cairo-fill-rule.rd +14 -0
  133. data/doc/en/cairo-filter.html +43 -0
  134. data/doc/en/cairo-filter.rd +18 -0
  135. data/doc/en/cairo-font-extents.html +74 -0
  136. data/doc/en/cairo-font-extents.rd +40 -0
  137. data/doc/en/cairo-font-face.html +41 -0
  138. data/doc/en/cairo-font-face.rd +14 -0
  139. data/doc/en/cairo-font-options.html +142 -0
  140. data/doc/en/cairo-font-options.rd +94 -0
  141. data/doc/en/cairo-font-slant.html +40 -0
  142. data/doc/en/cairo-font-slant.rd +15 -0
  143. data/doc/en/cairo-font-weight.html +39 -0
  144. data/doc/en/cairo-font-weight.rd +14 -0
  145. data/doc/en/cairo-format.html +49 -0
  146. data/doc/en/cairo-format.rd +22 -0
  147. data/doc/en/cairo-glyph.html +102 -0
  148. data/doc/en/cairo-glyph.rd +62 -0
  149. data/doc/en/cairo-gradient-pattern.html +77 -0
  150. data/doc/en/cairo-gradient-pattern.rd +41 -0
  151. data/doc/en/cairo-hint-metrics.html +40 -0
  152. data/doc/en/cairo-hint-metrics.rd +15 -0
  153. data/doc/en/cairo-hint-style.html +42 -0
  154. data/doc/en/cairo-hint-style.rd +17 -0
  155. data/doc/en/cairo-image-surface.html +85 -0
  156. data/doc/en/cairo-image-surface.rd +47 -0
  157. data/doc/en/cairo-invalid-content-error.html +50 -0
  158. data/doc/en/cairo-invalid-content-error.rd +17 -0
  159. data/doc/en/cairo-invalid-dash-error.html +50 -0
  160. data/doc/en/cairo-invalid-dash-error.rd +17 -0
  161. data/doc/en/cairo-invalid-dsc-comment-error.html +50 -0
  162. data/doc/en/cairo-invalid-dsc-comment-error.rd +17 -0
  163. data/doc/en/cairo-invalid-format-error.html +50 -0
  164. data/doc/en/cairo-invalid-format-error.rd +17 -0
  165. data/doc/en/cairo-invalid-index-error.html +50 -0
  166. data/doc/en/cairo-invalid-index-error.rd +17 -0
  167. data/doc/en/cairo-invalid-matrix-error.html +50 -0
  168. data/doc/en/cairo-invalid-matrix-error.rd +17 -0
  169. data/doc/en/cairo-invalid-path-data-error.html +50 -0
  170. data/doc/en/cairo-invalid-path-data-error.rd +17 -0
  171. data/doc/en/cairo-invalid-pop-group-error.html +50 -0
  172. data/doc/en/cairo-invalid-pop-group-error.rd +17 -0
  173. data/doc/en/cairo-invalid-restore-error.html +50 -0
  174. data/doc/en/cairo-invalid-restore-error.rd +17 -0
  175. data/doc/en/cairo-invalid-status-error.html +50 -0
  176. data/doc/en/cairo-invalid-status-error.rd +17 -0
  177. data/doc/en/cairo-invalid-stride-error.html +50 -0
  178. data/doc/en/cairo-invalid-stride-error.rd +17 -0
  179. data/doc/en/cairo-invalid-string-error.html +50 -0
  180. data/doc/en/cairo-invalid-string-error.rd +17 -0
  181. data/doc/en/cairo-invalid-visual-error.html +50 -0
  182. data/doc/en/cairo-invalid-visual-error.rd +17 -0
  183. data/doc/en/cairo-line-cap.html +40 -0
  184. data/doc/en/cairo-line-cap.rd +15 -0
  185. data/doc/en/cairo-line-join.html +40 -0
  186. data/doc/en/cairo-line-join.rd +15 -0
  187. data/doc/en/cairo-linear-pattern.html +63 -0
  188. data/doc/en/cairo-linear-pattern.rd +28 -0
  189. data/doc/en/cairo-matrix.html +257 -0
  190. data/doc/en/cairo-matrix.rd +186 -0
  191. data/doc/en/cairo-no-current-point-error.html +50 -0
  192. data/doc/en/cairo-no-current-point-error.rd +17 -0
  193. data/doc/en/cairo-null-pointer-error.html +50 -0
  194. data/doc/en/cairo-null-pointer-error.rd +17 -0
  195. data/doc/en/cairo-operator.html +51 -0
  196. data/doc/en/cairo-operator.rd +26 -0
  197. data/doc/en/cairo-paper-parse-error.html +50 -0
  198. data/doc/en/cairo-paper-parse-error.rd +17 -0
  199. data/doc/en/cairo-paper-unknown-paper-name.html +69 -0
  200. data/doc/en/cairo-paper-unknown-paper-name.rd +30 -0
  201. data/doc/en/cairo-paper-unknown-unit.html +69 -0
  202. data/doc/en/cairo-paper-unknown-unit.rd +30 -0
  203. data/doc/en/cairo-paper-unrecognized-paper-description.html +69 -0
  204. data/doc/en/cairo-paper-unrecognized-paper-description.rd +30 -0
  205. data/doc/en/cairo-paper.html +187 -0
  206. data/doc/en/cairo-paper.rd +141 -0
  207. data/doc/en/cairo-path-close-path.html +52 -0
  208. data/doc/en/cairo-path-close-path.rd +21 -0
  209. data/doc/en/cairo-path-curve-to.html +52 -0
  210. data/doc/en/cairo-path-curve-to.rd +21 -0
  211. data/doc/en/cairo-path-data-type.html +41 -0
  212. data/doc/en/cairo-path-data-type.rd +16 -0
  213. data/doc/en/cairo-path-data.html +101 -0
  214. data/doc/en/cairo-path-data.rd +62 -0
  215. data/doc/en/cairo-path-line-to.html +52 -0
  216. data/doc/en/cairo-path-line-to.rd +21 -0
  217. data/doc/en/cairo-path-move-to.html +52 -0
  218. data/doc/en/cairo-path-move-to.rd +21 -0
  219. data/doc/en/cairo-path.html +158 -0
  220. data/doc/en/cairo-path.rd +109 -0
  221. data/doc/en/cairo-pattern-type-mismatch-error.html +50 -0
  222. data/doc/en/cairo-pattern-type-mismatch-error.rd +17 -0
  223. data/doc/en/cairo-pattern.html +102 -0
  224. data/doc/en/cairo-pattern.rd +62 -0
  225. data/doc/en/cairo-pdf-surface.html +60 -0
  226. data/doc/en/cairo-pdf-surface.rd +27 -0
  227. data/doc/en/cairo-point.html +77 -0
  228. data/doc/en/cairo-point.rd +42 -0
  229. data/doc/en/cairo-ps-level.html +52 -0
  230. data/doc/en/cairo-ps-level.rd +24 -0
  231. data/doc/en/cairo-ps-surface.html +95 -0
  232. data/doc/en/cairo-ps-surface.rd +55 -0
  233. data/doc/en/cairo-quartz-image-surface.html +60 -0
  234. data/doc/en/cairo-quartz-image-surface.rd +27 -0
  235. data/doc/en/cairo-quartz-surface.html +60 -0
  236. data/doc/en/cairo-quartz-surface.rd +27 -0
  237. data/doc/en/cairo-radial-pattern.html +63 -0
  238. data/doc/en/cairo-radial-pattern.rd +28 -0
  239. data/doc/en/cairo-read-error.html +50 -0
  240. data/doc/en/cairo-read-error.rd +17 -0
  241. data/doc/en/cairo-rectangle.html +92 -0
  242. data/doc/en/cairo-rectangle.rd +54 -0
  243. data/doc/en/cairo-scaled-font.html +87 -0
  244. data/doc/en/cairo-scaled-font.rd +50 -0
  245. data/doc/en/cairo-solid-pattern.html +65 -0
  246. data/doc/en/cairo-solid-pattern.rd +31 -0
  247. data/doc/en/cairo-subpixel-order.html +42 -0
  248. data/doc/en/cairo-subpixel-order.rd +17 -0
  249. data/doc/en/cairo-surface-finished-error.html +50 -0
  250. data/doc/en/cairo-surface-finished-error.rd +17 -0
  251. data/doc/en/cairo-surface-pattern.html +60 -0
  252. data/doc/en/cairo-surface-pattern.rd +27 -0
  253. data/doc/en/cairo-surface-type-mismatch-error.html +50 -0
  254. data/doc/en/cairo-surface-type-mismatch-error.rd +17 -0
  255. data/doc/en/cairo-surface.html +114 -0
  256. data/doc/en/cairo-surface.rd +72 -0
  257. data/doc/en/cairo-svg-surface.html +80 -0
  258. data/doc/en/cairo-svg-surface.rd +44 -0
  259. data/doc/en/cairo-svg-version.html +52 -0
  260. data/doc/en/cairo-svg-version.rd +24 -0
  261. data/doc/en/cairo-temp-file-error.html +50 -0
  262. data/doc/en/cairo-temp-file-error.rd +17 -0
  263. data/doc/en/cairo-text-extents.html +79 -0
  264. data/doc/en/cairo-text-extents.rd +44 -0
  265. data/doc/en/cairo-win32-printing-surface.html +60 -0
  266. data/doc/en/cairo-win32-printing-surface.rd +27 -0
  267. data/doc/en/cairo-win32-surface.html +65 -0
  268. data/doc/en/cairo-win32-surface.rd +31 -0
  269. data/doc/en/cairo-write-error.html +50 -0
  270. data/doc/en/cairo-write-error.rd +17 -0
  271. data/doc/en/cairo.html +123 -0
  272. data/doc/en/cairo.rd +95 -0
  273. data/doc/en/index.html +1080 -0
  274. data/doc/en/index.rd +1051 -0
  275. data/doc/index.html +18 -0
  276. data/doc/ja/cairo-antialias.html +57 -0
  277. data/doc/ja/cairo-clip-not-representable-error.html +56 -0
  278. data/doc/ja/cairo-color-base.html +75 -0
  279. data/doc/ja/cairo-color-cmyk.html +152 -0
  280. data/doc/ja/cairo-color-hsv.html +135 -0
  281. data/doc/ja/cairo-color-rgb.html +145 -0
  282. data/doc/ja/cairo-color-x11.html +183 -0
  283. data/doc/ja/cairo-color.html +317 -0
  284. data/doc/ja/cairo-content.html +51 -0
  285. data/doc/ja/cairo-context-blur.html +53 -0
  286. data/doc/ja/cairo-context-circle.html +54 -0
  287. data/doc/ja/cairo-context-color.html +52 -0
  288. data/doc/ja/cairo-context-path.html +77 -0
  289. data/doc/ja/cairo-context-rectangle.html +60 -0
  290. data/doc/ja/cairo-context-triangle.html +47 -0
  291. data/doc/ja/cairo-context.html +1449 -0
  292. data/doc/ja/cairo-error.html +56 -0
  293. data/doc/ja/cairo-extend.html +56 -0
  294. data/doc/ja/cairo-file-not-found.html +51 -0
  295. data/doc/ja/cairo-fill-rule.html +58 -0
  296. data/doc/ja/cairo-filter.html +43 -0
  297. data/doc/ja/cairo-font-extents.html +110 -0
  298. data/doc/ja/cairo-font-face.html +55 -0
  299. data/doc/ja/cairo-font-options.html +186 -0
  300. data/doc/ja/cairo-font-slant.html +50 -0
  301. data/doc/ja/cairo-font-weight.html +47 -0
  302. data/doc/ja/cairo-format.html +81 -0
  303. data/doc/ja/cairo-glyph.html +115 -0
  304. data/doc/ja/cairo-gradient-pattern.html +119 -0
  305. data/doc/ja/cairo-hint-metrics.html +57 -0
  306. data/doc/ja/cairo-hint-style.html +64 -0
  307. data/doc/ja/cairo-image-surface.html +131 -0
  308. data/doc/ja/cairo-invalid-content-error.html +54 -0
  309. data/doc/ja/cairo-invalid-dash-error.html +54 -0
  310. data/doc/ja/cairo-invalid-dsc-comment-error.html +54 -0
  311. data/doc/ja/cairo-invalid-format-error.html +54 -0
  312. data/doc/ja/cairo-invalid-index-error.html +54 -0
  313. data/doc/ja/cairo-invalid-matrix-error.html +54 -0
  314. data/doc/ja/cairo-invalid-path-data-error.html +54 -0
  315. data/doc/ja/cairo-invalid-pop-group-error.html +54 -0
  316. data/doc/ja/cairo-invalid-restore-error.html +55 -0
  317. data/doc/ja/cairo-invalid-status-error.html +55 -0
  318. data/doc/ja/cairo-invalid-stride-error.html +55 -0
  319. data/doc/ja/cairo-invalid-string-error.html +54 -0
  320. data/doc/ja/cairo-invalid-visual-error.html +57 -0
  321. data/doc/ja/cairo-line-cap.html +50 -0
  322. data/doc/ja/cairo-line-join.html +53 -0
  323. data/doc/ja/cairo-linear-pattern.html +87 -0
  324. data/doc/ja/cairo-matrix.html +343 -0
  325. data/doc/ja/cairo-no-current-point-error.html +54 -0
  326. data/doc/ja/cairo-null-pointer-error.html +54 -0
  327. data/doc/ja/cairo-operator.html +51 -0
  328. data/doc/ja/cairo-paper-parse-error.html +55 -0
  329. data/doc/ja/cairo-paper-unknown-paper-name.html +76 -0
  330. data/doc/ja/cairo-paper-unknown-unit.html +75 -0
  331. data/doc/ja/cairo-paper-unrecognized-paper-description.html +76 -0
  332. data/doc/ja/cairo-paper.html +357 -0
  333. data/doc/ja/cairo-path-close-path.html +57 -0
  334. data/doc/ja/cairo-path-curve-to.html +70 -0
  335. data/doc/ja/cairo-path-data-type.html +53 -0
  336. data/doc/ja/cairo-path-data.html +127 -0
  337. data/doc/ja/cairo-path-line-to.html +62 -0
  338. data/doc/ja/cairo-path-move-to.html +62 -0
  339. data/doc/ja/cairo-path.html +144 -0
  340. data/doc/ja/cairo-pattern-type-mismatch-error.html +56 -0
  341. data/doc/ja/cairo-pattern.html +128 -0
  342. data/doc/ja/cairo-pdf-surface.html +86 -0
  343. data/doc/ja/cairo-point.html +90 -0
  344. data/doc/ja/cairo-ps-level.html +62 -0
  345. data/doc/ja/cairo-ps-surface.html +214 -0
  346. data/doc/ja/cairo-quartz-image-surface.html +75 -0
  347. data/doc/ja/cairo-quartz-surface.html +93 -0
  348. data/doc/ja/cairo-radial-pattern.html +93 -0
  349. data/doc/ja/cairo-read-error.html +55 -0
  350. data/doc/ja/cairo-rectangle.html +109 -0
  351. data/doc/ja/cairo-scaled-font.html +144 -0
  352. data/doc/ja/cairo-solid-pattern.html +87 -0
  353. data/doc/ja/cairo-subpixel-order.html +57 -0
  354. data/doc/ja/cairo-surface-finished-error.html +54 -0
  355. data/doc/ja/cairo-surface-pattern.html +68 -0
  356. data/doc/ja/cairo-surface-type-mismatch-error.html +56 -0
  357. data/doc/ja/cairo-surface.html +191 -0
  358. data/doc/ja/cairo-svg-surface.html +114 -0
  359. data/doc/ja/cairo-svg-version.html +66 -0
  360. data/doc/ja/cairo-temp-file-error.html +50 -0
  361. data/doc/ja/cairo-text-extents.html +101 -0
  362. data/doc/ja/cairo-win32-printing-surface.html +80 -0
  363. data/doc/ja/cairo-win32-surface.html +100 -0
  364. data/doc/ja/cairo-write-error.html +55 -0
  365. data/doc/ja/cairo.html +148 -0
  366. data/doc/ja/index.html +1080 -0
  367. data/extconf.rb +153 -0
  368. data/misc/update-colors.rb +143 -0
  369. data/pkg-config.rb +278 -0
  370. data/samples/agg/README +4 -0
  371. data/samples/agg/aa_demo.rb +47 -0
  372. data/samples/agg/aa_test.rb +304 -0
  373. data/samples/blur.rb +47 -0
  374. data/samples/pac.rb +99 -0
  375. data/samples/pac2.rb +171 -0
  376. data/samples/png.rb +45 -0
  377. data/samples/scalable.rb +56 -0
  378. data/samples/text-on-path.rb +60 -0
  379. data/samples/text2.rb +131 -0
  380. data/src/cairo.def +96 -0
  381. data/src/cairo.so +0 -0
  382. data/src/lib/cairo.rb +141 -0
  383. data/src/lib/cairo/color.rb +255 -0
  384. data/src/lib/cairo/colors.rb +656 -0
  385. data/src/lib/cairo/constants.rb +21 -0
  386. data/src/lib/cairo/context.rb +29 -0
  387. data/src/lib/cairo/context/blur.rb +45 -0
  388. data/src/lib/cairo/context/circle.rb +9 -0
  389. data/src/lib/cairo/context/color.rb +11 -0
  390. data/src/lib/cairo/context/path.rb +116 -0
  391. data/src/lib/cairo/context/rectangle.rb +33 -0
  392. data/src/lib/cairo/context/triangle.rb +12 -0
  393. data/src/lib/cairo/paper.rb +183 -0
  394. data/src/lib/cairo/papers.rb +41 -0
  395. data/src/lib/cairo/path.rb +15 -0
  396. data/src/lib/cairo/point.rb +7 -0
  397. data/src/libruby-cairo.a +0 -0
  398. data/src/rb_cairo.c +82 -0
  399. data/src/rb_cairo.h +264 -0
  400. data/src/rb_cairo_constants.c +456 -0
  401. data/src/rb_cairo_context.c +1548 -0
  402. data/src/rb_cairo_exception.c +214 -0
  403. data/src/rb_cairo_font_extents.c +125 -0
  404. data/src/rb_cairo_font_face.c +56 -0
  405. data/src/rb_cairo_font_options.c +197 -0
  406. data/src/rb_cairo_glyph.c +159 -0
  407. data/src/rb_cairo_matrix.c +350 -0
  408. data/src/rb_cairo_path.c +459 -0
  409. data/src/rb_cairo_pattern.c +540 -0
  410. data/src/rb_cairo_private.c +78 -0
  411. data/src/rb_cairo_private.h +72 -0
  412. data/src/rb_cairo_scaled_font.c +177 -0
  413. data/src/rb_cairo_surface.c +1252 -0
  414. data/src/rb_cairo_text_extents.c +138 -0
  415. data/test/run-test.rb +15 -0
  416. data/test/test_paper.rb +81 -0
  417. data/test/test_pkg_config.rb +122 -0
  418. metadata +490 -0
@@ -0,0 +1,114 @@
1
+ /* cairo - a vector graphics library with display and print output
2
+ *
3
+ * Copyright © 2002 University of Southern California
4
+ *
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it either under the terms of the GNU Lesser General Public
7
+ * License version 2.1 as published by the Free Software Foundation
8
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
9
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
10
+ * notice, a recipient may use your version of this file under either
11
+ * the MPL or the LGPL.
12
+ *
13
+ * You should have received a copy of the LGPL along with this library
14
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
15
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ * You should have received a copy of the MPL along with this library
17
+ * in the file COPYING-MPL-1.1
18
+ *
19
+ * The contents of this file are subject to the Mozilla Public License
20
+ * Version 1.1 (the "License"); you may not use this file except in
21
+ * compliance with the License. You may obtain a copy of the License at
22
+ * http://www.mozilla.org/MPL/
23
+ *
24
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
25
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
26
+ * the specific language governing rights and limitations.
27
+ *
28
+ * The Original Code is the cairo graphics library.
29
+ *
30
+ * The Initial Developer of the Original Code is University of Southern
31
+ * California.
32
+ *
33
+ * Contributor(s):
34
+ * Carl D. Worth <cworth@cworth.org>
35
+ */
36
+
37
+ #ifndef CAIRO_PS_H
38
+ #define CAIRO_PS_H
39
+
40
+ #include <cairo.h>
41
+
42
+ #if CAIRO_HAS_PS_SURFACE
43
+
44
+ #include <stdio.h>
45
+
46
+ CAIRO_BEGIN_DECLS
47
+
48
+ /* PS-surface functions */
49
+
50
+ /**
51
+ * cairo_ps_level_t:
52
+ * @CAIRO_PS_LEVEL_2: The language level 2 of the PostScript specification.
53
+ * @CAIRO_PS_LEVEL_3: The language level 3 of the PostScript specification.
54
+ *
55
+ * #cairo_ps_level_t is used to describe the language level of the
56
+ * PostScript Language Reference that a generated PostScript file will
57
+ * conform to.
58
+ */
59
+ typedef enum _cairo_ps_level {
60
+ CAIRO_PS_LEVEL_2,
61
+ CAIRO_PS_LEVEL_3
62
+ } cairo_ps_level_t;
63
+
64
+ cairo_public cairo_surface_t *
65
+ cairo_ps_surface_create (const char *filename,
66
+ double width_in_points,
67
+ double height_in_points);
68
+
69
+ cairo_public cairo_surface_t *
70
+ cairo_ps_surface_create_for_stream (cairo_write_func_t write_func,
71
+ void *closure,
72
+ double width_in_points,
73
+ double height_in_points);
74
+
75
+ cairo_public void
76
+ cairo_ps_surface_restrict_to_level (cairo_surface_t *surface,
77
+ cairo_ps_level_t level);
78
+
79
+ cairo_public void
80
+ cairo_ps_get_levels (cairo_ps_level_t const **levels,
81
+ int *num_levels);
82
+
83
+ cairo_public const char *
84
+ cairo_ps_level_to_string (cairo_ps_level_t level);
85
+
86
+ cairo_public void
87
+ cairo_ps_surface_set_eps (cairo_surface_t *surface,
88
+ cairo_bool_t eps);
89
+
90
+ cairo_public cairo_bool_t
91
+ cairo_ps_surface_get_eps (cairo_surface_t *surface);
92
+
93
+ cairo_public void
94
+ cairo_ps_surface_set_size (cairo_surface_t *surface,
95
+ double width_in_points,
96
+ double height_in_points);
97
+
98
+ cairo_public void
99
+ cairo_ps_surface_dsc_comment (cairo_surface_t *surface,
100
+ const char *comment);
101
+
102
+ cairo_public void
103
+ cairo_ps_surface_dsc_begin_setup (cairo_surface_t *surface);
104
+
105
+ cairo_public void
106
+ cairo_ps_surface_dsc_begin_page_setup (cairo_surface_t *surface);
107
+
108
+ CAIRO_END_DECLS
109
+
110
+ #else /* CAIRO_HAS_PS_SURFACE */
111
+ # error Cairo was not compiled with support for the ps backend
112
+ #endif /* CAIRO_HAS_PS_SURFACE */
113
+
114
+ #endif /* CAIRO_PS_H */
@@ -0,0 +1,82 @@
1
+ /* cairo - a vector graphics library with display and print output
2
+ *
3
+ * cairo-svg.h
4
+ *
5
+ * Copyright © 2005 Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>
6
+ *
7
+ * This library is free software; you can redistribute it and/or
8
+ * modify it either under the terms of the GNU Lesser General Public
9
+ * License version 2.1 as published by the Free Software Foundation
10
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
11
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
12
+ * notice, a recipient may use your version of this file under either
13
+ * the MPL or the LGPL.
14
+ *
15
+ * You should have received a copy of the LGPL along with this library
16
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
17
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
+ * You should have received a copy of the MPL along with this library
19
+ * in the file COPYING-MPL-1.1
20
+ *
21
+ * The contents of this file are subject to the Mozilla Public License
22
+ * Version 1.1 (the "License"); you may not use this file except in
23
+ * compliance with the License. You may obtain a copy of the License at
24
+ * http://www.mozilla.org/MPL/
25
+ *
26
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
27
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
28
+ * the specific language governing rights and limitations.
29
+ *
30
+ */
31
+
32
+ #ifndef CAIRO_SVG_H
33
+ #define CAIRO_SVG_H
34
+
35
+ #include <cairo.h>
36
+
37
+ #if CAIRO_HAS_SVG_SURFACE
38
+
39
+ CAIRO_BEGIN_DECLS
40
+
41
+ /**
42
+ * cairo_svg_version_t:
43
+ * @CAIRO_SVG_VERSION_1_1: The version 1.1 of the SVG specification.
44
+ * @CAIRO_SVG_VERSION_1_2: The version 1.2 of the SVG specification.
45
+ *
46
+ * #cairo_svg_version_t is used to describe the version number of the SVG
47
+ * specification that a generated SVG file will conform to.
48
+ */
49
+ typedef enum _cairo_svg_version {
50
+ CAIRO_SVG_VERSION_1_1,
51
+ CAIRO_SVG_VERSION_1_2
52
+ } cairo_svg_version_t;
53
+
54
+ cairo_public cairo_surface_t *
55
+ cairo_svg_surface_create (const char *filename,
56
+ double width_in_points,
57
+ double height_in_points);
58
+
59
+ cairo_public cairo_surface_t *
60
+ cairo_svg_surface_create_for_stream (cairo_write_func_t write_func,
61
+ void *closure,
62
+ double width_in_points,
63
+ double height_in_points);
64
+
65
+ cairo_public void
66
+ cairo_svg_surface_restrict_to_version (cairo_surface_t *surface,
67
+ cairo_svg_version_t version);
68
+
69
+ cairo_public void
70
+ cairo_svg_get_versions (cairo_svg_version_t const **versions,
71
+ int *num_versions);
72
+
73
+ cairo_public const char *
74
+ cairo_svg_version_to_string (cairo_svg_version_t version);
75
+
76
+ CAIRO_END_DECLS
77
+
78
+ #else /* CAIRO_HAS_SVG_SURFACE */
79
+ # error Cairo was not compiled with support for the svg backend
80
+ #endif /* CAIRO_HAS_SVG_SURFACE */
81
+
82
+ #endif /* CAIRO_SVG_H */
@@ -0,0 +1,104 @@
1
+ /* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
2
+ /* cairo - a vector graphics library with display and print output
3
+ *
4
+ * Copyright © 2005 Red Hat, Inc
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it either under the terms of the GNU Lesser General Public
8
+ * License version 2.1 as published by the Free Software Foundation
9
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
10
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
11
+ * notice, a recipient may use your version of this file under either
12
+ * the MPL or the LGPL.
13
+ *
14
+ * You should have received a copy of the LGPL along with this library
15
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
16
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
+ * You should have received a copy of the MPL along with this library
18
+ * in the file COPYING-MPL-1.1
19
+ *
20
+ * The contents of this file are subject to the Mozilla Public License
21
+ * Version 1.1 (the "License"); you may not use this file except in
22
+ * compliance with the License. You may obtain a copy of the License at
23
+ * http://www.mozilla.org/MPL/
24
+ *
25
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
26
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
27
+ * the specific language governing rights and limitations.
28
+ *
29
+ * The Original Code is the cairo graphics library.
30
+ *
31
+ * The Initial Developer of the Original Code is Red Hat, Inc.
32
+ *
33
+ * Contributor(s):
34
+ * Owen Taylor <otaylor@redhat.com>
35
+ */
36
+
37
+ #ifndef _CAIRO_WIN32_H_
38
+ #define _CAIRO_WIN32_H_
39
+
40
+ #include <cairo.h>
41
+
42
+ #if CAIRO_HAS_WIN32_SURFACE
43
+
44
+ #include <windows.h>
45
+
46
+ CAIRO_BEGIN_DECLS
47
+
48
+ cairo_public cairo_surface_t *
49
+ cairo_win32_surface_create (HDC hdc);
50
+
51
+ cairo_public cairo_surface_t *
52
+ cairo_win32_printing_surface_create (HDC hdc);
53
+
54
+ cairo_public cairo_surface_t *
55
+ cairo_win32_surface_create_with_ddb (HDC hdc,
56
+ cairo_format_t format,
57
+ int width,
58
+ int height);
59
+
60
+ cairo_public cairo_surface_t *
61
+ cairo_win32_surface_create_with_dib (cairo_format_t format,
62
+ int width,
63
+ int height);
64
+
65
+ cairo_public HDC
66
+ cairo_win32_surface_get_dc (cairo_surface_t *surface);
67
+
68
+ cairo_public cairo_surface_t *
69
+ cairo_win32_surface_get_image (cairo_surface_t *surface);
70
+
71
+ cairo_public cairo_font_face_t *
72
+ cairo_win32_font_face_create_for_logfontw (LOGFONTW *logfont);
73
+
74
+ cairo_public cairo_font_face_t *
75
+ cairo_win32_font_face_create_for_hfont (HFONT font);
76
+
77
+ cairo_public cairo_font_face_t *
78
+ cairo_win32_font_face_create_for_logfontw_hfont (LOGFONTW *logfont, HFONT font);
79
+
80
+ cairo_public cairo_status_t
81
+ cairo_win32_scaled_font_select_font (cairo_scaled_font_t *scaled_font,
82
+ HDC hdc);
83
+
84
+ cairo_public void
85
+ cairo_win32_scaled_font_done_font (cairo_scaled_font_t *scaled_font);
86
+
87
+ cairo_public double
88
+ cairo_win32_scaled_font_get_metrics_factor (cairo_scaled_font_t *scaled_font);
89
+
90
+ cairo_public void
91
+ cairo_win32_scaled_font_get_logical_to_device (cairo_scaled_font_t *scaled_font,
92
+ cairo_matrix_t *logical_to_device);
93
+
94
+ cairo_public void
95
+ cairo_win32_scaled_font_get_device_to_logical (cairo_scaled_font_t *scaled_font,
96
+ cairo_matrix_t *device_to_logical);
97
+
98
+ CAIRO_END_DECLS
99
+
100
+ #else /* CAIRO_HAS_WIN32_SURFACE */
101
+ # error Cairo was not compiled with support for the win32 backend
102
+ #endif /* CAIRO_HAS_WIN32_SURFACE */
103
+
104
+ #endif /* _CAIRO_WIN32_H_ */
@@ -0,0 +1,1945 @@
1
+ /* cairo - a vector graphics library with display and print output
2
+ *
3
+ * Copyright © 2002 University of Southern California
4
+ * Copyright © 2005 Red Hat, Inc.
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it either under the terms of the GNU Lesser General Public
8
+ * License version 2.1 as published by the Free Software Foundation
9
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
10
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
11
+ * notice, a recipient may use your version of this file under either
12
+ * the MPL or the LGPL.
13
+ *
14
+ * You should have received a copy of the LGPL along with this library
15
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
16
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
+ * You should have received a copy of the MPL along with this library
18
+ * in the file COPYING-MPL-1.1
19
+ *
20
+ * The contents of this file are subject to the Mozilla Public License
21
+ * Version 1.1 (the "License"); you may not use this file except in
22
+ * compliance with the License. You may obtain a copy of the License at
23
+ * http://www.mozilla.org/MPL/
24
+ *
25
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
26
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
27
+ * the specific language governing rights and limitations.
28
+ *
29
+ * The Original Code is the cairo graphics library.
30
+ *
31
+ * The Initial Developer of the Original Code is University of Southern
32
+ * California.
33
+ *
34
+ * Contributor(s):
35
+ * Carl D. Worth <cworth@cworth.org>
36
+ */
37
+
38
+ #ifndef CAIRO_H
39
+ #define CAIRO_H
40
+
41
+ #include <cairo-features.h>
42
+ #include <cairo-deprecated.h>
43
+
44
+ CAIRO_BEGIN_DECLS
45
+
46
+ #define CAIRO_VERSION_ENCODE(major, minor, micro) ( \
47
+ ((major) * 10000) \
48
+ + ((minor) * 100) \
49
+ + ((micro) * 1))
50
+
51
+ #define CAIRO_VERSION CAIRO_VERSION_ENCODE( \
52
+ CAIRO_VERSION_MAJOR, \
53
+ CAIRO_VERSION_MINOR, \
54
+ CAIRO_VERSION_MICRO)
55
+
56
+ cairo_public int
57
+ cairo_version (void);
58
+
59
+ cairo_public const char*
60
+ cairo_version_string (void);
61
+
62
+ /**
63
+ * cairo_bool_t:
64
+ *
65
+ * #cairo_bool_t is used for boolean values. Returns of type
66
+ * #cairo_bool_t will always be either 0 or 1, but testing against
67
+ * these values explicitly is not encouraged; just use the
68
+ * value as a boolean condition.
69
+ *
70
+ * <informalexample><programlisting>
71
+ * if (cairo_in_stroke (cr, x, y)) {
72
+ * /<!-- -->* do something *<!-- -->/
73
+ * }
74
+ * </programlisting></informalexample>
75
+ **/
76
+ typedef int cairo_bool_t;
77
+
78
+ /**
79
+ * cairo_t:
80
+ *
81
+ * A #cairo_t contains the current state of the rendering device,
82
+ * including coordinates of yet to be drawn shapes.
83
+ *
84
+ * Cairo contexts, as #cairo_t objects are named, are central to
85
+ * cairo and all drawing with cairo is always done to a #cairo_t
86
+ * object.
87
+ *
88
+ * Memory management of #cairo_t is done with
89
+ * cairo_reference() and cairo_destroy().
90
+ **/
91
+ typedef struct _cairo cairo_t;
92
+
93
+ /**
94
+ * cairo_surface_t:
95
+ *
96
+ * A #cairo_surface_t represents an image, either as the destination
97
+ * of a drawing operation or as source when drawing onto another
98
+ * surface. To draw to a #cairo_surface_t, create a cairo context
99
+ * with the surface as the target, using cairo_create().
100
+ *
101
+ * There are different subtypes of #cairo_surface_t for
102
+ * different drawing backends; for example, cairo_image_surface_create()
103
+ * creates a bitmap image in memory.
104
+ * The type of a surface can be queried with cairo_surface_get_type().
105
+ *
106
+ * Memory management of #cairo_surface_t is done with
107
+ * cairo_surface_reference() and cairo_surface_destroy().
108
+ **/
109
+ typedef struct _cairo_surface cairo_surface_t;
110
+
111
+ /**
112
+ * cairo_matrix_t:
113
+ * @xx: xx component of the affine transformation
114
+ * @yx: yx component of the affine transformation
115
+ * @xy: xy component of the affine transformation
116
+ * @yy: yy component of the affine transformation
117
+ * @x0: X translation component of the affine transformation
118
+ * @y0: Y translation component of the affine transformation
119
+ *
120
+ * A #cairo_matrix_t holds an affine transformation, such as a scale,
121
+ * rotation, shear, or a combination of those. The transformation of
122
+ * a point (x, y) is given by:
123
+ * <programlisting>
124
+ * x_new = xx * x + xy * y + x0;
125
+ * y_new = yx * x + yy * y + y0;
126
+ * </programlisting>
127
+ **/
128
+ typedef struct _cairo_matrix {
129
+ double xx; double yx;
130
+ double xy; double yy;
131
+ double x0; double y0;
132
+ } cairo_matrix_t;
133
+
134
+ /**
135
+ * cairo_pattern_t:
136
+ *
137
+ * A #cairo_pattern_t represents a source when drawing onto a
138
+ * surface. There are different subtypes of #cairo_pattern_t,
139
+ * for different types of sources; for example,
140
+ * cairo_pattern_create_rgb() creates a pattern for a solid
141
+ * opaque color.
142
+ *
143
+ * Other than various cairo_pattern_create_<emphasis>type</emphasis>()
144
+ * functions, some of the pattern types can be implicitly created
145
+ * using various cairo_set_source_<emphasis>type</emphasis>() functions;
146
+ * for example cairo_set_source_rgb().
147
+ *
148
+ * The type of a pattern can be queried with cairo_pattern_get_type().
149
+ *
150
+ * Memory management of #cairo_pattern_t is done with
151
+ * cairo_pattern_reference() and cairo_pattern_destroy().
152
+ **/
153
+ typedef struct _cairo_pattern cairo_pattern_t;
154
+
155
+ /**
156
+ * cairo_destroy_func_t:
157
+ * @data: The data element being destroyed.
158
+ *
159
+ * #cairo_destroy_func_t the type of function which is called when a
160
+ * data element is destroyed. It is passed the pointer to the data
161
+ * element and should free any memory and resources allocated for it.
162
+ **/
163
+ typedef void (*cairo_destroy_func_t) (void *data);
164
+
165
+ /**
166
+ * cairo_user_data_key_t:
167
+ * @unused: not used; ignore.
168
+ *
169
+ * #cairo_user_data_key_t is used for attaching user data to cairo
170
+ * data structures. The actual contents of the struct is never used,
171
+ * and there is no need to initialize the object; only the unique
172
+ * address of a #cairo_data_key_t object is used. Typically, you
173
+ * would just use the address of a static #cairo_data_key_t object.
174
+ **/
175
+ typedef struct _cairo_user_data_key {
176
+ int unused;
177
+ } cairo_user_data_key_t;
178
+
179
+ /**
180
+ * cairo_status_t:
181
+ * @CAIRO_STATUS_SUCCESS: no error has occurred
182
+ * @CAIRO_STATUS_NO_MEMORY: out of memory
183
+ * @CAIRO_STATUS_INVALID_RESTORE: cairo_restore() called without matching cairo_save()
184
+ * @CAIRO_STATUS_INVALID_POP_GROUP: no saved group to pop
185
+ * @CAIRO_STATUS_NO_CURRENT_POINT: no current point defined
186
+ * @CAIRO_STATUS_INVALID_MATRIX: invalid matrix (not invertible)
187
+ * @CAIRO_STATUS_INVALID_STATUS: invalid value for an input #cairo_status_t
188
+ * @CAIRO_STATUS_NULL_POINTER: %NULL pointer
189
+ * @CAIRO_STATUS_INVALID_STRING: input string not valid UTF-8
190
+ * @CAIRO_STATUS_INVALID_PATH_DATA: input path data not valid
191
+ * @CAIRO_STATUS_READ_ERROR: error while reading from input stream
192
+ * @CAIRO_STATUS_WRITE_ERROR: error while writing to output stream
193
+ * @CAIRO_STATUS_SURFACE_FINISHED: target surface has been finished
194
+ * @CAIRO_STATUS_SURFACE_TYPE_MISMATCH: the surface type is not appropriate for the operation
195
+ * @CAIRO_STATUS_PATTERN_TYPE_MISMATCH: the pattern type is not appropriate for the operation
196
+ * @CAIRO_STATUS_INVALID_CONTENT: invalid value for an input #cairo_content_t
197
+ * @CAIRO_STATUS_INVALID_FORMAT: invalid value for an input #cairo_format_t
198
+ * @CAIRO_STATUS_INVALID_VISUAL: invalid value for an input Visual*
199
+ * @CAIRO_STATUS_FILE_NOT_FOUND: file not found
200
+ * @CAIRO_STATUS_INVALID_DASH: invalid value for a dash setting
201
+ * @CAIRO_STATUS_INVALID_DSC_COMMENT: invalid value for a DSC comment (Since 1.2)
202
+ * @CAIRO_STATUS_INVALID_INDEX: invalid index passed to getter (Since 1.4)
203
+ * @CAIRO_STATUS_CLIP_NOT_REPRESENTABLE: clip region not representable in desired format (Since 1.4)
204
+ * @CAIRO_STATUS_TEMP_FILE_ERROR: error creating or writing to a temporary file (Since 1.6)
205
+ * @CAIRO_STATUS_INVALID_STRIDE: invalid value for stride (Since 1.6)
206
+ *
207
+ * #cairo_status_t is used to indicate errors that can occur when
208
+ * using Cairo. In some cases it is returned directly by functions.
209
+ * but when using #cairo_t, the last error, if any, is stored in
210
+ * the context and can be retrieved with cairo_status().
211
+ *
212
+ * New entries may be added in future versions. Use cairo_status_to_string()
213
+ * to get a human-readable representation of an error message.
214
+ **/
215
+ typedef enum _cairo_status {
216
+ CAIRO_STATUS_SUCCESS = 0,
217
+ CAIRO_STATUS_NO_MEMORY,
218
+ CAIRO_STATUS_INVALID_RESTORE,
219
+ CAIRO_STATUS_INVALID_POP_GROUP,
220
+ CAIRO_STATUS_NO_CURRENT_POINT,
221
+ CAIRO_STATUS_INVALID_MATRIX,
222
+ CAIRO_STATUS_INVALID_STATUS,
223
+ CAIRO_STATUS_NULL_POINTER,
224
+ CAIRO_STATUS_INVALID_STRING,
225
+ CAIRO_STATUS_INVALID_PATH_DATA,
226
+ CAIRO_STATUS_READ_ERROR,
227
+ CAIRO_STATUS_WRITE_ERROR,
228
+ CAIRO_STATUS_SURFACE_FINISHED,
229
+ CAIRO_STATUS_SURFACE_TYPE_MISMATCH,
230
+ CAIRO_STATUS_PATTERN_TYPE_MISMATCH,
231
+ CAIRO_STATUS_INVALID_CONTENT,
232
+ CAIRO_STATUS_INVALID_FORMAT,
233
+ CAIRO_STATUS_INVALID_VISUAL,
234
+ CAIRO_STATUS_FILE_NOT_FOUND,
235
+ CAIRO_STATUS_INVALID_DASH,
236
+ CAIRO_STATUS_INVALID_DSC_COMMENT,
237
+ CAIRO_STATUS_INVALID_INDEX,
238
+ CAIRO_STATUS_CLIP_NOT_REPRESENTABLE,
239
+ CAIRO_STATUS_TEMP_FILE_ERROR,
240
+ CAIRO_STATUS_INVALID_STRIDE
241
+ /* after adding a new error: update CAIRO_STATUS_LAST_STATUS in cairoint.h */
242
+ } cairo_status_t;
243
+
244
+ /**
245
+ * cairo_content_t:
246
+ * @CAIRO_CONTENT_COLOR: The surface will hold color content only.
247
+ * @CAIRO_CONTENT_ALPHA: The surface will hold alpha content only.
248
+ * @CAIRO_CONTENT_COLOR_ALPHA: The surface will hold color and alpha content.
249
+ *
250
+ * #cairo_content_t is used to describe the content that a surface will
251
+ * contain, whether color information, alpha information (translucence
252
+ * vs. opacity), or both.
253
+ *
254
+ * Note: The large values here are designed to keep #cairo_content_t
255
+ * values distinct from #cairo_format_t values so that the
256
+ * implementation can detect the error if users confuse the two types.
257
+ **/
258
+ typedef enum _cairo_content {
259
+ CAIRO_CONTENT_COLOR = 0x1000,
260
+ CAIRO_CONTENT_ALPHA = 0x2000,
261
+ CAIRO_CONTENT_COLOR_ALPHA = 0x3000
262
+ } cairo_content_t;
263
+
264
+ /**
265
+ * cairo_write_func_t:
266
+ * @closure: the output closure
267
+ * @data: the buffer containing the data to write
268
+ * @length: the amount of data to write
269
+ *
270
+ * #cairo_write_func_t is the type of function which is called when a
271
+ * backend needs to write data to an output stream. It is passed the
272
+ * closure which was specified by the user at the time the write
273
+ * function was registered, the data to write and the length of the
274
+ * data in bytes. The write function should return
275
+ * CAIRO_STATUS_SUCCESS if all the data was successfully written,
276
+ * CAIRO_STATUS_WRITE_ERROR otherwise.
277
+ *
278
+ * Returns: the status code of the write operation
279
+ **/
280
+ typedef cairo_status_t (*cairo_write_func_t) (void *closure,
281
+ const unsigned char *data,
282
+ unsigned int length);
283
+
284
+ /**
285
+ * cairo_read_func_t:
286
+ * @closure: the input closure
287
+ * @data: the buffer into which to read the data
288
+ * @length: the amount of data to read
289
+ *
290
+ * #cairo_read_func_t is the type of function which is called when a
291
+ * backend needs to read data from an input stream. It is passed the
292
+ * closure which was specified by the user at the time the read
293
+ * function was registered, the buffer to read the data into and the
294
+ * length of the data in bytes. The read function should return
295
+ * CAIRO_STATUS_SUCCESS if all the data was successfully read,
296
+ * CAIRO_STATUS_READ_ERROR otherwise.
297
+ *
298
+ * Returns: the status code of the read operation
299
+ **/
300
+ typedef cairo_status_t (*cairo_read_func_t) (void *closure,
301
+ unsigned char *data,
302
+ unsigned int length);
303
+
304
+ /* Functions for manipulating state objects */
305
+ cairo_public cairo_t *
306
+ cairo_create (cairo_surface_t *target);
307
+
308
+ cairo_public cairo_t *
309
+ cairo_reference (cairo_t *cr);
310
+
311
+ cairo_public void
312
+ cairo_destroy (cairo_t *cr);
313
+
314
+ cairo_public unsigned int
315
+ cairo_get_reference_count (cairo_t *cr);
316
+
317
+ cairo_public void *
318
+ cairo_get_user_data (cairo_t *cr,
319
+ const cairo_user_data_key_t *key);
320
+
321
+ cairo_public cairo_status_t
322
+ cairo_set_user_data (cairo_t *cr,
323
+ const cairo_user_data_key_t *key,
324
+ void *user_data,
325
+ cairo_destroy_func_t destroy);
326
+
327
+ cairo_public void
328
+ cairo_save (cairo_t *cr);
329
+
330
+ cairo_public void
331
+ cairo_restore (cairo_t *cr);
332
+
333
+ cairo_public void
334
+ cairo_push_group (cairo_t *cr);
335
+
336
+ cairo_public void
337
+ cairo_push_group_with_content (cairo_t *cr, cairo_content_t content);
338
+
339
+ cairo_public cairo_pattern_t *
340
+ cairo_pop_group (cairo_t *cr);
341
+
342
+ cairo_public void
343
+ cairo_pop_group_to_source (cairo_t *cr);
344
+
345
+ /* Modify state */
346
+
347
+ /**
348
+ * cairo_operator_t:
349
+ * @CAIRO_OPERATOR_CLEAR: clear destination layer (bounded)
350
+ * @CAIRO_OPERATOR_SOURCE: replace destination layer (bounded)
351
+ * @CAIRO_OPERATOR_OVER: draw source layer on top of destination layer
352
+ * (bounded)
353
+ * @CAIRO_OPERATOR_IN: draw source where there was destination content
354
+ * (unbounded)
355
+ * @CAIRO_OPERATOR_OUT: draw source where there was no destination
356
+ * content (unbounded)
357
+ * @CAIRO_OPERATOR_ATOP: draw source on top of destination content and
358
+ * only there
359
+ * @CAIRO_OPERATOR_DEST: ignore the source
360
+ * @CAIRO_OPERATOR_DEST_OVER: draw destination on top of source
361
+ * @CAIRO_OPERATOR_DEST_IN: leave destination only where there was
362
+ * source content (unbounded)
363
+ * @CAIRO_OPERATOR_DEST_OUT: leave destination only where there was no
364
+ * source content
365
+ * @CAIRO_OPERATOR_DEST_ATOP: leave destination on top of source content
366
+ * and only there (unbounded)
367
+ * @CAIRO_OPERATOR_XOR: source and destination are shown where there is only
368
+ * one of them
369
+ * @CAIRO_OPERATOR_ADD: source and destination layers are accumulated
370
+ * @CAIRO_OPERATOR_SATURATE: like over, but assuming source and dest are
371
+ * disjoint geometries
372
+ *
373
+ * #cairo_operator_t is used to set the compositing operator for all cairo
374
+ * drawing operations.
375
+ *
376
+ * The default operator is %CAIRO_OPERATOR_OVER.
377
+ *
378
+ * The operators marked as <firstterm>unbounded</firstterm> modify their
379
+ * destination even outside of the mask layer (that is, their effect is not
380
+ * bound by the mask layer). However, their effect can still be limited by
381
+ * way of clipping.
382
+ *
383
+ * To keep things simple, the operator descriptions here
384
+ * document the behavior for when both source and destination are either fully
385
+ * transparent or fully opaque. The actual implementation works for
386
+ * translucent layers too.
387
+ * For a more detailed explanation of the effects of each operator, including
388
+ * the mathematical definitions, see
389
+ * <ulink url="http://cairographics.org/operators/">http://cairographics.org/operators/</ulink>.
390
+ **/
391
+ typedef enum _cairo_operator {
392
+ CAIRO_OPERATOR_CLEAR,
393
+
394
+ CAIRO_OPERATOR_SOURCE,
395
+ CAIRO_OPERATOR_OVER,
396
+ CAIRO_OPERATOR_IN,
397
+ CAIRO_OPERATOR_OUT,
398
+ CAIRO_OPERATOR_ATOP,
399
+
400
+ CAIRO_OPERATOR_DEST,
401
+ CAIRO_OPERATOR_DEST_OVER,
402
+ CAIRO_OPERATOR_DEST_IN,
403
+ CAIRO_OPERATOR_DEST_OUT,
404
+ CAIRO_OPERATOR_DEST_ATOP,
405
+
406
+ CAIRO_OPERATOR_XOR,
407
+ CAIRO_OPERATOR_ADD,
408
+ CAIRO_OPERATOR_SATURATE
409
+ } cairo_operator_t;
410
+
411
+ cairo_public void
412
+ cairo_set_operator (cairo_t *cr, cairo_operator_t op);
413
+
414
+ cairo_public void
415
+ cairo_set_source (cairo_t *cr, cairo_pattern_t *source);
416
+
417
+ cairo_public void
418
+ cairo_set_source_rgb (cairo_t *cr, double red, double green, double blue);
419
+
420
+ cairo_public void
421
+ cairo_set_source_rgba (cairo_t *cr,
422
+ double red, double green, double blue,
423
+ double alpha);
424
+
425
+ cairo_public void
426
+ cairo_set_source_surface (cairo_t *cr,
427
+ cairo_surface_t *surface,
428
+ double x,
429
+ double y);
430
+
431
+ cairo_public void
432
+ cairo_set_tolerance (cairo_t *cr, double tolerance);
433
+
434
+ /**
435
+ * cairo_antialias_t:
436
+ * @CAIRO_ANTIALIAS_DEFAULT: Use the default antialiasing for
437
+ * the subsystem and target device
438
+ * @CAIRO_ANTIALIAS_NONE: Use a bilevel alpha mask
439
+ * @CAIRO_ANTIALIAS_GRAY: Perform single-color antialiasing (using
440
+ * shades of gray for black text on a white background, for example).
441
+ * @CAIRO_ANTIALIAS_SUBPIXEL: Perform antialiasing by taking
442
+ * advantage of the order of subpixel elements on devices
443
+ * such as LCD panels
444
+ *
445
+ * Specifies the type of antialiasing to do when rendering text or shapes.
446
+ **/
447
+ typedef enum _cairo_antialias {
448
+ CAIRO_ANTIALIAS_DEFAULT,
449
+ CAIRO_ANTIALIAS_NONE,
450
+ CAIRO_ANTIALIAS_GRAY,
451
+ CAIRO_ANTIALIAS_SUBPIXEL
452
+ } cairo_antialias_t;
453
+
454
+ cairo_public void
455
+ cairo_set_antialias (cairo_t *cr, cairo_antialias_t antialias);
456
+
457
+ /**
458
+ * cairo_fill_rule_t:
459
+ * @CAIRO_FILL_RULE_WINDING: If the path crosses the ray from
460
+ * left-to-right, counts +1. If the path crosses the ray
461
+ * from right to left, counts -1. (Left and right are determined
462
+ * from the perspective of looking along the ray from the starting
463
+ * point.) If the total count is non-zero, the point will be filled.
464
+ * @CAIRO_FILL_RULE_EVEN_ODD: Counts the total number of
465
+ * intersections, without regard to the orientation of the contour. If
466
+ * the total number of intersections is odd, the point will be
467
+ * filled.
468
+ *
469
+ * #cairo_fill_rule_t is used to select how paths are filled. For both
470
+ * fill rules, whether or not a point is included in the fill is
471
+ * determined by taking a ray from that point to infinity and looking
472
+ * at intersections with the path. The ray can be in any direction,
473
+ * as long as it doesn't pass through the end point of a segment
474
+ * or have a tricky intersection such as intersecting tangent to the path.
475
+ * (Note that filling is not actually implemented in this way. This
476
+ * is just a description of the rule that is applied.)
477
+ *
478
+ * The default fill rule is %CAIRO_FILL_RULE_WINDING.
479
+ *
480
+ * New entries may be added in future versions.
481
+ **/
482
+ typedef enum _cairo_fill_rule {
483
+ CAIRO_FILL_RULE_WINDING,
484
+ CAIRO_FILL_RULE_EVEN_ODD
485
+ } cairo_fill_rule_t;
486
+
487
+ cairo_public void
488
+ cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule);
489
+
490
+ cairo_public void
491
+ cairo_set_line_width (cairo_t *cr, double width);
492
+
493
+ /**
494
+ * cairo_line_cap_t:
495
+ * @CAIRO_LINE_CAP_BUTT: start(stop) the line exactly at the start(end) point
496
+ * @CAIRO_LINE_CAP_ROUND: use a round ending, the center of the circle is the end point
497
+ * @CAIRO_LINE_CAP_SQUARE: use squared ending, the center of the square is the end point
498
+ *
499
+ * Specifies how to render the endpoints of the path when stroking.
500
+ *
501
+ * The default line cap style is %CAIRO_LINE_CAP_BUTT.
502
+ **/
503
+ typedef enum _cairo_line_cap {
504
+ CAIRO_LINE_CAP_BUTT,
505
+ CAIRO_LINE_CAP_ROUND,
506
+ CAIRO_LINE_CAP_SQUARE
507
+ } cairo_line_cap_t;
508
+
509
+ cairo_public void
510
+ cairo_set_line_cap (cairo_t *cr, cairo_line_cap_t line_cap);
511
+
512
+ /**
513
+ * cairo_line_join_t:
514
+ * @CAIRO_LINE_JOIN_MITER: use a sharp (angled) corner, see
515
+ * cairo_set_miter_limit()
516
+ * @CAIRO_LINE_JOIN_ROUND: use a rounded join, the center of the circle is the
517
+ * joint point
518
+ * @CAIRO_LINE_JOIN_BEVEL: use a cut-off join, the join is cut off at half
519
+ * the line width from the joint point
520
+ *
521
+ * Specifies how to render the junction of two lines when stroking.
522
+ *
523
+ * The default line join style is %CAIRO_LINE_JOIN_MITER.
524
+ **/
525
+ typedef enum _cairo_line_join {
526
+ CAIRO_LINE_JOIN_MITER,
527
+ CAIRO_LINE_JOIN_ROUND,
528
+ CAIRO_LINE_JOIN_BEVEL
529
+ } cairo_line_join_t;
530
+
531
+ cairo_public void
532
+ cairo_set_line_join (cairo_t *cr, cairo_line_join_t line_join);
533
+
534
+ cairo_public void
535
+ cairo_set_dash (cairo_t *cr,
536
+ const double *dashes,
537
+ int num_dashes,
538
+ double offset);
539
+
540
+ cairo_public void
541
+ cairo_set_miter_limit (cairo_t *cr, double limit);
542
+
543
+ cairo_public void
544
+ cairo_translate (cairo_t *cr, double tx, double ty);
545
+
546
+ cairo_public void
547
+ cairo_scale (cairo_t *cr, double sx, double sy);
548
+
549
+ cairo_public void
550
+ cairo_rotate (cairo_t *cr, double angle);
551
+
552
+ cairo_public void
553
+ cairo_transform (cairo_t *cr,
554
+ const cairo_matrix_t *matrix);
555
+
556
+ cairo_public void
557
+ cairo_set_matrix (cairo_t *cr,
558
+ const cairo_matrix_t *matrix);
559
+
560
+ cairo_public void
561
+ cairo_identity_matrix (cairo_t *cr);
562
+
563
+ cairo_public void
564
+ cairo_user_to_device (cairo_t *cr, double *x, double *y);
565
+
566
+ cairo_public void
567
+ cairo_user_to_device_distance (cairo_t *cr, double *dx, double *dy);
568
+
569
+ cairo_public void
570
+ cairo_device_to_user (cairo_t *cr, double *x, double *y);
571
+
572
+ cairo_public void
573
+ cairo_device_to_user_distance (cairo_t *cr, double *dx, double *dy);
574
+
575
+ /* Path creation functions */
576
+ cairo_public void
577
+ cairo_new_path (cairo_t *cr);
578
+
579
+ cairo_public void
580
+ cairo_move_to (cairo_t *cr, double x, double y);
581
+
582
+ cairo_public void
583
+ cairo_new_sub_path (cairo_t *cr);
584
+
585
+ cairo_public void
586
+ cairo_line_to (cairo_t *cr, double x, double y);
587
+
588
+ cairo_public void
589
+ cairo_curve_to (cairo_t *cr,
590
+ double x1, double y1,
591
+ double x2, double y2,
592
+ double x3, double y3);
593
+
594
+ cairo_public void
595
+ cairo_arc (cairo_t *cr,
596
+ double xc, double yc,
597
+ double radius,
598
+ double angle1, double angle2);
599
+
600
+ cairo_public void
601
+ cairo_arc_negative (cairo_t *cr,
602
+ double xc, double yc,
603
+ double radius,
604
+ double angle1, double angle2);
605
+
606
+ /* XXX: NYI
607
+ cairo_public void
608
+ cairo_arc_to (cairo_t *cr,
609
+ double x1, double y1,
610
+ double x2, double y2,
611
+ double radius);
612
+ */
613
+
614
+ cairo_public void
615
+ cairo_rel_move_to (cairo_t *cr, double dx, double dy);
616
+
617
+ cairo_public void
618
+ cairo_rel_line_to (cairo_t *cr, double dx, double dy);
619
+
620
+ cairo_public void
621
+ cairo_rel_curve_to (cairo_t *cr,
622
+ double dx1, double dy1,
623
+ double dx2, double dy2,
624
+ double dx3, double dy3);
625
+
626
+ cairo_public void
627
+ cairo_rectangle (cairo_t *cr,
628
+ double x, double y,
629
+ double width, double height);
630
+
631
+ /* XXX: NYI
632
+ cairo_public void
633
+ cairo_stroke_to_path (cairo_t *cr);
634
+ */
635
+
636
+ cairo_public void
637
+ cairo_close_path (cairo_t *cr);
638
+
639
+ cairo_public void
640
+ cairo_path_extents (cairo_t *cr,
641
+ double *x1, double *y1,
642
+ double *x2, double *y2);
643
+
644
+ /* Painting functions */
645
+ cairo_public void
646
+ cairo_paint (cairo_t *cr);
647
+
648
+ cairo_public void
649
+ cairo_paint_with_alpha (cairo_t *cr,
650
+ double alpha);
651
+
652
+ cairo_public void
653
+ cairo_mask (cairo_t *cr,
654
+ cairo_pattern_t *pattern);
655
+
656
+ cairo_public void
657
+ cairo_mask_surface (cairo_t *cr,
658
+ cairo_surface_t *surface,
659
+ double surface_x,
660
+ double surface_y);
661
+
662
+ cairo_public void
663
+ cairo_stroke (cairo_t *cr);
664
+
665
+ cairo_public void
666
+ cairo_stroke_preserve (cairo_t *cr);
667
+
668
+ cairo_public void
669
+ cairo_fill (cairo_t *cr);
670
+
671
+ cairo_public void
672
+ cairo_fill_preserve (cairo_t *cr);
673
+
674
+ cairo_public void
675
+ cairo_copy_page (cairo_t *cr);
676
+
677
+ cairo_public void
678
+ cairo_show_page (cairo_t *cr);
679
+
680
+ /* Insideness testing */
681
+ cairo_public cairo_bool_t
682
+ cairo_in_stroke (cairo_t *cr, double x, double y);
683
+
684
+ cairo_public cairo_bool_t
685
+ cairo_in_fill (cairo_t *cr, double x, double y);
686
+
687
+ /* Rectangular extents */
688
+ cairo_public void
689
+ cairo_stroke_extents (cairo_t *cr,
690
+ double *x1, double *y1,
691
+ double *x2, double *y2);
692
+
693
+ cairo_public void
694
+ cairo_fill_extents (cairo_t *cr,
695
+ double *x1, double *y1,
696
+ double *x2, double *y2);
697
+
698
+ /* Clipping */
699
+ cairo_public void
700
+ cairo_reset_clip (cairo_t *cr);
701
+
702
+ cairo_public void
703
+ cairo_clip (cairo_t *cr);
704
+
705
+ cairo_public void
706
+ cairo_clip_preserve (cairo_t *cr);
707
+
708
+ cairo_public void
709
+ cairo_clip_extents (cairo_t *cr,
710
+ double *x1, double *y1,
711
+ double *x2, double *y2);
712
+
713
+ /**
714
+ * cairo_rectangle_t:
715
+ * @x: X coordinate of the left side of the rectangle
716
+ * @y: Y coordinate of the the top side of the rectangle
717
+ * @width: width of the rectangle
718
+ * @height: height of the rectangle
719
+ *
720
+ * A data structure for holding a rectangle.
721
+ *
722
+ * Since: 1.4
723
+ **/
724
+ typedef struct _cairo_rectangle {
725
+ double x, y, width, height;
726
+ } cairo_rectangle_t;
727
+
728
+ /**
729
+ * cairo_rectangle_list_t:
730
+ * @status: Error status of the rectangle list
731
+ * @rectangles: Array containing the rectangles
732
+ * @num_rectangles: Number of rectangles in this list
733
+ *
734
+ * A data structure for holding a dynamically allocated
735
+ * array of rectangles.
736
+ *
737
+ * Since: 1.4
738
+ **/
739
+ typedef struct _cairo_rectangle_list {
740
+ cairo_status_t status;
741
+ cairo_rectangle_t *rectangles;
742
+ int num_rectangles;
743
+ } cairo_rectangle_list_t;
744
+
745
+ cairo_public cairo_rectangle_list_t *
746
+ cairo_copy_clip_rectangle_list (cairo_t *cr);
747
+
748
+ cairo_public void
749
+ cairo_rectangle_list_destroy (cairo_rectangle_list_t *rectangle_list);
750
+
751
+ /* Font/Text functions */
752
+
753
+ /**
754
+ * cairo_scaled_font_t:
755
+ *
756
+ * A #cairo_scaled_font_t is a font scaled to a particular size and device
757
+ * resolution. A #cairo_scaled_font_t is most useful for low-level font
758
+ * usage where a library or application wants to cache a reference
759
+ * to a scaled font to speed up the computation of metrics.
760
+ *
761
+ * There are various types of scaled fonts, depending on the
762
+ * <firstterm>font backend</firstterm> they use. The type of a
763
+ * scaled font can be queried using cairo_scaled_font_get_type().
764
+ *
765
+ * Memory management of #cairo_scaled_font_t is done with
766
+ * cairo_scaled_font_reference() and cairo_scaled_font_destroy().
767
+ **/
768
+ typedef struct _cairo_scaled_font cairo_scaled_font_t;
769
+
770
+ /**
771
+ * cairo_font_face_t:
772
+ *
773
+ * A #cairo_font_face_t specifies all aspects of a font other
774
+ * than the size or font matrix (a font matrix is used to distort
775
+ * a font by sheering it or scaling it unequally in the two
776
+ * directions) . A font face can be set on a #cairo_t by using
777
+ * cairo_set_font_face(); the size and font matrix are set with
778
+ * cairo_set_font_size() and cairo_set_font_matrix().
779
+ *
780
+ * There are various types of font faces, depending on the
781
+ * <firstterm>font backend</firstterm> they use. The type of a
782
+ * font face can be queried using cairo_font_face_get_type().
783
+ *
784
+ * Memory management of #cairo_font_face_t is done with
785
+ * cairo_font_face_reference() and cairo_font_face_destroy().
786
+ **/
787
+ typedef struct _cairo_font_face cairo_font_face_t;
788
+
789
+ /**
790
+ * cairo_glyph_t:
791
+ * @index: glyph index in the font. The exact interpretation of the
792
+ * glyph index depends on the font technology being used.
793
+ * @x: the offset in the X direction between the origin used for
794
+ * drawing or measuring the string and the origin of this glyph.
795
+ * @y: the offset in the Y direction between the origin used for
796
+ * drawing or measuring the string and the origin of this glyph.
797
+ *
798
+ * The #cairo_glyph_t structure holds information about a single glyph
799
+ * when drawing or measuring text. A font is (in simple terms) a
800
+ * collection of shapes used to draw text. A glyph is one of these
801
+ * shapes. There can be multiple glyphs for a single character
802
+ * (alternates to be used in different contexts, for example), or a
803
+ * glyph can be a <firstterm>ligature</firstterm> of multiple
804
+ * characters. Cairo doesn't expose any way of converting input text
805
+ * into glyphs, so in order to use the Cairo interfaces that take
806
+ * arrays of glyphs, you must directly access the appropriate
807
+ * underlying font system.
808
+ *
809
+ * Note that the offsets given by @x and @y are not cumulative. When
810
+ * drawing or measuring text, each glyph is individually positioned
811
+ * with respect to the overall origin
812
+ **/
813
+ typedef struct {
814
+ unsigned long index;
815
+ double x;
816
+ double y;
817
+ } cairo_glyph_t;
818
+
819
+ /**
820
+ * cairo_text_extents_t:
821
+ * @x_bearing: the horizontal distance from the origin to the
822
+ * leftmost part of the glyphs as drawn. Positive if the
823
+ * glyphs lie entirely to the right of the origin.
824
+ * @y_bearing: the vertical distance from the origin to the
825
+ * topmost part of the glyphs as drawn. Positive only if the
826
+ * glyphs lie completely below the origin; will usually be
827
+ * negative.
828
+ * @width: width of the glyphs as drawn
829
+ * @height: height of the glyphs as drawn
830
+ * @x_advance:distance to advance in the X direction
831
+ * after drawing these glyphs
832
+ * @y_advance: distance to advance in the Y direction
833
+ * after drawing these glyphs. Will typically be zero except
834
+ * for vertical text layout as found in East-Asian languages.
835
+ *
836
+ * The #cairo_text_extents_t structure stores the extents of a single
837
+ * glyph or a string of glyphs in user-space coordinates. Because text
838
+ * extents are in user-space coordinates, they are mostly, but not
839
+ * entirely, independent of the current transformation matrix. If you call
840
+ * <literal>cairo_scale(cr, 2.0, 2.0)</literal>, text will
841
+ * be drawn twice as big, but the reported text extents will not be
842
+ * doubled. They will change slightly due to hinting (so you can't
843
+ * assume that metrics are independent of the transformation matrix),
844
+ * but otherwise will remain unchanged.
845
+ **/
846
+ typedef struct {
847
+ double x_bearing;
848
+ double y_bearing;
849
+ double width;
850
+ double height;
851
+ double x_advance;
852
+ double y_advance;
853
+ } cairo_text_extents_t;
854
+
855
+ /**
856
+ * cairo_font_extents_t:
857
+ * @ascent: the distance that the font extends above the baseline.
858
+ * Note that this is not always exactly equal to the maximum
859
+ * of the extents of all the glyphs in the font, but rather
860
+ * is picked to express the font designer's intent as to
861
+ * how the font should align with elements above it.
862
+ * @descent: the distance that the font extends below the baseline.
863
+ * This value is positive for typical fonts that include
864
+ * portions below the baseline. Note that this is not always
865
+ * exactly equal to the maximum of the extents of all the
866
+ * glyphs in the font, but rather is picked to express the
867
+ * font designer's intent as to how the the font should
868
+ * align with elements below it.
869
+ * @height: the recommended vertical distance between baselines when
870
+ * setting consecutive lines of text with the font. This
871
+ * is greater than @ascent+@descent by a
872
+ * quantity known as the <firstterm>line spacing</firstterm>
873
+ * or <firstterm>external leading</firstterm>. When space
874
+ * is at a premium, most fonts can be set with only
875
+ * a distance of @ascent+@descent between lines.
876
+ * @max_x_advance: the maximum distance in the X direction that
877
+ * the the origin is advanced for any glyph in the font.
878
+ * @max_y_advance: the maximum distance in the Y direction that
879
+ * the the origin is advanced for any glyph in the font.
880
+ * this will be zero for normal fonts used for horizontal
881
+ * writing. (The scripts of East Asia are sometimes written
882
+ * vertically.)
883
+ *
884
+ * The #cairo_font_extents_t structure stores metric information for
885
+ * a font. Values are given in the current user-space coordinate
886
+ * system.
887
+ *
888
+ * Because font metrics are in user-space coordinates, they are
889
+ * mostly, but not entirely, independent of the current transformation
890
+ * matrix. If you call <literal>cairo_scale(cr, 2.0, 2.0)</literal>,
891
+ * text will be drawn twice as big, but the reported text extents will
892
+ * not be doubled. They will change slightly due to hinting (so you
893
+ * can't assume that metrics are independent of the transformation
894
+ * matrix), but otherwise will remain unchanged.
895
+ **/
896
+ typedef struct {
897
+ double ascent;
898
+ double descent;
899
+ double height;
900
+ double max_x_advance;
901
+ double max_y_advance;
902
+ } cairo_font_extents_t;
903
+
904
+ /**
905
+ * cairo_font_slant_t:
906
+ * @CAIRO_FONT_SLANT_NORMAL: Upright font style
907
+ * @CAIRO_FONT_SLANT_ITALIC: Italic font style
908
+ * @CAIRO_FONT_SLANT_OBLIQUE: Oblique font style
909
+ *
910
+ * Specifies variants of a font face based on their slant.
911
+ **/
912
+ typedef enum _cairo_font_slant {
913
+ CAIRO_FONT_SLANT_NORMAL,
914
+ CAIRO_FONT_SLANT_ITALIC,
915
+ CAIRO_FONT_SLANT_OBLIQUE
916
+ } cairo_font_slant_t;
917
+
918
+ /**
919
+ * cairo_font_weight_t:
920
+ * @CAIRO_FONT_WEIGHT_NORMAL: Normal font weight
921
+ * @CAIRO_FONT_WEIGHT_BOLD: Bold font weight
922
+ *
923
+ * Specifies variants of a font face based on their weight.
924
+ **/
925
+ typedef enum _cairo_font_weight {
926
+ CAIRO_FONT_WEIGHT_NORMAL,
927
+ CAIRO_FONT_WEIGHT_BOLD
928
+ } cairo_font_weight_t;
929
+
930
+ /**
931
+ * cairo_subpixel_order_t:
932
+ * @CAIRO_SUBPIXEL_ORDER_DEFAULT: Use the default subpixel order for
933
+ * for the target device
934
+ * @CAIRO_SUBPIXEL_ORDER_RGB: Subpixel elements are arranged horizontally
935
+ * with red at the left
936
+ * @CAIRO_SUBPIXEL_ORDER_BGR: Subpixel elements are arranged horizontally
937
+ * with blue at the left
938
+ * @CAIRO_SUBPIXEL_ORDER_VRGB: Subpixel elements are arranged vertically
939
+ * with red at the top
940
+ * @CAIRO_SUBPIXEL_ORDER_VBGR: Subpixel elements are arranged vertically
941
+ * with blue at the top
942
+ *
943
+ * The subpixel order specifies the order of color elements within
944
+ * each pixel on the display device when rendering with an
945
+ * antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL.
946
+ **/
947
+ typedef enum _cairo_subpixel_order {
948
+ CAIRO_SUBPIXEL_ORDER_DEFAULT,
949
+ CAIRO_SUBPIXEL_ORDER_RGB,
950
+ CAIRO_SUBPIXEL_ORDER_BGR,
951
+ CAIRO_SUBPIXEL_ORDER_VRGB,
952
+ CAIRO_SUBPIXEL_ORDER_VBGR
953
+ } cairo_subpixel_order_t;
954
+
955
+ /**
956
+ * cairo_hint_style_t:
957
+ * @CAIRO_HINT_STYLE_DEFAULT: Use the default hint style for
958
+ * font backend and target device
959
+ * @CAIRO_HINT_STYLE_NONE: Do not hint outlines
960
+ * @CAIRO_HINT_STYLE_SLIGHT: Hint outlines slightly to improve
961
+ * contrast while retaining good fidelity to the original
962
+ * shapes.
963
+ * @CAIRO_HINT_STYLE_MEDIUM: Hint outlines with medium strength
964
+ * giving a compromise between fidelity to the original shapes
965
+ * and contrast
966
+ * @CAIRO_HINT_STYLE_FULL: Hint outlines to maximize contrast
967
+ *
968
+ * Specifies the type of hinting to do on font outlines. Hinting
969
+ * is the process of fitting outlines to the pixel grid in order
970
+ * to improve the appearance of the result. Since hinting outlines
971
+ * involves distorting them, it also reduces the faithfulness
972
+ * to the original outline shapes. Not all of the outline hinting
973
+ * styles are supported by all font backends.
974
+ *
975
+ * New entries may be added in future versions.
976
+ **/
977
+ typedef enum _cairo_hint_style {
978
+ CAIRO_HINT_STYLE_DEFAULT,
979
+ CAIRO_HINT_STYLE_NONE,
980
+ CAIRO_HINT_STYLE_SLIGHT,
981
+ CAIRO_HINT_STYLE_MEDIUM,
982
+ CAIRO_HINT_STYLE_FULL
983
+ } cairo_hint_style_t;
984
+
985
+ /**
986
+ * cairo_hint_metrics_t:
987
+ * @CAIRO_HINT_METRICS_DEFAULT: Hint metrics in the default
988
+ * manner for the font backend and target device
989
+ * @CAIRO_HINT_METRICS_OFF: Do not hint font metrics
990
+ * @CAIRO_HINT_METRICS_ON: Hint font metrics
991
+ *
992
+ * Specifies whether to hint font metrics; hinting font metrics
993
+ * means quantizing them so that they are integer values in
994
+ * device space. Doing this improves the consistency of
995
+ * letter and line spacing, however it also means that text
996
+ * will be laid out differently at different zoom factors.
997
+ **/
998
+ typedef enum _cairo_hint_metrics {
999
+ CAIRO_HINT_METRICS_DEFAULT,
1000
+ CAIRO_HINT_METRICS_OFF,
1001
+ CAIRO_HINT_METRICS_ON
1002
+ } cairo_hint_metrics_t;
1003
+
1004
+ /**
1005
+ * cairo_font_options_t:
1006
+ *
1007
+ * An opaque structure holding all options that are used when
1008
+ * rendering fonts.
1009
+ *
1010
+ * Individual features of a #cairo_font_options_t can be set or
1011
+ * accessed using functions named
1012
+ * cairo_font_options_set_<emphasis>feature_name</emphasis> and
1013
+ * cairo_font_options_get_<emphasis>feature_name</emphasis>, like
1014
+ * cairo_font_options_set_antialias() and
1015
+ * cairo_font_options_get_antialias().
1016
+ *
1017
+ * New features may be added to a #cairo_font_options_t in the
1018
+ * future. For this reason, cairo_font_options_copy(),
1019
+ * cairo_font_options_equal(), cairo_font_options_merge(), and
1020
+ * cairo_font_options_hash() should be used to copy, check
1021
+ * for equality, merge, or compute a hash value of
1022
+ * #cairo_font_options_t objects.
1023
+ **/
1024
+ typedef struct _cairo_font_options cairo_font_options_t;
1025
+
1026
+ cairo_public cairo_font_options_t *
1027
+ cairo_font_options_create (void);
1028
+
1029
+ cairo_public cairo_font_options_t *
1030
+ cairo_font_options_copy (const cairo_font_options_t *original);
1031
+
1032
+ cairo_public void
1033
+ cairo_font_options_destroy (cairo_font_options_t *options);
1034
+
1035
+ cairo_public cairo_status_t
1036
+ cairo_font_options_status (cairo_font_options_t *options);
1037
+
1038
+ cairo_public void
1039
+ cairo_font_options_merge (cairo_font_options_t *options,
1040
+ const cairo_font_options_t *other);
1041
+ cairo_public cairo_bool_t
1042
+ cairo_font_options_equal (const cairo_font_options_t *options,
1043
+ const cairo_font_options_t *other);
1044
+
1045
+ cairo_public unsigned long
1046
+ cairo_font_options_hash (const cairo_font_options_t *options);
1047
+
1048
+ cairo_public void
1049
+ cairo_font_options_set_antialias (cairo_font_options_t *options,
1050
+ cairo_antialias_t antialias);
1051
+ cairo_public cairo_antialias_t
1052
+ cairo_font_options_get_antialias (const cairo_font_options_t *options);
1053
+
1054
+ cairo_public void
1055
+ cairo_font_options_set_subpixel_order (cairo_font_options_t *options,
1056
+ cairo_subpixel_order_t subpixel_order);
1057
+ cairo_public cairo_subpixel_order_t
1058
+ cairo_font_options_get_subpixel_order (const cairo_font_options_t *options);
1059
+
1060
+ cairo_public void
1061
+ cairo_font_options_set_hint_style (cairo_font_options_t *options,
1062
+ cairo_hint_style_t hint_style);
1063
+ cairo_public cairo_hint_style_t
1064
+ cairo_font_options_get_hint_style (const cairo_font_options_t *options);
1065
+
1066
+ cairo_public void
1067
+ cairo_font_options_set_hint_metrics (cairo_font_options_t *options,
1068
+ cairo_hint_metrics_t hint_metrics);
1069
+ cairo_public cairo_hint_metrics_t
1070
+ cairo_font_options_get_hint_metrics (const cairo_font_options_t *options);
1071
+
1072
+ /* This interface is for dealing with text as text, not caring about the
1073
+ font object inside the the cairo_t. */
1074
+
1075
+ cairo_public void
1076
+ cairo_select_font_face (cairo_t *cr,
1077
+ const char *family,
1078
+ cairo_font_slant_t slant,
1079
+ cairo_font_weight_t weight);
1080
+
1081
+ cairo_public void
1082
+ cairo_set_font_size (cairo_t *cr, double size);
1083
+
1084
+ cairo_public void
1085
+ cairo_set_font_matrix (cairo_t *cr,
1086
+ const cairo_matrix_t *matrix);
1087
+
1088
+ cairo_public void
1089
+ cairo_get_font_matrix (cairo_t *cr,
1090
+ cairo_matrix_t *matrix);
1091
+
1092
+ cairo_public void
1093
+ cairo_set_font_options (cairo_t *cr,
1094
+ const cairo_font_options_t *options);
1095
+
1096
+ cairo_public void
1097
+ cairo_get_font_options (cairo_t *cr,
1098
+ cairo_font_options_t *options);
1099
+
1100
+ cairo_public void
1101
+ cairo_set_font_face (cairo_t *cr, cairo_font_face_t *font_face);
1102
+
1103
+ cairo_public cairo_font_face_t *
1104
+ cairo_get_font_face (cairo_t *cr);
1105
+
1106
+ cairo_public void
1107
+ cairo_set_scaled_font (cairo_t *cr,
1108
+ const cairo_scaled_font_t *scaled_font);
1109
+
1110
+ cairo_public cairo_scaled_font_t *
1111
+ cairo_get_scaled_font (cairo_t *cr);
1112
+
1113
+ cairo_public void
1114
+ cairo_show_text (cairo_t *cr, const char *utf8);
1115
+
1116
+ cairo_public void
1117
+ cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs);
1118
+
1119
+ cairo_public void
1120
+ cairo_text_path (cairo_t *cr, const char *utf8);
1121
+
1122
+ cairo_public void
1123
+ cairo_glyph_path (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs);
1124
+
1125
+ cairo_public void
1126
+ cairo_text_extents (cairo_t *cr,
1127
+ const char *utf8,
1128
+ cairo_text_extents_t *extents);
1129
+
1130
+ cairo_public void
1131
+ cairo_glyph_extents (cairo_t *cr,
1132
+ const cairo_glyph_t *glyphs,
1133
+ int num_glyphs,
1134
+ cairo_text_extents_t *extents);
1135
+
1136
+ cairo_public void
1137
+ cairo_font_extents (cairo_t *cr,
1138
+ cairo_font_extents_t *extents);
1139
+
1140
+ /* Generic identifier for a font style */
1141
+
1142
+ cairo_public cairo_font_face_t *
1143
+ cairo_font_face_reference (cairo_font_face_t *font_face);
1144
+
1145
+ cairo_public void
1146
+ cairo_font_face_destroy (cairo_font_face_t *font_face);
1147
+
1148
+ cairo_public unsigned int
1149
+ cairo_font_face_get_reference_count (cairo_font_face_t *font_face);
1150
+
1151
+ cairo_public cairo_status_t
1152
+ cairo_font_face_status (cairo_font_face_t *font_face);
1153
+
1154
+ /**
1155
+ * cairo_font_type_t:
1156
+ * @CAIRO_FONT_TYPE_TOY: The font was created using cairo's toy font api
1157
+ * @CAIRO_FONT_TYPE_FT: The font is of type FreeType
1158
+ * @CAIRO_FONT_TYPE_WIN32: The font is of type Win32
1159
+ * @CAIRO_FONT_TYPE_QUARTZ: The font is of type Quartz (Since: 1.6)
1160
+ *
1161
+ * #cairo_font_type_t is used to describe the type of a given font
1162
+ * face or scaled font. The font types are also known as "font
1163
+ * backends" within cairo.
1164
+ *
1165
+ * The type of a font face is determined by the function used to
1166
+ * create it, which will generally be of the form
1167
+ * cairo_<emphasis>type</emphasis>_font_face_create. The font face type can be queried
1168
+ * with cairo_font_face_get_type()
1169
+ *
1170
+ * The various #cairo_font_face_t functions can be used with a font face
1171
+ * of any type.
1172
+ *
1173
+ * The type of a scaled font is determined by the type of the font
1174
+ * face passed to cairo_scaled_font_create(). The scaled font type can
1175
+ * be queried with cairo_scaled_font_get_type()
1176
+ *
1177
+ * The various #cairo_scaled_font_t functions can be used with scaled
1178
+ * fonts of any type, but some font backends also provide
1179
+ * type-specific functions that must only be called with a scaled font
1180
+ * of the appropriate type. These functions have names that begin with
1181
+ * cairo_<emphasis>type</emphasis>_scaled_font such as cairo_ft_scaled_font_lock_face().
1182
+ *
1183
+ * The behavior of calling a type-specific function with a scaled font
1184
+ * of the wrong type is undefined.
1185
+ *
1186
+ * New entries may be added in future versions.
1187
+ *
1188
+ * Since: 1.2
1189
+ **/
1190
+ typedef enum _cairo_font_type {
1191
+ CAIRO_FONT_TYPE_TOY,
1192
+ CAIRO_FONT_TYPE_FT,
1193
+ CAIRO_FONT_TYPE_WIN32,
1194
+ CAIRO_FONT_TYPE_QUARTZ
1195
+ } cairo_font_type_t;
1196
+
1197
+ cairo_public cairo_font_type_t
1198
+ cairo_font_face_get_type (cairo_font_face_t *font_face);
1199
+
1200
+ cairo_public void *
1201
+ cairo_font_face_get_user_data (cairo_font_face_t *font_face,
1202
+ const cairo_user_data_key_t *key);
1203
+
1204
+ cairo_public cairo_status_t
1205
+ cairo_font_face_set_user_data (cairo_font_face_t *font_face,
1206
+ const cairo_user_data_key_t *key,
1207
+ void *user_data,
1208
+ cairo_destroy_func_t destroy);
1209
+
1210
+ /* Portable interface to general font features. */
1211
+
1212
+ cairo_public cairo_scaled_font_t *
1213
+ cairo_scaled_font_create (cairo_font_face_t *font_face,
1214
+ const cairo_matrix_t *font_matrix,
1215
+ const cairo_matrix_t *ctm,
1216
+ const cairo_font_options_t *options);
1217
+
1218
+ cairo_public cairo_scaled_font_t *
1219
+ cairo_scaled_font_reference (cairo_scaled_font_t *scaled_font);
1220
+
1221
+ cairo_public void
1222
+ cairo_scaled_font_destroy (cairo_scaled_font_t *scaled_font);
1223
+
1224
+ cairo_public unsigned int
1225
+ cairo_scaled_font_get_reference_count (cairo_scaled_font_t *scaled_font);
1226
+
1227
+ cairo_public cairo_status_t
1228
+ cairo_scaled_font_status (cairo_scaled_font_t *scaled_font);
1229
+
1230
+ cairo_public cairo_font_type_t
1231
+ cairo_scaled_font_get_type (cairo_scaled_font_t *scaled_font);
1232
+
1233
+ cairo_public void *
1234
+ cairo_scaled_font_get_user_data (cairo_scaled_font_t *scaled_font,
1235
+ const cairo_user_data_key_t *key);
1236
+
1237
+ cairo_public cairo_status_t
1238
+ cairo_scaled_font_set_user_data (cairo_scaled_font_t *scaled_font,
1239
+ const cairo_user_data_key_t *key,
1240
+ void *user_data,
1241
+ cairo_destroy_func_t destroy);
1242
+
1243
+ cairo_public void
1244
+ cairo_scaled_font_extents (cairo_scaled_font_t *scaled_font,
1245
+ cairo_font_extents_t *extents);
1246
+
1247
+ cairo_public void
1248
+ cairo_scaled_font_text_extents (cairo_scaled_font_t *scaled_font,
1249
+ const char *utf8,
1250
+ cairo_text_extents_t *extents);
1251
+
1252
+ cairo_public void
1253
+ cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font,
1254
+ const cairo_glyph_t *glyphs,
1255
+ int num_glyphs,
1256
+ cairo_text_extents_t *extents);
1257
+
1258
+ cairo_public cairo_font_face_t *
1259
+ cairo_scaled_font_get_font_face (cairo_scaled_font_t *scaled_font);
1260
+
1261
+ cairo_public void
1262
+ cairo_scaled_font_get_font_matrix (cairo_scaled_font_t *scaled_font,
1263
+ cairo_matrix_t *font_matrix);
1264
+
1265
+ cairo_public void
1266
+ cairo_scaled_font_get_ctm (cairo_scaled_font_t *scaled_font,
1267
+ cairo_matrix_t *ctm);
1268
+
1269
+ cairo_public void
1270
+ cairo_scaled_font_get_font_options (cairo_scaled_font_t *scaled_font,
1271
+ cairo_font_options_t *options);
1272
+
1273
+ /* Query functions */
1274
+
1275
+ cairo_public cairo_operator_t
1276
+ cairo_get_operator (cairo_t *cr);
1277
+
1278
+ cairo_public cairo_pattern_t *
1279
+ cairo_get_source (cairo_t *cr);
1280
+
1281
+ cairo_public double
1282
+ cairo_get_tolerance (cairo_t *cr);
1283
+
1284
+ cairo_public cairo_antialias_t
1285
+ cairo_get_antialias (cairo_t *cr);
1286
+
1287
+ cairo_public cairo_bool_t
1288
+ cairo_has_current_point (cairo_t *cr);
1289
+
1290
+ cairo_public void
1291
+ cairo_get_current_point (cairo_t *cr, double *x, double *y);
1292
+
1293
+ cairo_public cairo_fill_rule_t
1294
+ cairo_get_fill_rule (cairo_t *cr);
1295
+
1296
+ cairo_public double
1297
+ cairo_get_line_width (cairo_t *cr);
1298
+
1299
+ cairo_public cairo_line_cap_t
1300
+ cairo_get_line_cap (cairo_t *cr);
1301
+
1302
+ cairo_public cairo_line_join_t
1303
+ cairo_get_line_join (cairo_t *cr);
1304
+
1305
+ cairo_public double
1306
+ cairo_get_miter_limit (cairo_t *cr);
1307
+
1308
+ cairo_public int
1309
+ cairo_get_dash_count (cairo_t *cr);
1310
+
1311
+ cairo_public void
1312
+ cairo_get_dash (cairo_t *cr, double *dashes, double *offset);
1313
+
1314
+ cairo_public void
1315
+ cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix);
1316
+
1317
+ cairo_public cairo_surface_t *
1318
+ cairo_get_target (cairo_t *cr);
1319
+
1320
+ cairo_public cairo_surface_t *
1321
+ cairo_get_group_target (cairo_t *cr);
1322
+
1323
+ /**
1324
+ * cairo_path_data_type_t:
1325
+ * @CAIRO_PATH_MOVE_TO: A move-to operation
1326
+ * @CAIRO_PATH_LINE_TO: A line-to operation
1327
+ * @CAIRO_PATH_CURVE_TO: A curve-to operation
1328
+ * @CAIRO_PATH_CLOSE_PATH: A close-path operation
1329
+ *
1330
+ * #cairo_path_data_t is used to describe the type of one portion
1331
+ * of a path when represented as a #cairo_path_t.
1332
+ * See #cairo_path_data_t for details.
1333
+ **/
1334
+ typedef enum _cairo_path_data_type {
1335
+ CAIRO_PATH_MOVE_TO,
1336
+ CAIRO_PATH_LINE_TO,
1337
+ CAIRO_PATH_CURVE_TO,
1338
+ CAIRO_PATH_CLOSE_PATH
1339
+ } cairo_path_data_type_t;
1340
+
1341
+ /**
1342
+ * cairo_path_data_t:
1343
+ *
1344
+ * #cairo_path_data_t is used to represent the path data inside a
1345
+ * #cairo_path_t.
1346
+ *
1347
+ * The data structure is designed to try to balance the demands of
1348
+ * efficiency and ease-of-use. A path is represented as an array of
1349
+ * #cairo_path_data_t, which is a union of headers and points.
1350
+ *
1351
+ * Each portion of the path is represented by one or more elements in
1352
+ * the array, (one header followed by 0 or more points). The length
1353
+ * value of the header is the number of array elements for the current
1354
+ * portion including the header, (ie. length == 1 + # of points), and
1355
+ * where the number of points for each element type is as follows:
1356
+ *
1357
+ * <programlisting>
1358
+ * %CAIRO_PATH_MOVE_TO: 1 point
1359
+ * %CAIRO_PATH_LINE_TO: 1 point
1360
+ * %CAIRO_PATH_CURVE_TO: 3 points
1361
+ * %CAIRO_PATH_CLOSE_PATH: 0 points
1362
+ * </programlisting>
1363
+ *
1364
+ * The semantics and ordering of the coordinate values are consistent
1365
+ * with cairo_move_to(), cairo_line_to(), cairo_curve_to(), and
1366
+ * cairo_close_path().
1367
+ *
1368
+ * Here is sample code for iterating through a #cairo_path_t:
1369
+ *
1370
+ * <informalexample><programlisting>
1371
+ * int i;
1372
+ * #cairo_path_t *path;
1373
+ * #cairo_path_data_t *data;
1374
+ * &nbsp;
1375
+ * path = cairo_copy_path (cr);
1376
+ * &nbsp;
1377
+ * for (i=0; i < path->num_data; i += path->data[i].header.length) {
1378
+ * data = &amp;path->data[i];
1379
+ * switch (data->header.type) {
1380
+ * case %CAIRO_PATH_MOVE_TO:
1381
+ * do_move_to_things (data[1].point.x, data[1].point.y);
1382
+ * break;
1383
+ * case %CAIRO_PATH_LINE_TO:
1384
+ * do_line_to_things (data[1].point.x, data[1].point.y);
1385
+ * break;
1386
+ * case %CAIRO_PATH_CURVE_TO:
1387
+ * do_curve_to_things (data[1].point.x, data[1].point.y,
1388
+ * data[2].point.x, data[2].point.y,
1389
+ * data[3].point.x, data[3].point.y);
1390
+ * break;
1391
+ * case %CAIRO_PATH_CLOSE_PATH:
1392
+ * do_close_path_things ();
1393
+ * break;
1394
+ * }
1395
+ * }
1396
+ * cairo_path_destroy (path);
1397
+ * </programlisting></informalexample>
1398
+ *
1399
+ * As of cairo 1.4, cairo does not mind if there are more elements in
1400
+ * a portion of the path than needed. Such elements can be used by
1401
+ * users of the cairo API to hold extra values in the path data
1402
+ * structure. For this reason, it is recommended that applications
1403
+ * always use <literal>data->header.length</literal> to
1404
+ * iterate over the path data, instead of hardcoding the number of
1405
+ * elements for each element type.
1406
+ **/
1407
+ typedef union _cairo_path_data_t cairo_path_data_t;
1408
+ union _cairo_path_data_t {
1409
+ struct {
1410
+ cairo_path_data_type_t type;
1411
+ int length;
1412
+ } header;
1413
+ struct {
1414
+ double x, y;
1415
+ } point;
1416
+ };
1417
+
1418
+ /**
1419
+ * cairo_path_t:
1420
+ * @status: the current error status
1421
+ * @data: the elements in the path
1422
+ * @num_data: the number of elements in the data array
1423
+ *
1424
+ * A data structure for holding a path. This data structure serves as
1425
+ * the return value for cairo_copy_path() and
1426
+ * cairo_copy_path_flat() as well the input value for
1427
+ * cairo_append_path().
1428
+ *
1429
+ * See #cairo_path_data_t for hints on how to iterate over the
1430
+ * actual data within the path.
1431
+ *
1432
+ * The num_data member gives the number of elements in the data
1433
+ * array. This number is larger than the number of independent path
1434
+ * portions (defined in #cairo_path_data_type_t), since the data
1435
+ * includes both headers and coordinates for each portion.
1436
+ **/
1437
+ typedef struct cairo_path {
1438
+ cairo_status_t status;
1439
+ cairo_path_data_t *data;
1440
+ int num_data;
1441
+ } cairo_path_t;
1442
+
1443
+ cairo_public cairo_path_t *
1444
+ cairo_copy_path (cairo_t *cr);
1445
+
1446
+ cairo_public cairo_path_t *
1447
+ cairo_copy_path_flat (cairo_t *cr);
1448
+
1449
+ cairo_public void
1450
+ cairo_append_path (cairo_t *cr,
1451
+ const cairo_path_t *path);
1452
+
1453
+ cairo_public void
1454
+ cairo_path_destroy (cairo_path_t *path);
1455
+
1456
+ /* Error status queries */
1457
+
1458
+ cairo_public cairo_status_t
1459
+ cairo_status (cairo_t *cr);
1460
+
1461
+ cairo_public const char *
1462
+ cairo_status_to_string (cairo_status_t status);
1463
+
1464
+ /* Surface manipulation */
1465
+
1466
+ cairo_public cairo_surface_t *
1467
+ cairo_surface_create_similar (cairo_surface_t *other,
1468
+ cairo_content_t content,
1469
+ int width,
1470
+ int height);
1471
+
1472
+ cairo_public cairo_surface_t *
1473
+ cairo_surface_reference (cairo_surface_t *surface);
1474
+
1475
+ cairo_public void
1476
+ cairo_surface_finish (cairo_surface_t *surface);
1477
+
1478
+ cairo_public void
1479
+ cairo_surface_destroy (cairo_surface_t *surface);
1480
+
1481
+ cairo_public unsigned int
1482
+ cairo_surface_get_reference_count (cairo_surface_t *surface);
1483
+
1484
+ cairo_public cairo_status_t
1485
+ cairo_surface_status (cairo_surface_t *surface);
1486
+
1487
+ /**
1488
+ * cairo_surface_type_t:
1489
+ * @CAIRO_SURFACE_TYPE_IMAGE: The surface is of type image
1490
+ * @CAIRO_SURFACE_TYPE_PDF: The surface is of type pdf
1491
+ * @CAIRO_SURFACE_TYPE_PS: The surface is of type ps
1492
+ * @CAIRO_SURFACE_TYPE_XLIB: The surface is of type xlib
1493
+ * @CAIRO_SURFACE_TYPE_XCB: The surface is of type xcb
1494
+ * @CAIRO_SURFACE_TYPE_GLITZ: The surface is of type glitz
1495
+ * @CAIRO_SURFACE_TYPE_QUARTZ: The surface is of type quartz
1496
+ * @CAIRO_SURFACE_TYPE_WIN32: The surface is of type win32
1497
+ * @CAIRO_SURFACE_TYPE_BEOS: The surface is of type beos
1498
+ * @CAIRO_SURFACE_TYPE_DIRECTFB: The surface is of type directfb
1499
+ * @CAIRO_SURFACE_TYPE_SVG: The surface is of type svg
1500
+ * @CAIRO_SURFACE_TYPE_OS2: The surface is of type os2
1501
+ * @CAIRO_SURFACE_TYPE_WIN32_PRINTING: The surface is a win32 printing surface
1502
+ * @CAIRO_SURFACE_TYPE_QUARTZ_IMAGE: The surface is of type quartz_image
1503
+ *
1504
+ * #cairo_surface_type_t is used to describe the type of a given
1505
+ * surface. The surface types are also known as "backends" or "surface
1506
+ * backends" within cairo.
1507
+ *
1508
+ * The type of a surface is determined by the function used to create
1509
+ * it, which will generally be of the form cairo_<emphasis>type</emphasis>_surface_create(),
1510
+ * (though see cairo_surface_create_similar() as well).
1511
+ *
1512
+ * The surface type can be queried with cairo_surface_get_type()
1513
+ *
1514
+ * The various #cairo_surface_t functions can be used with surfaces of
1515
+ * any type, but some backends also provide type-specific functions
1516
+ * that must only be called with a surface of the appropriate
1517
+ * type. These functions have names that begin with
1518
+ * cairo_<emphasis>type</emphasis>_surface such as cairo_image_surface_get_width().
1519
+ *
1520
+ * The behavior of calling a type-specific function with a surface of
1521
+ * the wrong type is undefined.
1522
+ *
1523
+ * New entries may be added in future versions.
1524
+ *
1525
+ * Since: 1.2
1526
+ **/
1527
+ typedef enum _cairo_surface_type {
1528
+ CAIRO_SURFACE_TYPE_IMAGE,
1529
+ CAIRO_SURFACE_TYPE_PDF,
1530
+ CAIRO_SURFACE_TYPE_PS,
1531
+ CAIRO_SURFACE_TYPE_XLIB,
1532
+ CAIRO_SURFACE_TYPE_XCB,
1533
+ CAIRO_SURFACE_TYPE_GLITZ,
1534
+ CAIRO_SURFACE_TYPE_QUARTZ,
1535
+ CAIRO_SURFACE_TYPE_WIN32,
1536
+ CAIRO_SURFACE_TYPE_BEOS,
1537
+ CAIRO_SURFACE_TYPE_DIRECTFB,
1538
+ CAIRO_SURFACE_TYPE_SVG,
1539
+ CAIRO_SURFACE_TYPE_OS2,
1540
+ CAIRO_SURFACE_TYPE_WIN32_PRINTING,
1541
+ CAIRO_SURFACE_TYPE_QUARTZ_IMAGE
1542
+ } cairo_surface_type_t;
1543
+
1544
+ cairo_public cairo_surface_type_t
1545
+ cairo_surface_get_type (cairo_surface_t *surface);
1546
+
1547
+ cairo_public cairo_content_t
1548
+ cairo_surface_get_content (cairo_surface_t *surface);
1549
+
1550
+ #if CAIRO_HAS_PNG_FUNCTIONS
1551
+
1552
+ cairo_public cairo_status_t
1553
+ cairo_surface_write_to_png (cairo_surface_t *surface,
1554
+ const char *filename);
1555
+
1556
+ cairo_public cairo_status_t
1557
+ cairo_surface_write_to_png_stream (cairo_surface_t *surface,
1558
+ cairo_write_func_t write_func,
1559
+ void *closure);
1560
+
1561
+ #endif
1562
+
1563
+ cairo_public void *
1564
+ cairo_surface_get_user_data (cairo_surface_t *surface,
1565
+ const cairo_user_data_key_t *key);
1566
+
1567
+ cairo_public cairo_status_t
1568
+ cairo_surface_set_user_data (cairo_surface_t *surface,
1569
+ const cairo_user_data_key_t *key,
1570
+ void *user_data,
1571
+ cairo_destroy_func_t destroy);
1572
+
1573
+ cairo_public void
1574
+ cairo_surface_get_font_options (cairo_surface_t *surface,
1575
+ cairo_font_options_t *options);
1576
+
1577
+ cairo_public void
1578
+ cairo_surface_flush (cairo_surface_t *surface);
1579
+
1580
+ cairo_public void
1581
+ cairo_surface_mark_dirty (cairo_surface_t *surface);
1582
+
1583
+ cairo_public void
1584
+ cairo_surface_mark_dirty_rectangle (cairo_surface_t *surface,
1585
+ int x,
1586
+ int y,
1587
+ int width,
1588
+ int height);
1589
+
1590
+ cairo_public void
1591
+ cairo_surface_set_device_offset (cairo_surface_t *surface,
1592
+ double x_offset,
1593
+ double y_offset);
1594
+
1595
+ cairo_public void
1596
+ cairo_surface_get_device_offset (cairo_surface_t *surface,
1597
+ double *x_offset,
1598
+ double *y_offset);
1599
+
1600
+ cairo_public void
1601
+ cairo_surface_set_fallback_resolution (cairo_surface_t *surface,
1602
+ double x_pixels_per_inch,
1603
+ double y_pixels_per_inch);
1604
+
1605
+ cairo_public void
1606
+ cairo_surface_copy_page (cairo_surface_t *surface);
1607
+
1608
+ cairo_public void
1609
+ cairo_surface_show_page (cairo_surface_t *surface);
1610
+
1611
+ /* Image-surface functions */
1612
+
1613
+ /**
1614
+ * cairo_format_t:
1615
+ * @CAIRO_FORMAT_ARGB32: each pixel is a 32-bit quantity, with
1616
+ * alpha in the upper 8 bits, then red, then green, then blue.
1617
+ * The 32-bit quantities are stored native-endian. Pre-multiplied
1618
+ * alpha is used. (That is, 50% transparent red is 0x80800000,
1619
+ * not 0x80ff0000.)
1620
+ * @CAIRO_FORMAT_RGB24: each pixel is a 32-bit quantity, with
1621
+ * the upper 8 bits unused. Red, Green, and Blue are stored
1622
+ * in the remaining 24 bits in that order.
1623
+ * @CAIRO_FORMAT_A8: each pixel is a 8-bit quantity holding
1624
+ * an alpha value.
1625
+ * @CAIRO_FORMAT_A1: each pixel is a 1-bit quantity holding
1626
+ * an alpha value. Pixels are packed together into 32-bit
1627
+ * quantities. The ordering of the bits matches the
1628
+ * endianess of the platform. On a big-endian machine, the
1629
+ * first pixel is in the uppermost bit, on a little-endian
1630
+ * machine the first pixel is in the least-significant bit.
1631
+ * @CAIRO_FORMAT_RGB16_565: This format value is deprecated. It has
1632
+ * never been properly implemented in cairo and should not be used
1633
+ * by applications. (since 1.2)
1634
+ *
1635
+ * #cairo_format_t is used to identify the memory format of
1636
+ * image data.
1637
+ *
1638
+ * New entries may be added in future versions.
1639
+ **/
1640
+ typedef enum _cairo_format {
1641
+ CAIRO_FORMAT_ARGB32,
1642
+ CAIRO_FORMAT_RGB24,
1643
+ CAIRO_FORMAT_A8,
1644
+ CAIRO_FORMAT_A1
1645
+ /* The value of 4 is reserved by a deprecated enum value.
1646
+ * The next format added must have an explicit value of 5.
1647
+ CAIRO_FORMAT_RGB16_565 = 4,
1648
+ */
1649
+ } cairo_format_t;
1650
+
1651
+ cairo_public cairo_surface_t *
1652
+ cairo_image_surface_create (cairo_format_t format,
1653
+ int width,
1654
+ int height);
1655
+
1656
+ cairo_public int
1657
+ cairo_format_stride_for_width (cairo_format_t format,
1658
+ int width);
1659
+
1660
+ cairo_public cairo_surface_t *
1661
+ cairo_image_surface_create_for_data (unsigned char *data,
1662
+ cairo_format_t format,
1663
+ int width,
1664
+ int height,
1665
+ int stride);
1666
+
1667
+ cairo_public unsigned char *
1668
+ cairo_image_surface_get_data (cairo_surface_t *surface);
1669
+
1670
+ cairo_public cairo_format_t
1671
+ cairo_image_surface_get_format (cairo_surface_t *surface);
1672
+
1673
+ cairo_public int
1674
+ cairo_image_surface_get_width (cairo_surface_t *surface);
1675
+
1676
+ cairo_public int
1677
+ cairo_image_surface_get_height (cairo_surface_t *surface);
1678
+
1679
+ cairo_public int
1680
+ cairo_image_surface_get_stride (cairo_surface_t *surface);
1681
+
1682
+ #if CAIRO_HAS_PNG_FUNCTIONS
1683
+
1684
+ cairo_public cairo_surface_t *
1685
+ cairo_image_surface_create_from_png (const char *filename);
1686
+
1687
+ cairo_public cairo_surface_t *
1688
+ cairo_image_surface_create_from_png_stream (cairo_read_func_t read_func,
1689
+ void *closure);
1690
+
1691
+ #endif
1692
+
1693
+ /* Pattern creation functions */
1694
+
1695
+ cairo_public cairo_pattern_t *
1696
+ cairo_pattern_create_rgb (double red, double green, double blue);
1697
+
1698
+ cairo_public cairo_pattern_t *
1699
+ cairo_pattern_create_rgba (double red, double green, double blue,
1700
+ double alpha);
1701
+
1702
+ cairo_public cairo_pattern_t *
1703
+ cairo_pattern_create_for_surface (cairo_surface_t *surface);
1704
+
1705
+ cairo_public cairo_pattern_t *
1706
+ cairo_pattern_create_linear (double x0, double y0,
1707
+ double x1, double y1);
1708
+
1709
+ cairo_public cairo_pattern_t *
1710
+ cairo_pattern_create_radial (double cx0, double cy0, double radius0,
1711
+ double cx1, double cy1, double radius1);
1712
+
1713
+ cairo_public cairo_pattern_t *
1714
+ cairo_pattern_reference (cairo_pattern_t *pattern);
1715
+
1716
+ cairo_public void
1717
+ cairo_pattern_destroy (cairo_pattern_t *pattern);
1718
+
1719
+ cairo_public unsigned int
1720
+ cairo_pattern_get_reference_count (cairo_pattern_t *pattern);
1721
+
1722
+ cairo_public cairo_status_t
1723
+ cairo_pattern_status (cairo_pattern_t *pattern);
1724
+
1725
+ cairo_public void *
1726
+ cairo_pattern_get_user_data (cairo_pattern_t *pattern,
1727
+ const cairo_user_data_key_t *key);
1728
+
1729
+ cairo_public cairo_status_t
1730
+ cairo_pattern_set_user_data (cairo_pattern_t *pattern,
1731
+ const cairo_user_data_key_t *key,
1732
+ void *user_data,
1733
+ cairo_destroy_func_t destroy);
1734
+
1735
+ /**
1736
+ * cairo_pattern_type_t:
1737
+ * @CAIRO_PATTERN_TYPE_SOLID: The pattern is a solid (uniform)
1738
+ * color. It may be opaque or translucent.
1739
+ * @CAIRO_PATTERN_TYPE_SURFACE: The pattern is a based on a surface (an image).
1740
+ * @CAIRO_PATTERN_TYPE_LINEAR: The pattern is a linear gradient.
1741
+ * @CAIRO_PATTERN_TYPE_RADIAL: The pattern is a radial gradient.
1742
+ *
1743
+ * #cairo_pattern_type_t is used to describe the type of a given pattern.
1744
+ *
1745
+ * The type of a pattern is determined by the function used to create
1746
+ * it. The cairo_pattern_create_rgb() and cairo_pattern_create_rgba()
1747
+ * functions create SOLID patterns. The remaining
1748
+ * cairo_pattern_create functions map to pattern types in obvious
1749
+ * ways.
1750
+ *
1751
+ * The pattern type can be queried with cairo_pattern_get_type()
1752
+ *
1753
+ * Most #cairo_pattern_t functions can be called with a pattern of any
1754
+ * type, (though trying to change the extend or filter for a solid
1755
+ * pattern will have no effect). A notable exception is
1756
+ * cairo_pattern_add_color_stop_rgb() and
1757
+ * cairo_pattern_add_color_stop_rgba() which must only be called with
1758
+ * gradient patterns (either LINEAR or RADIAL). Otherwise the pattern
1759
+ * will be shutdown and put into an error state.
1760
+ *
1761
+ * New entries may be added in future versions.
1762
+ *
1763
+ * Since: 1.2
1764
+ **/
1765
+ typedef enum _cairo_pattern_type {
1766
+ CAIRO_PATTERN_TYPE_SOLID,
1767
+ CAIRO_PATTERN_TYPE_SURFACE,
1768
+ CAIRO_PATTERN_TYPE_LINEAR,
1769
+ CAIRO_PATTERN_TYPE_RADIAL
1770
+ } cairo_pattern_type_t;
1771
+
1772
+ cairo_public cairo_pattern_type_t
1773
+ cairo_pattern_get_type (cairo_pattern_t *pattern);
1774
+
1775
+ cairo_public void
1776
+ cairo_pattern_add_color_stop_rgb (cairo_pattern_t *pattern,
1777
+ double offset,
1778
+ double red, double green, double blue);
1779
+
1780
+ cairo_public void
1781
+ cairo_pattern_add_color_stop_rgba (cairo_pattern_t *pattern,
1782
+ double offset,
1783
+ double red, double green, double blue,
1784
+ double alpha);
1785
+
1786
+ cairo_public void
1787
+ cairo_pattern_set_matrix (cairo_pattern_t *pattern,
1788
+ const cairo_matrix_t *matrix);
1789
+
1790
+ cairo_public void
1791
+ cairo_pattern_get_matrix (cairo_pattern_t *pattern,
1792
+ cairo_matrix_t *matrix);
1793
+
1794
+ /**
1795
+ * cairo_extend_t:
1796
+ * @CAIRO_EXTEND_NONE: pixels outside of the source pattern
1797
+ * are fully transparent
1798
+ * @CAIRO_EXTEND_REPEAT: the pattern is tiled by repeating
1799
+ * @CAIRO_EXTEND_REFLECT: the pattern is tiled by reflecting
1800
+ * at the edges (Implemented for surface patterns since 1.6)
1801
+ * @CAIRO_EXTEND_PAD: pixels outside of the pattern copy
1802
+ * the closest pixel from the source (Since 1.2; but only
1803
+ * implemented for surface patterns since 1.6)
1804
+ *
1805
+ * #cairo_extend_t is used to describe how pattern color/alpha will be
1806
+ * determined for areas "outside" the pattern's natural area, (for
1807
+ * example, outside the surface bounds or outside the gradient
1808
+ * geometry).
1809
+ *
1810
+ * The default extend mode is %CAIRO_EXTEND_NONE for surface patterns
1811
+ * and %CAIRO_EXTEND_PAD for gradient patterns.
1812
+ *
1813
+ * New entries may be added in future versions.
1814
+ **/
1815
+ typedef enum _cairo_extend {
1816
+ CAIRO_EXTEND_NONE,
1817
+ CAIRO_EXTEND_REPEAT,
1818
+ CAIRO_EXTEND_REFLECT,
1819
+ CAIRO_EXTEND_PAD
1820
+ } cairo_extend_t;
1821
+
1822
+ cairo_public void
1823
+ cairo_pattern_set_extend (cairo_pattern_t *pattern, cairo_extend_t extend);
1824
+
1825
+ cairo_public cairo_extend_t
1826
+ cairo_pattern_get_extend (cairo_pattern_t *pattern);
1827
+
1828
+ /**
1829
+ * cairo_filter_t:
1830
+ * @CAIRO_FILTER_FAST: A high-performance filter, with quality similar
1831
+ * to %CAIRO_FILTER_NEAREST
1832
+ * @CAIRO_FILTER_GOOD: A reasonable-performance filter, with quality
1833
+ * similar to %CAIRO_FILTER_BILINEAR
1834
+ * @CAIRO_FILTER_BEST: The highest-quality available, performance may
1835
+ * not be suitable for interactive use.
1836
+ * @CAIRO_FILTER_NEAREST: Nearest-neighbor filtering
1837
+ * @CAIRO_FILTER_BILINEAR: Linear interpolation in two dimensions
1838
+ * @CAIRO_FILTER_GAUSSIAN: This filter value is currently
1839
+ * unimplemented, and should not be used in current code.
1840
+ *
1841
+ * #cairo_filter_t is used to indicate what filtering should be
1842
+ * applied when reading pixel values from patterns. See
1843
+ * cairo_pattern_set_source() for indicating the desired filter to be
1844
+ * used with a particular pattern.
1845
+ */
1846
+ typedef enum _cairo_filter {
1847
+ CAIRO_FILTER_FAST,
1848
+ CAIRO_FILTER_GOOD,
1849
+ CAIRO_FILTER_BEST,
1850
+ CAIRO_FILTER_NEAREST,
1851
+ CAIRO_FILTER_BILINEAR,
1852
+ CAIRO_FILTER_GAUSSIAN
1853
+ } cairo_filter_t;
1854
+
1855
+ cairo_public void
1856
+ cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter);
1857
+
1858
+ cairo_public cairo_filter_t
1859
+ cairo_pattern_get_filter (cairo_pattern_t *pattern);
1860
+
1861
+ cairo_public cairo_status_t
1862
+ cairo_pattern_get_rgba (cairo_pattern_t *pattern,
1863
+ double *red, double *green,
1864
+ double *blue, double *alpha);
1865
+
1866
+ cairo_public cairo_status_t
1867
+ cairo_pattern_get_surface (cairo_pattern_t *pattern,
1868
+ cairo_surface_t **surface);
1869
+
1870
+
1871
+ cairo_public cairo_status_t
1872
+ cairo_pattern_get_color_stop_rgba (cairo_pattern_t *pattern,
1873
+ int index, double *offset,
1874
+ double *red, double *green,
1875
+ double *blue, double *alpha);
1876
+
1877
+ cairo_public cairo_status_t
1878
+ cairo_pattern_get_color_stop_count (cairo_pattern_t *pattern,
1879
+ int *count);
1880
+
1881
+ cairo_public cairo_status_t
1882
+ cairo_pattern_get_linear_points (cairo_pattern_t *pattern,
1883
+ double *x0, double *y0,
1884
+ double *x1, double *y1);
1885
+
1886
+ cairo_public cairo_status_t
1887
+ cairo_pattern_get_radial_circles (cairo_pattern_t *pattern,
1888
+ double *x0, double *y0, double *r0,
1889
+ double *x1, double *y1, double *r1);
1890
+
1891
+ /* Matrix functions */
1892
+
1893
+ cairo_public void
1894
+ cairo_matrix_init (cairo_matrix_t *matrix,
1895
+ double xx, double yx,
1896
+ double xy, double yy,
1897
+ double x0, double y0);
1898
+
1899
+ cairo_public void
1900
+ cairo_matrix_init_identity (cairo_matrix_t *matrix);
1901
+
1902
+ cairo_public void
1903
+ cairo_matrix_init_translate (cairo_matrix_t *matrix,
1904
+ double tx, double ty);
1905
+
1906
+ cairo_public void
1907
+ cairo_matrix_init_scale (cairo_matrix_t *matrix,
1908
+ double sx, double sy);
1909
+
1910
+ cairo_public void
1911
+ cairo_matrix_init_rotate (cairo_matrix_t *matrix,
1912
+ double radians);
1913
+
1914
+ cairo_public void
1915
+ cairo_matrix_translate (cairo_matrix_t *matrix, double tx, double ty);
1916
+
1917
+ cairo_public void
1918
+ cairo_matrix_scale (cairo_matrix_t *matrix, double sx, double sy);
1919
+
1920
+ cairo_public void
1921
+ cairo_matrix_rotate (cairo_matrix_t *matrix, double radians);
1922
+
1923
+ cairo_public cairo_status_t
1924
+ cairo_matrix_invert (cairo_matrix_t *matrix);
1925
+
1926
+ cairo_public void
1927
+ cairo_matrix_multiply (cairo_matrix_t *result,
1928
+ const cairo_matrix_t *a,
1929
+ const cairo_matrix_t *b);
1930
+
1931
+ cairo_public void
1932
+ cairo_matrix_transform_distance (const cairo_matrix_t *matrix,
1933
+ double *dx, double *dy);
1934
+
1935
+ cairo_public void
1936
+ cairo_matrix_transform_point (const cairo_matrix_t *matrix,
1937
+ double *x, double *y);
1938
+
1939
+ /* Functions to be used while debugging (not intended for use in production code) */
1940
+ cairo_public void
1941
+ cairo_debug_reset_static_data (void);
1942
+
1943
+ CAIRO_END_DECLS
1944
+
1945
+ #endif /* CAIRO_H */