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,2795 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
+ <title>cairo_t</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
+ <link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
8
+ <link rel="up" href="Drawing.html" title="Drawing">
9
+ <link rel="prev" href="Drawing.html" title="Drawing">
10
+ <link rel="next" href="cairo-Paths.html" title="Paths">
11
+ <meta name="generator" content="GTK-Doc V1.9 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ <link rel="chapter" href="Drawing.html" title="Drawing">
14
+ <link rel="chapter" href="Fonts.html" title="Fonts">
15
+ <link rel="chapter" href="Surfaces.html" title="Surfaces">
16
+ <link rel="chapter" href="Support.html" title="Utilities">
17
+ <link rel="index" href="ix01.html" title="Index">
18
+ <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
19
+ <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
20
+ <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
21
+ <link rel="appendix" href="language-bindings.html" title="Appendix&#160;A.&#160;Creating a language binding for cairo">
22
+ </head>
23
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
24
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
25
+ <tr valign="middle">
26
+ <td><a accesskey="p" href="Drawing.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
27
+ <td><a accesskey="u" href="Drawing.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
28
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
29
+ <th width="100%" align="center">Cairo: A Vector Graphics Library</th>
30
+ <td><a accesskey="n" href="cairo-Paths.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
+ </tr>
32
+ <tr><td colspan="5" class="shortcuts"><nobr><a href="#id2592058" class="shortcut">Top</a>
33
+ &#160;|&#160;
34
+ <a href="#id2631395" class="shortcut">Description</a></nobr></td></tr>
35
+ </table>
36
+ <div class="refentry" lang="en">
37
+ <a name="cairo-cairo-t"></a><div class="titlepage"></div>
38
+ <div class="refnamediv"><table width="100%"><tr>
39
+ <td valign="top">
40
+ <h2>
41
+ <a name="id2592058"></a><span class="refentrytitle">cairo_t</span>
42
+ </h2>
43
+ <p>cairo_t &#8212; The cairo drawing context</p>
44
+ </td>
45
+ <td valign="top" align="right"></td>
46
+ </tr></table></div>
47
+ <div class="refsynopsisdiv">
48
+ <h2>Synopsis</h2>
49
+ <pre class="synopsis">
50
+
51
+
52
+
53
+ typedef <a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a>;
54
+ <a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a>* <a class="link" href="cairo-cairo-t.html#cairo-create">cairo_create</a> (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *target);
55
+ <a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a>* <a class="link" href="cairo-cairo-t.html#cairo-reference">cairo_reference</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
56
+ void <a class="link" href="cairo-cairo-t.html#cairo-destroy">cairo_destroy</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
57
+ <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-cairo-t.html#cairo-status">cairo_status</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
58
+ void <a class="link" href="cairo-cairo-t.html#cairo-save">cairo_save</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
59
+ void <a class="link" href="cairo-cairo-t.html#cairo-restore">cairo_restore</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
60
+ <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* <a class="link" href="cairo-cairo-t.html#cairo-get-target">cairo_get_target</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
61
+ void <a class="link" href="cairo-cairo-t.html#cairo-push-group">cairo_push_group</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
62
+ void <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content">cairo_push_group_with_content</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
63
+ <a class="link" href="cairo-cairo-surface-t.html#cairo-content-t">cairo_content_t</a> content);
64
+ <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* <a class="link" href="cairo-cairo-t.html#cairo-pop-group">cairo_pop_group</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
65
+ void <a class="link" href="cairo-cairo-t.html#cairo-pop-group-to-source">cairo_pop_group_to_source</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
66
+ <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* <a class="link" href="cairo-cairo-t.html#cairo-get-group-target">cairo_get_group_target</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
67
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgb">cairo_set_source_rgb</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
68
+ double red,
69
+ double green,
70
+ double blue);
71
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgba">cairo_set_source_rgba</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
72
+ double red,
73
+ double green,
74
+ double blue,
75
+ double alpha);
76
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-source">cairo_set_source</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
77
+ <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *source);
78
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-source-surface">cairo_set_source_surface</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
79
+ <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,
80
+ double x,
81
+ double y);
82
+ <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* <a class="link" href="cairo-cairo-t.html#cairo-get-source">cairo_get_source</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
83
+ enum <a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a>;
84
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-antialias">cairo_set_antialias</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
85
+ <a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> antialias);
86
+ <a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> <a class="link" href="cairo-cairo-t.html#cairo-get-antialias">cairo_get_antialias</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
87
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-dash">cairo_set_dash</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
88
+ const double *dashes,
89
+ int num_dashes,
90
+ double offset);
91
+ int <a class="link" href="cairo-cairo-t.html#cairo-get-dash-count">cairo_get_dash_count</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
92
+ void <a class="link" href="cairo-cairo-t.html#cairo-get-dash">cairo_get_dash</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
93
+ double *dashes,
94
+ double *offset);
95
+ enum <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t">cairo_fill_rule_t</a>;
96
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule">cairo_set_fill_rule</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
97
+ <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t">cairo_fill_rule_t</a> fill_rule);
98
+ <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t">cairo_fill_rule_t</a> <a class="link" href="cairo-cairo-t.html#cairo-get-fill-rule">cairo_get_fill_rule</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
99
+ enum <a class="link" href="cairo-cairo-t.html#cairo-line-cap-t">cairo_line_cap_t</a>;
100
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap">cairo_set_line_cap</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
101
+ <a class="link" href="cairo-cairo-t.html#cairo-line-cap-t">cairo_line_cap_t</a> line_cap);
102
+ <a class="link" href="cairo-cairo-t.html#cairo-line-cap-t">cairo_line_cap_t</a> <a class="link" href="cairo-cairo-t.html#cairo-get-line-cap">cairo_get_line_cap</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
103
+ enum <a class="link" href="cairo-cairo-t.html#cairo-line-join-t">cairo_line_join_t</a>;
104
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-line-join">cairo_set_line_join</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
105
+ <a class="link" href="cairo-cairo-t.html#cairo-line-join-t">cairo_line_join_t</a> line_join);
106
+ <a class="link" href="cairo-cairo-t.html#cairo-line-join-t">cairo_line_join_t</a> <a class="link" href="cairo-cairo-t.html#cairo-get-line-join">cairo_get_line_join</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
107
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-line-width">cairo_set_line_width</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
108
+ double width);
109
+ double <a class="link" href="cairo-cairo-t.html#cairo-get-line-width">cairo_get_line_width</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
110
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-miter-limit">cairo_set_miter_limit</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
111
+ double limit);
112
+ double <a class="link" href="cairo-cairo-t.html#cairo-get-miter-limit">cairo_get_miter_limit</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
113
+ enum <a class="link" href="cairo-cairo-t.html#cairo-operator-t">cairo_operator_t</a>;
114
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-operator">cairo_set_operator</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
115
+ <a class="link" href="cairo-cairo-t.html#cairo-operator-t">cairo_operator_t</a> op);
116
+ <a class="link" href="cairo-cairo-t.html#cairo-operator-t">cairo_operator_t</a> <a class="link" href="cairo-cairo-t.html#cairo-get-operator">cairo_get_operator</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
117
+ void <a class="link" href="cairo-cairo-t.html#cairo-set-tolerance">cairo_set_tolerance</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
118
+ double tolerance);
119
+ double <a class="link" href="cairo-cairo-t.html#cairo-get-tolerance">cairo_get_tolerance</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
120
+ void <a class="link" href="cairo-cairo-t.html#cairo-clip">cairo_clip</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
121
+ void <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve">cairo_clip_preserve</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
122
+ void <a class="link" href="cairo-cairo-t.html#cairo-clip-extents">cairo_clip_extents</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
123
+ double *x1,
124
+ double *y1,
125
+ double *x2,
126
+ double *y2);
127
+ void <a class="link" href="cairo-cairo-t.html#cairo-reset-clip">cairo_reset_clip</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
128
+ <a class="link" href="cairo-cairo-t.html#cairo-rectangle-t">cairo_rectangle_t</a>;
129
+ <a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t">cairo_rectangle_list_t</a>;
130
+ void <a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-destroy">cairo_rectangle_list_destroy</a> (<a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t">cairo_rectangle_list_t</a> *rectangle_list);
131
+ <a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t">cairo_rectangle_list_t</a>* <a class="link" href="cairo-cairo-t.html#cairo-copy-clip-rectangle-list">cairo_copy_clip_rectangle_list</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
132
+ void <a class="link" href="cairo-cairo-t.html#cairo-fill">cairo_fill</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
133
+ void <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve">cairo_fill_preserve</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
134
+ void <a class="link" href="cairo-cairo-t.html#cairo-fill-extents">cairo_fill_extents</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
135
+ double *x1,
136
+ double *y1,
137
+ double *x2,
138
+ double *y2);
139
+ <a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> <a class="link" href="cairo-cairo-t.html#cairo-in-fill">cairo_in_fill</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
140
+ double x,
141
+ double y);
142
+ void <a class="link" href="cairo-cairo-t.html#cairo-mask">cairo_mask</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
143
+ <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);
144
+ void <a class="link" href="cairo-cairo-t.html#cairo-mask-surface">cairo_mask_surface</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
145
+ <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,
146
+ double surface_x,
147
+ double surface_y);
148
+ void <a class="link" href="cairo-cairo-t.html#cairo-paint">cairo_paint</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
149
+ void <a class="link" href="cairo-cairo-t.html#cairo-paint-with-alpha">cairo_paint_with_alpha</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
150
+ double alpha);
151
+ void <a class="link" href="cairo-cairo-t.html#cairo-stroke">cairo_stroke</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
152
+ void <a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve">cairo_stroke_preserve</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
153
+ void <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents">cairo_stroke_extents</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
154
+ double *x1,
155
+ double *y1,
156
+ double *x2,
157
+ double *y2);
158
+ <a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> <a class="link" href="cairo-cairo-t.html#cairo-in-stroke">cairo_in_stroke</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
159
+ double x,
160
+ double y);
161
+ void <a class="link" href="cairo-cairo-t.html#cairo-copy-page">cairo_copy_page</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
162
+ void <a class="link" href="cairo-cairo-t.html#cairo-show-page">cairo_show_page</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
163
+ unsigned int <a class="link" href="cairo-cairo-t.html#cairo-get-reference-count">cairo_get_reference_count</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
164
+ <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-cairo-t.html#cairo-set-user-data">cairo_set_user_data</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
165
+ const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key,
166
+ void *user_data,
167
+ <a class="link" href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);
168
+ void* <a class="link" href="cairo-cairo-t.html#cairo-get-user-data">cairo_get_user_data</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
169
+ const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);
170
+
171
+ </pre>
172
+ </div>
173
+ <div class="refsect1" lang="en">
174
+ <a name="id2631395"></a><h2>Description</h2>
175
+ <p>
176
+ <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> is the main object used when drawing with cairo. To
177
+ draw with cairo, you create a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>, set the target surface,
178
+ and drawing options for the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>, create shapes with
179
+ functions like <a class="link" href="cairo-Paths.html#cairo-move-to"><code class="function">cairo_move_to()</code></a> and <a class="link" href="cairo-Paths.html#cairo-line-to"><code class="function">cairo_line_to()</code></a>, and then
180
+ draw shapes with <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a>.
181
+ </p>
182
+ <p>
183
+ <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>'s can be pushed to a stack via <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a>.
184
+ They may then safely be changed, without loosing the current state.
185
+ Use <a class="link" href="cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a> to restore to the saved state.
186
+ </p>
187
+ </div>
188
+ <div class="refsect1" lang="en">
189
+ <a name="id2631506"></a><h2>Details</h2>
190
+ <div class="refsect2" lang="en">
191
+ <a name="id2631516"></a><h3>
192
+ <a name="cairo-t"></a>cairo_t</h3>
193
+ <a class="indexterm" name="id2631528"></a><pre class="programlisting">typedef struct _cairo cairo_t;
194
+ </pre>
195
+ <p>
196
+ A <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> contains the current state of the rendering device,
197
+ including coordinates of yet to be drawn shapes.
198
+ </p>
199
+ <p>
200
+ Cairo contexts, as <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> objects are named, are central to
201
+ cairo and all drawing with cairo is always done to a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
202
+ object.
203
+ </p>
204
+ <p>
205
+ Memory management of <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> is done with
206
+ <a class="link" href="cairo-cairo-t.html#cairo-reference"><code class="function">cairo_reference()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-destroy"><code class="function">cairo_destroy()</code></a>.</p>
207
+ <p>
208
+
209
+ </p>
210
+ </div>
211
+ <hr>
212
+ <div class="refsect2" lang="en">
213
+ <a name="id2631606"></a><h3>
214
+ <a name="cairo-create"></a>cairo_create ()</h3>
215
+ <a class="indexterm" name="id2631618"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a>* cairo_create (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *target);</pre>
216
+ <p>
217
+ Creates a new <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> with all graphics state parameters set to
218
+ default values and with <em class="parameter"><code>target</code></em> as a target surface. The target
219
+ surface should be constructed with a backend-specific function such
220
+ as <a class="link" href="cairo-Image-Surfaces.html#cairo-image-surface-create"><code class="function">cairo_image_surface_create()</code></a> (or any other
221
+ cairo_<span class="emphasis"><em>backend</em></span>_surface_create variant).
222
+ </p>
223
+ <p>
224
+ This function references <em class="parameter"><code>target</code></em>, so you can immediately
225
+ call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy"><code class="function">cairo_surface_destroy()</code></a> on it if you don't need to
226
+ maintain a separate reference to it.</p>
227
+ <p>
228
+
229
+ </p>
230
+ <div class="variablelist"><table border="0">
231
+ <col align="left" valign="top">
232
+ <tbody>
233
+ <tr>
234
+ <td><p><span class="term"><em class="parameter"><code>target</code></em>&#160;:</span></p></td>
235
+ <td> target surface for the context
236
+ </td>
237
+ </tr>
238
+ <tr>
239
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
240
+ <td> a newly allocated <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> with a reference
241
+ count of 1. The initial reference count should be released
242
+ with <a class="link" href="cairo-cairo-t.html#cairo-destroy"><code class="function">cairo_destroy()</code></a> when you are done using the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>.
243
+ This function never returns <code class="literal">NULL</code>. If memory cannot be
244
+ allocated, a special <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> object will be returned on
245
+ which <a class="link" href="cairo-cairo-t.html#cairo-status"><code class="function">cairo_status()</code></a> returns <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.
246
+ You can use this object normally, but no drawing will
247
+ be done.
248
+ </td>
249
+ </tr>
250
+ </tbody>
251
+ </table></div>
252
+ </div>
253
+ <hr>
254
+ <div class="refsect2" lang="en">
255
+ <a name="id2631790"></a><h3>
256
+ <a name="cairo-reference"></a>cairo_reference ()</h3>
257
+ <a class="indexterm" name="id2631802"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a>* cairo_reference (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
258
+ <p>
259
+ Increases the reference count on <em class="parameter"><code>cr</code></em> by one. This prevents
260
+ <em class="parameter"><code>cr</code></em> from being destroyed until a matching call to <a class="link" href="cairo-cairo-t.html#cairo-destroy"><code class="function">cairo_destroy()</code></a>
261
+ is made.
262
+ </p>
263
+ <p>
264
+ The number of references to a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> can be get using
265
+ <a class="link" href="cairo-cairo-t.html#cairo-get-reference-count"><code class="function">cairo_get_reference_count()</code></a>.</p>
266
+ <p>
267
+
268
+ </p>
269
+ <div class="variablelist"><table border="0">
270
+ <col align="left" valign="top">
271
+ <tbody>
272
+ <tr>
273
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
274
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
275
+ </td>
276
+ </tr>
277
+ <tr>
278
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
279
+ <td> the referenced <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>.
280
+ </td>
281
+ </tr>
282
+ </tbody>
283
+ </table></div>
284
+ </div>
285
+ <hr>
286
+ <div class="refsect2" lang="en">
287
+ <a name="id2631919"></a><h3>
288
+ <a name="cairo-destroy"></a>cairo_destroy ()</h3>
289
+ <a class="indexterm" name="id2631932"></a><pre class="programlisting">void cairo_destroy (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
290
+ <p>
291
+ Decreases the reference count on <em class="parameter"><code>cr</code></em> by one. If the result
292
+ is zero, then <em class="parameter"><code>cr</code></em> and all associated resources are freed.
293
+ See <a class="link" href="cairo-cairo-t.html#cairo-reference"><code class="function">cairo_reference()</code></a>.</p>
294
+ <p>
295
+
296
+ </p>
297
+ <div class="variablelist"><table border="0">
298
+ <col align="left" valign="top">
299
+ <tbody><tr>
300
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
301
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
302
+ </td>
303
+ </tr></tbody>
304
+ </table></div>
305
+ </div>
306
+ <hr>
307
+ <div class="refsect2" lang="en">
308
+ <a name="id2632011"></a><h3>
309
+ <a name="cairo-status"></a>cairo_status ()</h3>
310
+ <a class="indexterm" name="id2632024"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_status (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
311
+ <p>
312
+ Checks whether an error has previously occurred for this context.</p>
313
+ <p>
314
+
315
+ </p>
316
+ <div class="variablelist"><table border="0">
317
+ <col align="left" valign="top">
318
+ <tbody>
319
+ <tr>
320
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
321
+ <td> a cairo context
322
+ </td>
323
+ </tr>
324
+ <tr>
325
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
326
+ <td> the current status of this context, see <a class="link" href="cairo-Error-Handling.html#cairo-status-t"><span class="type">cairo_status_t</span></a>
327
+ </td>
328
+ </tr>
329
+ </tbody>
330
+ </table></div>
331
+ </div>
332
+ <hr>
333
+ <div class="refsect2" lang="en">
334
+ <a name="id2632091"></a><h3>
335
+ <a name="cairo-save"></a>cairo_save ()</h3>
336
+ <a class="indexterm" name="id2632104"></a><pre class="programlisting">void cairo_save (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
337
+ <p>
338
+ Makes a copy of the current state of <em class="parameter"><code>cr</code></em> and saves it
339
+ on an internal stack of saved states for <em class="parameter"><code>cr</code></em>. When
340
+ <a class="link" href="cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a> is called, <em class="parameter"><code>cr</code></em> will be restored to
341
+ the saved state. Multiple calls to <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> and
342
+ <a class="link" href="cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a> can be nested; each call to <a class="link" href="cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a>
343
+ restores the state from the matching paired <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a>.
344
+ </p>
345
+ <p>
346
+ It isn't necessary to clear all saved states before
347
+ a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> is freed. If the reference count of a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
348
+ drops to zero in response to a call to <a class="link" href="cairo-cairo-t.html#cairo-destroy"><code class="function">cairo_destroy()</code></a>,
349
+ any saved states will be freed along with the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>.</p>
350
+ <p>
351
+
352
+ </p>
353
+ <div class="variablelist"><table border="0">
354
+ <col align="left" valign="top">
355
+ <tbody><tr>
356
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
357
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
358
+ </td>
359
+ </tr></tbody>
360
+ </table></div>
361
+ </div>
362
+ <hr>
363
+ <div class="refsect2" lang="en">
364
+ <a name="id2632266"></a><h3>
365
+ <a name="cairo-restore"></a>cairo_restore ()</h3>
366
+ <a class="indexterm" name="id2632279"></a><pre class="programlisting">void cairo_restore (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
367
+ <p>
368
+ Restores <em class="parameter"><code>cr</code></em> to the state saved by a preceding call to
369
+ <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> and removes that state from the stack of
370
+ saved states.</p>
371
+ <p>
372
+
373
+ </p>
374
+ <div class="variablelist"><table border="0">
375
+ <col align="left" valign="top">
376
+ <tbody><tr>
377
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
378
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
379
+ </td>
380
+ </tr></tbody>
381
+ </table></div>
382
+ </div>
383
+ <hr>
384
+ <div class="refsect2" lang="en">
385
+ <a name="id2632353"></a><h3>
386
+ <a name="cairo-get-target"></a>cairo_get_target ()</h3>
387
+ <a class="indexterm" name="id2632365"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_get_target (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
388
+ <p>
389
+ Gets the target surface for the cairo context as passed to
390
+ <a class="link" href="cairo-cairo-t.html#cairo-create"><code class="function">cairo_create()</code></a>.
391
+ </p>
392
+ <p>
393
+ This function will always return a valid pointer, but the result
394
+ can be a "nil" surface if <em class="parameter"><code>cr</code></em> is already in an error state,
395
+ (ie. <a class="link" href="cairo-cairo-t.html#cairo-status"><code class="function">cairo_status()</code></a> <code class="literal">!=</code> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>).
396
+ A nil surface is indicated by <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status"><code class="function">cairo_surface_status()</code></a>
397
+ <code class="literal">!=</code> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.</p>
398
+ <p>
399
+
400
+ </p>
401
+ <div class="variablelist"><table border="0">
402
+ <col align="left" valign="top">
403
+ <tbody>
404
+ <tr>
405
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
406
+ <td> a cairo context
407
+ </td>
408
+ </tr>
409
+ <tr>
410
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
411
+ <td> the target surface. This object is owned by cairo. To
412
+ keep a reference to it, you must call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference"><code class="function">cairo_surface_reference()</code></a>.
413
+ </td>
414
+ </tr>
415
+ </tbody>
416
+ </table></div>
417
+ </div>
418
+ <hr>
419
+ <div class="refsect2" lang="en">
420
+ <a name="id2632486"></a><h3>
421
+ <a name="cairo-push-group"></a>cairo_push_group ()</h3>
422
+ <a class="indexterm" name="id2632498"></a><pre class="programlisting">void cairo_push_group (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
423
+ <p>
424
+ Temporarily redirects drawing to an intermediate surface known as a
425
+ group. The redirection lasts until the group is completed by a call
426
+ to <a class="link" href="cairo-cairo-t.html#cairo-pop-group"><code class="function">cairo_pop_group()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-pop-group-to-source"><code class="function">cairo_pop_group_to_source()</code></a>. These calls
427
+ provide the result of any drawing to the group as a pattern,
428
+ (either as an explicit object, or set as the source pattern).
429
+ </p>
430
+ <p>
431
+ This group functionality can be convenient for performing
432
+ intermediate compositing. One common use of a group is to render
433
+ objects as opaque within the group, (so that they occlude each
434
+ other), and then blend the result with translucence onto the
435
+ destination.
436
+ </p>
437
+ <p>
438
+ Groups can be nested arbitrarily deep by making balanced calls to
439
+ <a class="link" href="cairo-cairo-t.html#cairo-push-group"><code class="function">cairo_push_group()</code></a>/<a class="link" href="cairo-cairo-t.html#cairo-pop-group"><code class="function">cairo_pop_group()</code></a>. Each call pushes/pops the new
440
+ target group onto/from a stack.
441
+ </p>
442
+ <p>
443
+ The <a class="link" href="cairo-cairo-t.html#cairo-push-group"><code class="function">cairo_push_group()</code></a> function calls <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> so that any
444
+ changes to the graphics state will not be visible outside the
445
+ group, (the pop_group functions call <a class="link" href="cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a>).
446
+ </p>
447
+ <p>
448
+ By default the intermediate group will have a content type of
449
+ CAIRO_CONTENT_COLOR_ALPHA. Other content types can be chosen for
450
+ the group by using <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content"><code class="function">cairo_push_group_with_content()</code></a> instead.
451
+ </p>
452
+ <p>
453
+ As an example, here is how one might fill and stroke a path with
454
+ translucence, but without any portion of the fill being visible
455
+ under the stroke:
456
+ </p>
457
+ <p>
458
+ </p>
459
+ <div class="informalexample"><pre class="programlisting">
460
+ cairo_push_group (cr);
461
+ cairo_set_source (cr, fill_pattern);
462
+ cairo_fill_preserve (cr);
463
+ cairo_set_source (cr, stroke_pattern);
464
+ cairo_stroke (cr);
465
+ cairo_pop_group_to_source (cr);
466
+ cairo_paint_with_alpha (cr, alpha);
467
+ </pre></div>
468
+ <p>
469
+
470
+ </p>
471
+ <div class="variablelist"><table border="0">
472
+ <col align="left" valign="top">
473
+ <tbody><tr>
474
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
475
+ <td> a cairo context
476
+ </td>
477
+ </tr></tbody>
478
+ </table></div>
479
+ <p class="since">Since 1.2
480
+ </p>
481
+ </div>
482
+ <hr>
483
+ <div class="refsect2" lang="en">
484
+ <a name="id2632663"></a><h3>
485
+ <a name="cairo-push-group-with-content"></a>cairo_push_group_with_content ()</h3>
486
+ <a class="indexterm" name="id2632678"></a><pre class="programlisting">void cairo_push_group_with_content (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
487
+ <a class="link" href="cairo-cairo-surface-t.html#cairo-content-t">cairo_content_t</a> content);</pre>
488
+ <p>
489
+ Temporarily redirects drawing to an intermediate surface known as a
490
+ group. The redirection lasts until the group is completed by a call
491
+ to <a class="link" href="cairo-cairo-t.html#cairo-pop-group"><code class="function">cairo_pop_group()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-pop-group-to-source"><code class="function">cairo_pop_group_to_source()</code></a>. These calls
492
+ provide the result of any drawing to the group as a pattern,
493
+ (either as an explicit object, or set as the source pattern).
494
+ </p>
495
+ <p>
496
+ The group will have a content type of <em class="parameter"><code>content</code></em>. The ability to
497
+ control this content type is the only distinction between this
498
+ function and <a class="link" href="cairo-cairo-t.html#cairo-push-group"><code class="function">cairo_push_group()</code></a> which you should see for a more
499
+ detailed description of group rendering.</p>
500
+ <p>
501
+
502
+ </p>
503
+ <div class="variablelist"><table border="0">
504
+ <col align="left" valign="top">
505
+ <tbody>
506
+ <tr>
507
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
508
+ <td> a cairo context
509
+ </td>
510
+ </tr>
511
+ <tr>
512
+ <td><p><span class="term"><em class="parameter"><code>content</code></em>&#160;:</span></p></td>
513
+ <td> a %<a class="link" href="cairo-cairo-surface-t.html#cairo-content-t"><span class="type">cairo_content_t</span></a> indicating the type of group that
514
+ will be created
515
+ </td>
516
+ </tr>
517
+ </tbody>
518
+ </table></div>
519
+ <p class="since">Since 1.2
520
+ </p>
521
+ </div>
522
+ <hr>
523
+ <div class="refsect2" lang="en">
524
+ <a name="id2632797"></a><h3>
525
+ <a name="cairo-pop-group"></a>cairo_pop_group ()</h3>
526
+ <a class="indexterm" name="id2632809"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pop_group (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
527
+ <p>
528
+ Terminates the redirection begun by a call to <a class="link" href="cairo-cairo-t.html#cairo-push-group"><code class="function">cairo_push_group()</code></a> or
529
+ <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content"><code class="function">cairo_push_group_with_content()</code></a> and returns a new pattern
530
+ containing the results of all drawing operations performed to the
531
+ group.
532
+ </p>
533
+ <p>
534
+ The <a class="link" href="cairo-cairo-t.html#cairo-pop-group"><code class="function">cairo_pop_group()</code></a> function calls <a class="link" href="cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a>, (balancing a
535
+ call to <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> by the push_group function), so that any
536
+ changes to the graphics state will not be visible outside the
537
+ group.</p>
538
+ <p>
539
+
540
+ </p>
541
+ <div class="variablelist"><table border="0">
542
+ <col align="left" valign="top">
543
+ <tbody>
544
+ <tr>
545
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
546
+ <td> a cairo context
547
+ </td>
548
+ </tr>
549
+ <tr>
550
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
551
+ <td> a newly created (surface) pattern containing the
552
+ results of all drawing operations performed to the group. The
553
+ caller owns the returned object and should call
554
+ <a class="link" href="cairo-Patterns.html#cairo-pattern-destroy"><code class="function">cairo_pattern_destroy()</code></a> when finished with it.
555
+
556
+ </td>
557
+ </tr>
558
+ </tbody>
559
+ </table></div>
560
+ <p class="since">Since 1.2
561
+ </p>
562
+ </div>
563
+ <hr>
564
+ <div class="refsect2" lang="en">
565
+ <a name="id2632931"></a><h3>
566
+ <a name="cairo-pop-group-to-source"></a>cairo_pop_group_to_source ()</h3>
567
+ <a class="indexterm" name="id2632944"></a><pre class="programlisting">void cairo_pop_group_to_source (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
568
+ <p>
569
+ Terminates the redirection begun by a call to <a class="link" href="cairo-cairo-t.html#cairo-push-group"><code class="function">cairo_push_group()</code></a> or
570
+ <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content"><code class="function">cairo_push_group_with_content()</code></a> and installs the resulting pattern
571
+ as the source pattern in the given cairo context.
572
+ </p>
573
+ <p>
574
+ The behavior of this function is equivalent to the sequence of
575
+ operations:
576
+ </p>
577
+ <p>
578
+ </p>
579
+ <div class="informalexample"><pre class="programlisting">
580
+ <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *group = cairo_pop_group (cr);
581
+ cairo_set_source (cr, group);
582
+ cairo_pattern_destroy (group);
583
+ </pre></div>
584
+ <p>
585
+ </p>
586
+ <p>
587
+ but is more convenient as their is no need for a variable to store
588
+ the short-lived pointer to the pattern.
589
+ </p>
590
+ <p>
591
+ The <a class="link" href="cairo-cairo-t.html#cairo-pop-group"><code class="function">cairo_pop_group()</code></a> function calls <a class="link" href="cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a>, (balancing a
592
+ call to <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> by the push_group function), so that any
593
+ changes to the graphics state will not be visible outside the
594
+ group.</p>
595
+ <p>
596
+
597
+ </p>
598
+ <div class="variablelist"><table border="0">
599
+ <col align="left" valign="top">
600
+ <tbody><tr>
601
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
602
+ <td> a cairo context
603
+ </td>
604
+ </tr></tbody>
605
+ </table></div>
606
+ <p class="since">Since 1.2
607
+ </p>
608
+ </div>
609
+ <hr>
610
+ <div class="refsect2" lang="en">
611
+ <a name="id2633070"></a><h3>
612
+ <a name="cairo-get-group-target"></a>cairo_get_group_target ()</h3>
613
+ <a class="indexterm" name="id2633083"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_get_group_target (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
614
+ <p>
615
+ Gets the current destination surface for the context. This is either
616
+ the original target surface as passed to <a class="link" href="cairo-cairo-t.html#cairo-create"><code class="function">cairo_create()</code></a> or the target
617
+ surface for the current group as started by the most recent call to
618
+ <a class="link" href="cairo-cairo-t.html#cairo-push-group"><code class="function">cairo_push_group()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content"><code class="function">cairo_push_group_with_content()</code></a>.
619
+ </p>
620
+ <p>
621
+ This function will always return a valid pointer, but the result
622
+ can be a "nil" surface if <em class="parameter"><code>cr</code></em> is already in an error state,
623
+ (ie. <a class="link" href="cairo-cairo-t.html#cairo-status"><code class="function">cairo_status()</code></a> <code class="literal">!=</code> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>).
624
+ A nil surface is indicated by <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status"><code class="function">cairo_surface_status()</code></a>
625
+ <code class="literal">!=</code> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.</p>
626
+ <p>
627
+
628
+ </p>
629
+ <div class="variablelist"><table border="0">
630
+ <col align="left" valign="top">
631
+ <tbody>
632
+ <tr>
633
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
634
+ <td> a cairo context
635
+ </td>
636
+ </tr>
637
+ <tr>
638
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
639
+ <td> the target surface. This object is owned by cairo. To
640
+ keep a reference to it, you must call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference"><code class="function">cairo_surface_reference()</code></a>.
641
+
642
+ </td>
643
+ </tr>
644
+ </tbody>
645
+ </table></div>
646
+ <p class="since">Since 1.2
647
+ </p>
648
+ </div>
649
+ <hr>
650
+ <div class="refsect2" lang="en">
651
+ <a name="id2633237"></a><h3>
652
+ <a name="cairo-set-source-rgb"></a>cairo_set_source_rgb ()</h3>
653
+ <a class="indexterm" name="id2633247"></a><pre class="programlisting">void cairo_set_source_rgb (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
654
+ double red,
655
+ double green,
656
+ double blue);</pre>
657
+ <p>
658
+ Sets the source pattern within <em class="parameter"><code>cr</code></em> to an opaque color. This opaque
659
+ color will then be used for any subsequent drawing operation until
660
+ a new source pattern is set.
661
+ </p>
662
+ <p>
663
+ The color components are floating point numbers in the range 0 to
664
+ 1. If the values passed in are outside that range, they will be
665
+ clamped.
666
+ </p>
667
+ <p>
668
+ The default source pattern is opaque black, (that is, it is
669
+ equivalent to cairo_set_source_rgb (cr, 0.0, 0.0, 0.0)).</p>
670
+ <p>
671
+
672
+ </p>
673
+ <div class="variablelist"><table border="0">
674
+ <col align="left" valign="top">
675
+ <tbody>
676
+ <tr>
677
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
678
+ <td> a cairo context
679
+ </td>
680
+ </tr>
681
+ <tr>
682
+ <td><p><span class="term"><em class="parameter"><code>red</code></em>&#160;:</span></p></td>
683
+ <td> red component of color
684
+ </td>
685
+ </tr>
686
+ <tr>
687
+ <td><p><span class="term"><em class="parameter"><code>green</code></em>&#160;:</span></p></td>
688
+ <td> green component of color
689
+ </td>
690
+ </tr>
691
+ <tr>
692
+ <td><p><span class="term"><em class="parameter"><code>blue</code></em>&#160;:</span></p></td>
693
+ <td> blue component of color
694
+ </td>
695
+ </tr>
696
+ </tbody>
697
+ </table></div>
698
+ </div>
699
+ <hr>
700
+ <div class="refsect2" lang="en">
701
+ <a name="id2633368"></a><h3>
702
+ <a name="cairo-set-source-rgba"></a>cairo_set_source_rgba ()</h3>
703
+ <a class="indexterm" name="id2633378"></a><pre class="programlisting">void cairo_set_source_rgba (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
704
+ double red,
705
+ double green,
706
+ double blue,
707
+ double alpha);</pre>
708
+ <p>
709
+ Sets the source pattern within <em class="parameter"><code>cr</code></em> to a translucent color. This
710
+ color will then be used for any subsequent drawing operation until
711
+ a new source pattern is set.
712
+ </p>
713
+ <p>
714
+ The color and alpha components are floating point numbers in the
715
+ range 0 to 1. If the values passed in are outside that range, they
716
+ will be clamped.
717
+ </p>
718
+ <p>
719
+ The default source pattern is opaque black, (that is, it is
720
+ equivalent to cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0)).</p>
721
+ <p>
722
+
723
+ </p>
724
+ <div class="variablelist"><table border="0">
725
+ <col align="left" valign="top">
726
+ <tbody>
727
+ <tr>
728
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
729
+ <td> a cairo context
730
+ </td>
731
+ </tr>
732
+ <tr>
733
+ <td><p><span class="term"><em class="parameter"><code>red</code></em>&#160;:</span></p></td>
734
+ <td> red component of color
735
+ </td>
736
+ </tr>
737
+ <tr>
738
+ <td><p><span class="term"><em class="parameter"><code>green</code></em>&#160;:</span></p></td>
739
+ <td> green component of color
740
+ </td>
741
+ </tr>
742
+ <tr>
743
+ <td><p><span class="term"><em class="parameter"><code>blue</code></em>&#160;:</span></p></td>
744
+ <td> blue component of color
745
+ </td>
746
+ </tr>
747
+ <tr>
748
+ <td><p><span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></p></td>
749
+ <td> alpha component of color
750
+ </td>
751
+ </tr>
752
+ </tbody>
753
+ </table></div>
754
+ </div>
755
+ <hr>
756
+ <div class="refsect2" lang="en">
757
+ <a name="id2633518"></a><h3>
758
+ <a name="cairo-set-source"></a>cairo_set_source ()</h3>
759
+ <a class="indexterm" name="id2633528"></a><pre class="programlisting">void cairo_set_source (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
760
+ <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *source);</pre>
761
+ <p>
762
+ Sets the source pattern within <em class="parameter"><code>cr</code></em> to <em class="parameter"><code>source</code></em>. This pattern
763
+ will then be used for any subsequent drawing operation until a new
764
+ source pattern is set.
765
+ </p>
766
+ <p>
767
+ Note: The pattern's transformation matrix will be locked to the
768
+ user space in effect at the time of <a class="link" href="cairo-cairo-t.html#cairo-set-source"><code class="function">cairo_set_source()</code></a>. This means
769
+ that further modifications of the current transformation matrix
770
+ will not affect the source pattern. See <a class="link" href="cairo-Patterns.html#cairo-pattern-set-matrix"><code class="function">cairo_pattern_set_matrix()</code></a>.
771
+ </p>
772
+ <p>
773
+ The default source pattern is a solid pattern that is opaque black,
774
+ (that is, it is equivalent to cairo_set_source_rgb (cr, 0.0, 0.0,
775
+ 0.0)).</p>
776
+ <p>
777
+
778
+ </p>
779
+ <div class="variablelist"><table border="0">
780
+ <col align="left" valign="top">
781
+ <tbody>
782
+ <tr>
783
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
784
+ <td> a cairo context
785
+ </td>
786
+ </tr>
787
+ <tr>
788
+ <td><p><span class="term"><em class="parameter"><code>source</code></em>&#160;:</span></p></td>
789
+ <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> to be used as the source for
790
+ subsequent drawing operations.
791
+ </td>
792
+ </tr>
793
+ </tbody>
794
+ </table></div>
795
+ </div>
796
+ <hr>
797
+ <div class="refsect2" lang="en">
798
+ <a name="id2633641"></a><h3>
799
+ <a name="cairo-set-source-surface"></a>cairo_set_source_surface ()</h3>
800
+ <a class="indexterm" name="id2633652"></a><pre class="programlisting">void cairo_set_source_surface (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
801
+ <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,
802
+ double x,
803
+ double y);</pre>
804
+ <p>
805
+ This is a convenience function for creating a pattern from <em class="parameter"><code>surface</code></em>
806
+ and setting it as the source in <em class="parameter"><code>cr</code></em> with <a class="link" href="cairo-cairo-t.html#cairo-set-source"><code class="function">cairo_set_source()</code></a>.
807
+ </p>
808
+ <p>
809
+ The <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> parameters give the user-space coordinate at which
810
+ the surface origin should appear. (The surface origin is its
811
+ upper-left corner before any transformation has been applied.) The
812
+ <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> patterns are negated and then set as translation values
813
+ in the pattern matrix.
814
+ </p>
815
+ <p>
816
+ Other than the initial translation pattern matrix, as described
817
+ above, all other pattern attributes, (such as its extend mode), are
818
+ set to the default values as in <a class="link" href="cairo-Patterns.html#cairo-pattern-create-for-surface"><code class="function">cairo_pattern_create_for_surface()</code></a>.
819
+ The resulting pattern can be queried with <a class="link" href="cairo-cairo-t.html#cairo-get-source"><code class="function">cairo_get_source()</code></a> so
820
+ that these attributes can be modified if desired, (eg. to create a
821
+ repeating pattern with <a class="link" href="cairo-Patterns.html#cairo-pattern-set-extend"><code class="function">cairo_pattern_set_extend()</code></a>).</p>
822
+ <p>
823
+
824
+ </p>
825
+ <div class="variablelist"><table border="0">
826
+ <col align="left" valign="top">
827
+ <tbody>
828
+ <tr>
829
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
830
+ <td> a cairo context
831
+ </td>
832
+ </tr>
833
+ <tr>
834
+ <td><p><span class="term"><em class="parameter"><code>surface</code></em>&#160;:</span></p></td>
835
+ <td> a surface to be used to set the source pattern
836
+ </td>
837
+ </tr>
838
+ <tr>
839
+ <td><p><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></p></td>
840
+ <td> User-space X coordinate for surface origin
841
+ </td>
842
+ </tr>
843
+ <tr>
844
+ <td><p><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></p></td>
845
+ <td> User-space Y coordinate for surface origin
846
+ </td>
847
+ </tr>
848
+ </tbody>
849
+ </table></div>
850
+ </div>
851
+ <hr>
852
+ <div class="refsect2" lang="en">
853
+ <a name="id2633840"></a><h3>
854
+ <a name="cairo-get-source"></a>cairo_get_source ()</h3>
855
+ <a class="indexterm" name="id2633850"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_get_source (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
856
+ <p>
857
+ Gets the current source pattern for <em class="parameter"><code>cr</code></em>.</p>
858
+ <p>
859
+
860
+ </p>
861
+ <div class="variablelist"><table border="0">
862
+ <col align="left" valign="top">
863
+ <tbody>
864
+ <tr>
865
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
866
+ <td> a cairo context
867
+ </td>
868
+ </tr>
869
+ <tr>
870
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
871
+ <td> the current source pattern. This object is owned by
872
+ cairo. To keep a reference to it, you must call
873
+ <a class="link" href="cairo-Patterns.html#cairo-pattern-reference"><code class="function">cairo_pattern_reference()</code></a>.
874
+ </td>
875
+ </tr>
876
+ </tbody>
877
+ </table></div>
878
+ </div>
879
+ <hr>
880
+ <div class="refsect2" lang="en">
881
+ <a name="id2633920"></a><h3>
882
+ <a name="cairo-antialias-t"></a>enum cairo_antialias_t</h3>
883
+ <a class="indexterm" name="id2633930"></a><pre class="programlisting">typedef enum _cairo_antialias {
884
+ CAIRO_ANTIALIAS_DEFAULT,
885
+ CAIRO_ANTIALIAS_NONE,
886
+ CAIRO_ANTIALIAS_GRAY,
887
+ CAIRO_ANTIALIAS_SUBPIXEL
888
+ } cairo_antialias_t;
889
+ </pre>
890
+ <p>
891
+ Specifies the type of antialiasing to do when rendering text or shapes.</p>
892
+ <p>
893
+
894
+ </p>
895
+ <div class="variablelist"><table border="0">
896
+ <col align="left" valign="top">
897
+ <tbody>
898
+ <tr>
899
+ <td><p><span class="term"><a name="CAIRO-ANTIALIAS-DEFAULT:CAPS"></a><code class="literal">CAIRO_ANTIALIAS_DEFAULT</code></span></p></td>
900
+ <td> Use the default antialiasing for
901
+ the subsystem and target device
902
+ </td>
903
+ </tr>
904
+ <tr>
905
+ <td><p><span class="term"><a name="CAIRO-ANTIALIAS-NONE:CAPS"></a><code class="literal">CAIRO_ANTIALIAS_NONE</code></span></p></td>
906
+ <td> Use a bilevel alpha mask
907
+ </td>
908
+ </tr>
909
+ <tr>
910
+ <td><p><span class="term"><a name="CAIRO-ANTIALIAS-GRAY:CAPS"></a><code class="literal">CAIRO_ANTIALIAS_GRAY</code></span></p></td>
911
+ <td> Perform single-color antialiasing (using
912
+ shades of gray for black text on a white background, for example).
913
+ </td>
914
+ </tr>
915
+ <tr>
916
+ <td><p><span class="term"><a name="CAIRO-ANTIALIAS-SUBPIXEL:CAPS"></a><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></span></p></td>
917
+ <td> Perform antialiasing by taking
918
+ advantage of the order of subpixel elements on devices
919
+ such as LCD panels
920
+ </td>
921
+ </tr>
922
+ </tbody>
923
+ </table></div>
924
+ </div>
925
+ <hr>
926
+ <div class="refsect2" lang="en">
927
+ <a name="id2634039"></a><h3>
928
+ <a name="cairo-set-antialias"></a>cairo_set_antialias ()</h3>
929
+ <a class="indexterm" name="id2634049"></a><pre class="programlisting">void cairo_set_antialias (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
930
+ <a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> antialias);</pre>
931
+ <p>
932
+ Set the antialiasing mode of the rasterizer used for drawing shapes.
933
+ This value is a hint, and a particular backend may or may not support
934
+ a particular value. At the current time, no backend supports
935
+ <a class="link" href="cairo-cairo-t.html#CAIRO-ANTIALIAS-SUBPIXEL:CAPS"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></a> when drawing shapes.
936
+ </p>
937
+ <p>
938
+ Note that this option does not affect text rendering, instead see
939
+ <a class="link" href="cairo-Font-Options.html#cairo-font-options-set-antialias"><code class="function">cairo_font_options_set_antialias()</code></a>.</p>
940
+ <p>
941
+
942
+ </p>
943
+ <div class="variablelist"><table border="0">
944
+ <col align="left" valign="top">
945
+ <tbody>
946
+ <tr>
947
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
948
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
949
+ </td>
950
+ </tr>
951
+ <tr>
952
+ <td><p><span class="term"><em class="parameter"><code>antialias</code></em>&#160;:</span></p></td>
953
+ <td> the new antialiasing mode
954
+ </td>
955
+ </tr>
956
+ </tbody>
957
+ </table></div>
958
+ </div>
959
+ <hr>
960
+ <div class="refsect2" lang="en">
961
+ <a name="id2634144"></a><h3>
962
+ <a name="cairo-get-antialias"></a>cairo_get_antialias ()</h3>
963
+ <a class="indexterm" name="id2634155"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> cairo_get_antialias (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
964
+ <p>
965
+ Gets the current shape antialiasing mode, as set by <code class="function">cairo_set_shape_antialias()</code>.</p>
966
+ <p>
967
+
968
+ </p>
969
+ <div class="variablelist"><table border="0">
970
+ <col align="left" valign="top">
971
+ <tbody>
972
+ <tr>
973
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
974
+ <td> a cairo context
975
+ </td>
976
+ </tr>
977
+ <tr>
978
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
979
+ <td> the current shape antialiasing mode.
980
+ </td>
981
+ </tr>
982
+ </tbody>
983
+ </table></div>
984
+ </div>
985
+ <hr>
986
+ <div class="refsect2" lang="en">
987
+ <a name="id2634218"></a><h3>
988
+ <a name="cairo-set-dash"></a>cairo_set_dash ()</h3>
989
+ <a class="indexterm" name="id2634229"></a><pre class="programlisting">void cairo_set_dash (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
990
+ const double *dashes,
991
+ int num_dashes,
992
+ double offset);</pre>
993
+ <p>
994
+ Sets the dash pattern to be used by <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a>. A dash pattern
995
+ is specified by <em class="parameter"><code>dashes</code></em>, an array of positive values. Each value
996
+ provides the length of alternate "on" and "off" portions of the
997
+ stroke. The <em class="parameter"><code>offset</code></em> specifies an offset into the pattern at which
998
+ the stroke begins.
999
+ </p>
1000
+ <p>
1001
+ Each "on" segment will have caps applied as if the segment were a
1002
+ separate sub-path. In particular, it is valid to use an "on" length
1003
+ of 0.0 with <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> or <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> in order
1004
+ to distributed dots or squares along a path.
1005
+ </p>
1006
+ <p>
1007
+ Note: The length values are in user-space units as evaluated at the
1008
+ time of stroking. This is not necessarily the same as the user
1009
+ space at the time of <a class="link" href="cairo-cairo-t.html#cairo-set-dash"><code class="function">cairo_set_dash()</code></a>.
1010
+ </p>
1011
+ <p>
1012
+ If <em class="parameter"><code>num_dashes</code></em> is 0 dashing is disabled.
1013
+ </p>
1014
+ <p>
1015
+ If <em class="parameter"><code>num_dashes</code></em> is 1 a symmetric pattern is assumed with alternating
1016
+ on and off portions of the size specified by the single value in
1017
+ <em class="parameter"><code>dashes</code></em>.
1018
+ </p>
1019
+ <p>
1020
+ If any value in <em class="parameter"><code>dashes</code></em> is negative, or if all values are 0, then
1021
+ <em class="parameter"><code>cr</code></em> will be put into an error state with a status of
1022
+ #<a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-INVALID-DASH:CAPS"><code class="literal">CAIRO_STATUS_INVALID_DASH</code></a>.</p>
1023
+ <p>
1024
+
1025
+ </p>
1026
+ <div class="variablelist"><table border="0">
1027
+ <col align="left" valign="top">
1028
+ <tbody>
1029
+ <tr>
1030
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1031
+ <td> a cairo context
1032
+ </td>
1033
+ </tr>
1034
+ <tr>
1035
+ <td><p><span class="term"><em class="parameter"><code>dashes</code></em>&#160;:</span></p></td>
1036
+ <td> an array specifying alternate lengths of on and off stroke portions
1037
+ </td>
1038
+ </tr>
1039
+ <tr>
1040
+ <td><p><span class="term"><em class="parameter"><code>num_dashes</code></em>&#160;:</span></p></td>
1041
+ <td> the length of the dashes array
1042
+ </td>
1043
+ </tr>
1044
+ <tr>
1045
+ <td><p><span class="term"><em class="parameter"><code>offset</code></em>&#160;:</span></p></td>
1046
+ <td> an offset into the dash pattern at which the stroke should start
1047
+ </td>
1048
+ </tr>
1049
+ </tbody>
1050
+ </table></div>
1051
+ </div>
1052
+ <hr>
1053
+ <div class="refsect2" lang="en">
1054
+ <a name="id2634443"></a><h3>
1055
+ <a name="cairo-get-dash-count"></a>cairo_get_dash_count ()</h3>
1056
+ <a class="indexterm" name="id2634455"></a><pre class="programlisting">int cairo_get_dash_count (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1057
+ <p>
1058
+ This function returns the length of the dash array in <em class="parameter"><code>cr</code></em> (0 if dashing
1059
+ is not currently in effect).
1060
+ </p>
1061
+ <p>
1062
+ See also <a class="link" href="cairo-cairo-t.html#cairo-set-dash"><code class="function">cairo_set_dash()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-get-dash"><code class="function">cairo_get_dash()</code></a>.</p>
1063
+ <p>
1064
+
1065
+ </p>
1066
+ <div class="variablelist"><table border="0">
1067
+ <col align="left" valign="top">
1068
+ <tbody>
1069
+ <tr>
1070
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1071
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
1072
+ </td>
1073
+ </tr>
1074
+ <tr>
1075
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1076
+ <td> the length of the dash array, or 0 if no dash array set.
1077
+
1078
+ </td>
1079
+ </tr>
1080
+ </tbody>
1081
+ </table></div>
1082
+ <p class="since">Since 1.4
1083
+ </p>
1084
+ </div>
1085
+ <hr>
1086
+ <div class="refsect2" lang="en">
1087
+ <a name="id2634549"></a><h3>
1088
+ <a name="cairo-get-dash"></a>cairo_get_dash ()</h3>
1089
+ <a class="indexterm" name="id2634562"></a><pre class="programlisting">void cairo_get_dash (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
1090
+ double *dashes,
1091
+ double *offset);</pre>
1092
+ <p>
1093
+ Gets the current dash array. If not <code class="literal">NULL</code>, <em class="parameter"><code>dashes</code></em> should be big
1094
+ enough to hold at least the number of values returned by
1095
+ <a class="link" href="cairo-cairo-t.html#cairo-get-dash-count"><code class="function">cairo_get_dash_count()</code></a>.</p>
1096
+ <p>
1097
+
1098
+ </p>
1099
+ <div class="variablelist"><table border="0">
1100
+ <col align="left" valign="top">
1101
+ <tbody>
1102
+ <tr>
1103
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1104
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
1105
+ </td>
1106
+ </tr>
1107
+ <tr>
1108
+ <td><p><span class="term"><em class="parameter"><code>dashes</code></em>&#160;:</span></p></td>
1109
+ <td> return value for the dash array, or <code class="literal">NULL</code>
1110
+ </td>
1111
+ </tr>
1112
+ <tr>
1113
+ <td><p><span class="term"><em class="parameter"><code>offset</code></em>&#160;:</span></p></td>
1114
+ <td> return value for the current dash offset, or <code class="literal">NULL</code>
1115
+ </td>
1116
+ </tr>
1117
+ </tbody>
1118
+ </table></div>
1119
+ <p class="since">Since 1.4
1120
+ </p>
1121
+ </div>
1122
+ <hr>
1123
+ <div class="refsect2" lang="en">
1124
+ <a name="id2634698"></a><h3>
1125
+ <a name="cairo-fill-rule-t"></a>enum cairo_fill_rule_t</h3>
1126
+ <a class="indexterm" name="id2634709"></a><pre class="programlisting">typedef enum _cairo_fill_rule {
1127
+ CAIRO_FILL_RULE_WINDING,
1128
+ CAIRO_FILL_RULE_EVEN_ODD
1129
+ } cairo_fill_rule_t;
1130
+ </pre>
1131
+ <p>
1132
+ <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t"><span class="type">cairo_fill_rule_t</span></a> is used to select how paths are filled. For both
1133
+ fill rules, whether or not a point is included in the fill is
1134
+ determined by taking a ray from that point to infinity and looking
1135
+ at intersections with the path. The ray can be in any direction,
1136
+ as long as it doesn't pass through the end point of a segment
1137
+ or have a tricky intersection such as intersecting tangent to the path.
1138
+ (Note that filling is not actually implemented in this way. This
1139
+ is just a description of the rule that is applied.)
1140
+ </p>
1141
+ <p>
1142
+ The default fill rule is <a class="link" href="cairo-cairo-t.html#CAIRO-FILL-RULE-WINDING:CAPS"><code class="literal">CAIRO_FILL_RULE_WINDING</code></a>.
1143
+ </p>
1144
+ <p>
1145
+ New entries may be added in future versions.</p>
1146
+ <p>
1147
+
1148
+ </p>
1149
+ <div class="variablelist"><table border="0">
1150
+ <col align="left" valign="top">
1151
+ <tbody>
1152
+ <tr>
1153
+ <td><p><span class="term"><a name="CAIRO-FILL-RULE-WINDING:CAPS"></a><code class="literal">CAIRO_FILL_RULE_WINDING</code></span></p></td>
1154
+ <td> If the path crosses the ray from
1155
+ left-to-right, counts +1. If the path crosses the ray
1156
+ from right to left, counts -1. (Left and right are determined
1157
+ from the perspective of looking along the ray from the starting
1158
+ point.) If the total count is non-zero, the point will be filled.
1159
+ </td>
1160
+ </tr>
1161
+ <tr>
1162
+ <td><p><span class="term"><a name="CAIRO-FILL-RULE-EVEN-ODD:CAPS"></a><code class="literal">CAIRO_FILL_RULE_EVEN_ODD</code></span></p></td>
1163
+ <td> Counts the total number of
1164
+ intersections, without regard to the orientation of the contour. If
1165
+ the total number of intersections is odd, the point will be
1166
+ filled.
1167
+ </td>
1168
+ </tr>
1169
+ </tbody>
1170
+ </table></div>
1171
+ </div>
1172
+ <hr>
1173
+ <div class="refsect2" lang="en">
1174
+ <a name="id2634811"></a><h3>
1175
+ <a name="cairo-set-fill-rule"></a>cairo_set_fill_rule ()</h3>
1176
+ <a class="indexterm" name="id2634822"></a><pre class="programlisting">void cairo_set_fill_rule (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
1177
+ <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t">cairo_fill_rule_t</a> fill_rule);</pre>
1178
+ <p>
1179
+ Set the current fill rule within the cairo context. The fill rule
1180
+ is used to determine which regions are inside or outside a complex
1181
+ (potentially self-intersecting) path. The current fill rule affects
1182
+ both <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a>. See <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t"><span class="type">cairo_fill_rule_t</span></a> for details
1183
+ on the semantics of each available fill rule.
1184
+ </p>
1185
+ <p>
1186
+ The default fill rule is <a class="link" href="cairo-cairo-t.html#CAIRO-FILL-RULE-WINDING:CAPS"><code class="literal">CAIRO_FILL_RULE_WINDING</code></a>.</p>
1187
+ <p>
1188
+
1189
+ </p>
1190
+ <div class="variablelist"><table border="0">
1191
+ <col align="left" valign="top">
1192
+ <tbody>
1193
+ <tr>
1194
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1195
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
1196
+ </td>
1197
+ </tr>
1198
+ <tr>
1199
+ <td><p><span class="term"><em class="parameter"><code>fill_rule</code></em>&#160;:</span></p></td>
1200
+ <td> a fill rule, specified as a <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t"><span class="type">cairo_fill_rule_t</span></a>
1201
+ </td>
1202
+ </tr>
1203
+ </tbody>
1204
+ </table></div>
1205
+ </div>
1206
+ <hr>
1207
+ <div class="refsect2" lang="en">
1208
+ <a name="id2634937"></a><h3>
1209
+ <a name="cairo-get-fill-rule"></a>cairo_get_fill_rule ()</h3>
1210
+ <a class="indexterm" name="id2634947"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t">cairo_fill_rule_t</a> cairo_get_fill_rule (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1211
+ <p>
1212
+ Gets the current fill rule, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule"><code class="function">cairo_set_fill_rule()</code></a>.</p>
1213
+ <p>
1214
+
1215
+ </p>
1216
+ <div class="variablelist"><table border="0">
1217
+ <col align="left" valign="top">
1218
+ <tbody>
1219
+ <tr>
1220
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1221
+ <td> a cairo context
1222
+ </td>
1223
+ </tr>
1224
+ <tr>
1225
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1226
+ <td> the current fill rule.
1227
+ </td>
1228
+ </tr>
1229
+ </tbody>
1230
+ </table></div>
1231
+ </div>
1232
+ <hr>
1233
+ <div class="refsect2" lang="en">
1234
+ <a name="id2635015"></a><h3>
1235
+ <a name="cairo-line-cap-t"></a>enum cairo_line_cap_t</h3>
1236
+ <a class="indexterm" name="id2635028"></a><pre class="programlisting">typedef enum _cairo_line_cap {
1237
+ CAIRO_LINE_CAP_BUTT,
1238
+ CAIRO_LINE_CAP_ROUND,
1239
+ CAIRO_LINE_CAP_SQUARE
1240
+ } cairo_line_cap_t;
1241
+ </pre>
1242
+ <p>
1243
+ Specifies how to render the endpoints of the path when stroking.
1244
+ </p>
1245
+ <p>
1246
+ The default line cap style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a>.</p>
1247
+ <p>
1248
+
1249
+ </p>
1250
+ <div class="variablelist"><table border="0">
1251
+ <col align="left" valign="top">
1252
+ <tbody>
1253
+ <tr>
1254
+ <td><p><span class="term"><a name="CAIRO-LINE-CAP-BUTT:CAPS"></a><code class="literal">CAIRO_LINE_CAP_BUTT</code></span></p></td>
1255
+ <td> start(stop) the line exactly at the start(end) point
1256
+ </td>
1257
+ </tr>
1258
+ <tr>
1259
+ <td><p><span class="term"><a name="CAIRO-LINE-CAP-ROUND:CAPS"></a><code class="literal">CAIRO_LINE_CAP_ROUND</code></span></p></td>
1260
+ <td> use a round ending, the center of the circle is the end point
1261
+ </td>
1262
+ </tr>
1263
+ <tr>
1264
+ <td><p><span class="term"><a name="CAIRO-LINE-CAP-SQUARE:CAPS"></a><code class="literal">CAIRO_LINE_CAP_SQUARE</code></span></p></td>
1265
+ <td> use squared ending, the center of the square is the end point
1266
+ </td>
1267
+ </tr>
1268
+ </tbody>
1269
+ </table></div>
1270
+ </div>
1271
+ <hr>
1272
+ <div class="refsect2" lang="en">
1273
+ <a name="id2635140"></a><h3>
1274
+ <a name="cairo-set-line-cap"></a>cairo_set_line_cap ()</h3>
1275
+ <a class="indexterm" name="id2635154"></a><pre class="programlisting">void cairo_set_line_cap (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
1276
+ <a class="link" href="cairo-cairo-t.html#cairo-line-cap-t">cairo_line_cap_t</a> line_cap);</pre>
1277
+ <p>
1278
+ Sets the current line cap style within the cairo context. See
1279
+ <a class="link" href="cairo-cairo-t.html#cairo-line-cap-t"><span class="type">cairo_line_cap_t</span></a> for details about how the available line cap
1280
+ styles are drawn.
1281
+ </p>
1282
+ <p>
1283
+ As with the other stroke parameters, the current line cap style is
1284
+ examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents"><code class="function">cairo_stroke_extents()</code></a>, and
1285
+ <code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
1286
+ construction.
1287
+ </p>
1288
+ <p>
1289
+ The default line cap style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a>.</p>
1290
+ <p>
1291
+
1292
+ </p>
1293
+ <div class="variablelist"><table border="0">
1294
+ <col align="left" valign="top">
1295
+ <tbody>
1296
+ <tr>
1297
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1298
+ <td> a cairo context
1299
+ </td>
1300
+ </tr>
1301
+ <tr>
1302
+ <td><p><span class="term"><em class="parameter"><code>line_cap</code></em>&#160;:</span></p></td>
1303
+ <td> a line cap style
1304
+ </td>
1305
+ </tr>
1306
+ </tbody>
1307
+ </table></div>
1308
+ </div>
1309
+ <hr>
1310
+ <div class="refsect2" lang="en">
1311
+ <a name="id2635283"></a><h3>
1312
+ <a name="cairo-get-line-cap"></a>cairo_get_line_cap ()</h3>
1313
+ <a class="indexterm" name="id2635297"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-line-cap-t">cairo_line_cap_t</a> cairo_get_line_cap (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1314
+ <p>
1315
+ Gets the current line cap style, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap"><code class="function">cairo_set_line_cap()</code></a>.</p>
1316
+ <p>
1317
+
1318
+ </p>
1319
+ <div class="variablelist"><table border="0">
1320
+ <col align="left" valign="top">
1321
+ <tbody>
1322
+ <tr>
1323
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1324
+ <td> a cairo context
1325
+ </td>
1326
+ </tr>
1327
+ <tr>
1328
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1329
+ <td> the current line cap style.
1330
+ </td>
1331
+ </tr>
1332
+ </tbody>
1333
+ </table></div>
1334
+ </div>
1335
+ <hr>
1336
+ <div class="refsect2" lang="en">
1337
+ <a name="id2635368"></a><h3>
1338
+ <a name="cairo-line-join-t"></a>enum cairo_line_join_t</h3>
1339
+ <a class="indexterm" name="id2635381"></a><pre class="programlisting">typedef enum _cairo_line_join {
1340
+ CAIRO_LINE_JOIN_MITER,
1341
+ CAIRO_LINE_JOIN_ROUND,
1342
+ CAIRO_LINE_JOIN_BEVEL
1343
+ } cairo_line_join_t;
1344
+ </pre>
1345
+ <p>
1346
+ Specifies how to render the junction of two lines when stroking.
1347
+ </p>
1348
+ <p>
1349
+ The default line join style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>.</p>
1350
+ <p>
1351
+
1352
+ </p>
1353
+ <div class="variablelist"><table border="0">
1354
+ <col align="left" valign="top">
1355
+ <tbody>
1356
+ <tr>
1357
+ <td><p><span class="term"><a name="CAIRO-LINE-JOIN-MITER:CAPS"></a><code class="literal">CAIRO_LINE_JOIN_MITER</code></span></p></td>
1358
+ <td> use a sharp (angled) corner, see
1359
+ <a class="link" href="cairo-cairo-t.html#cairo-set-miter-limit"><code class="function">cairo_set_miter_limit()</code></a>
1360
+ </td>
1361
+ </tr>
1362
+ <tr>
1363
+ <td><p><span class="term"><a name="CAIRO-LINE-JOIN-ROUND:CAPS"></a><code class="literal">CAIRO_LINE_JOIN_ROUND</code></span></p></td>
1364
+ <td> use a rounded join, the center of the circle is the
1365
+ joint point
1366
+ </td>
1367
+ </tr>
1368
+ <tr>
1369
+ <td><p><span class="term"><a name="CAIRO-LINE-JOIN-BEVEL:CAPS"></a><code class="literal">CAIRO_LINE_JOIN_BEVEL</code></span></p></td>
1370
+ <td> use a cut-off join, the join is cut off at half
1371
+ the line width from the joint point
1372
+ </td>
1373
+ </tr>
1374
+ </tbody>
1375
+ </table></div>
1376
+ </div>
1377
+ <hr>
1378
+ <div class="refsect2" lang="en">
1379
+ <a name="id2635503"></a><h3>
1380
+ <a name="cairo-set-line-join"></a>cairo_set_line_join ()</h3>
1381
+ <a class="indexterm" name="id2635516"></a><pre class="programlisting">void cairo_set_line_join (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
1382
+ <a class="link" href="cairo-cairo-t.html#cairo-line-join-t">cairo_line_join_t</a> line_join);</pre>
1383
+ <p>
1384
+ Sets the current line join style within the cairo context. See
1385
+ <a class="link" href="cairo-cairo-t.html#cairo-line-join-t"><span class="type">cairo_line_join_t</span></a> for details about how the available line join
1386
+ styles are drawn.
1387
+ </p>
1388
+ <p>
1389
+ As with the other stroke parameters, the current line join style is
1390
+ examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents"><code class="function">cairo_stroke_extents()</code></a>, and
1391
+ <code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
1392
+ construction.
1393
+ </p>
1394
+ <p>
1395
+ The default line join style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>.</p>
1396
+ <p>
1397
+
1398
+ </p>
1399
+ <div class="variablelist"><table border="0">
1400
+ <col align="left" valign="top">
1401
+ <tbody>
1402
+ <tr>
1403
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1404
+ <td> a cairo context
1405
+ </td>
1406
+ </tr>
1407
+ <tr>
1408
+ <td><p><span class="term"><em class="parameter"><code>line_join</code></em>&#160;:</span></p></td>
1409
+ <td> a line join style
1410
+ </td>
1411
+ </tr>
1412
+ </tbody>
1413
+ </table></div>
1414
+ </div>
1415
+ <hr>
1416
+ <div class="refsect2" lang="en">
1417
+ <a name="id2635646"></a><h3>
1418
+ <a name="cairo-get-line-join"></a>cairo_get_line_join ()</h3>
1419
+ <a class="indexterm" name="id2635660"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-line-join-t">cairo_line_join_t</a> cairo_get_line_join (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1420
+ <p>
1421
+ Gets the current line join style, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-line-join"><code class="function">cairo_set_line_join()</code></a>.</p>
1422
+ <p>
1423
+
1424
+ </p>
1425
+ <div class="variablelist"><table border="0">
1426
+ <col align="left" valign="top">
1427
+ <tbody>
1428
+ <tr>
1429
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1430
+ <td> a cairo context
1431
+ </td>
1432
+ </tr>
1433
+ <tr>
1434
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1435
+ <td> the current line join style.
1436
+ </td>
1437
+ </tr>
1438
+ </tbody>
1439
+ </table></div>
1440
+ </div>
1441
+ <hr>
1442
+ <div class="refsect2" lang="en">
1443
+ <a name="id2635731"></a><h3>
1444
+ <a name="cairo-set-line-width"></a>cairo_set_line_width ()</h3>
1445
+ <a class="indexterm" name="id2635744"></a><pre class="programlisting">void cairo_set_line_width (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
1446
+ double width);</pre>
1447
+ <p>
1448
+ Sets the current line width within the cairo context. The line
1449
+ width value specifies the diameter of a pen that is circular in
1450
+ user space, (though device-space pen may be an ellipse in general
1451
+ due to scaling/shear/rotation of the CTM).
1452
+ </p>
1453
+ <p>
1454
+ Note: When the description above refers to user space and CTM it
1455
+ refers to the user space and CTM in effect at the time of the
1456
+ stroking operation, not the user space and CTM in effect at the
1457
+ time of the call to <a class="link" href="cairo-cairo-t.html#cairo-set-line-width"><code class="function">cairo_set_line_width()</code></a>. The simplest usage
1458
+ makes both of these spaces identical. That is, if there is no
1459
+ change to the CTM between a call to <code class="function">cairo_set_line_with()</code> and the
1460
+ stroking operation, then one can just pass user-space values to
1461
+ <a class="link" href="cairo-cairo-t.html#cairo-set-line-width"><code class="function">cairo_set_line_width()</code></a> and ignore this note.
1462
+ </p>
1463
+ <p>
1464
+ As with the other stroke parameters, the current line width is
1465
+ examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents"><code class="function">cairo_stroke_extents()</code></a>, and
1466
+ <code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
1467
+ construction.
1468
+ </p>
1469
+ <p>
1470
+ The default line width value is 2.0.</p>
1471
+ <p>
1472
+
1473
+ </p>
1474
+ <div class="variablelist"><table border="0">
1475
+ <col align="left" valign="top">
1476
+ <tbody>
1477
+ <tr>
1478
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1479
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
1480
+ </td>
1481
+ </tr>
1482
+ <tr>
1483
+ <td><p><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></p></td>
1484
+ <td> a line width
1485
+ </td>
1486
+ </tr>
1487
+ </tbody>
1488
+ </table></div>
1489
+ </div>
1490
+ <hr>
1491
+ <div class="refsect2" lang="en">
1492
+ <a name="id2635905"></a><h3>
1493
+ <a name="cairo-get-line-width"></a>cairo_get_line_width ()</h3>
1494
+ <a class="indexterm" name="id2635919"></a><pre class="programlisting">double cairo_get_line_width (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1495
+ <p>
1496
+ This function returns the current line width value exactly as set by
1497
+ <a class="link" href="cairo-cairo-t.html#cairo-set-line-width"><code class="function">cairo_set_line_width()</code></a>. Note that the value is unchanged even if
1498
+ the CTM has changed between the calls to <a class="link" href="cairo-cairo-t.html#cairo-set-line-width"><code class="function">cairo_set_line_width()</code></a> and
1499
+ <a class="link" href="cairo-cairo-t.html#cairo-get-line-width"><code class="function">cairo_get_line_width()</code></a>.</p>
1500
+ <p>
1501
+
1502
+ </p>
1503
+ <div class="variablelist"><table border="0">
1504
+ <col align="left" valign="top">
1505
+ <tbody>
1506
+ <tr>
1507
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1508
+ <td> a cairo context
1509
+ </td>
1510
+ </tr>
1511
+ <tr>
1512
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1513
+ <td> the current line width.
1514
+ </td>
1515
+ </tr>
1516
+ </tbody>
1517
+ </table></div>
1518
+ </div>
1519
+ <hr>
1520
+ <div class="refsect2" lang="en">
1521
+ <a name="id2636012"></a><h3>
1522
+ <a name="cairo-set-miter-limit"></a>cairo_set_miter_limit ()</h3>
1523
+ <a class="indexterm" name="id2636025"></a><pre class="programlisting">void cairo_set_miter_limit (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
1524
+ double limit);</pre>
1525
+ <p>
1526
+ Sets the current miter limit within the cairo context.
1527
+ </p>
1528
+ <p>
1529
+ If the current line join style is set to <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>
1530
+ (see <a class="link" href="cairo-cairo-t.html#cairo-set-line-join"><code class="function">cairo_set_line_join()</code></a>), the miter limit is used to determine
1531
+ whether the lines should be joined with a bevel instead of a miter.
1532
+ Cairo divides the length of the miter by the line width.
1533
+ If the result is greater than the miter limit, the style is
1534
+ converted to a bevel.
1535
+ </p>
1536
+ <p>
1537
+ As with the other stroke parameters, the current line miter limit is
1538
+ examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents"><code class="function">cairo_stroke_extents()</code></a>, and
1539
+ <code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
1540
+ construction.
1541
+ </p>
1542
+ <p>
1543
+ The default miter limit value is 10.0, which will convert joins
1544
+ with interior angles less than 11 degrees to bevels instead of
1545
+ miters. For reference, a miter limit of 2.0 makes the miter cutoff
1546
+ at 60 degrees, and a miter limit of 1.414 makes the cutoff at 90
1547
+ degrees.
1548
+ </p>
1549
+ <p>
1550
+ A miter limit for a desired angle can be computed as: miter limit =
1551
+ 1/sin(angle/2)</p>
1552
+ <p>
1553
+
1554
+ </p>
1555
+ <div class="variablelist"><table border="0">
1556
+ <col align="left" valign="top">
1557
+ <tbody>
1558
+ <tr>
1559
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1560
+ <td> a cairo context
1561
+ </td>
1562
+ </tr>
1563
+ <tr>
1564
+ <td><p><span class="term"><em class="parameter"><code>limit</code></em>&#160;:</span></p></td>
1565
+ <td> miter limit to set
1566
+ </td>
1567
+ </tr>
1568
+ </tbody>
1569
+ </table></div>
1570
+ </div>
1571
+ <hr>
1572
+ <div class="refsect2" lang="en">
1573
+ <a name="id2636173"></a><h3>
1574
+ <a name="cairo-get-miter-limit"></a>cairo_get_miter_limit ()</h3>
1575
+ <a class="indexterm" name="id2636187"></a><pre class="programlisting">double cairo_get_miter_limit (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1576
+ <p>
1577
+ Gets the current miter limit, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-miter-limit"><code class="function">cairo_set_miter_limit()</code></a>.</p>
1578
+ <p>
1579
+
1580
+ </p>
1581
+ <div class="variablelist"><table border="0">
1582
+ <col align="left" valign="top">
1583
+ <tbody>
1584
+ <tr>
1585
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1586
+ <td> a cairo context
1587
+ </td>
1588
+ </tr>
1589
+ <tr>
1590
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1591
+ <td> the current miter limit.
1592
+ </td>
1593
+ </tr>
1594
+ </tbody>
1595
+ </table></div>
1596
+ </div>
1597
+ <hr>
1598
+ <div class="refsect2" lang="en">
1599
+ <a name="id2636258"></a><h3>
1600
+ <a name="cairo-operator-t"></a>enum cairo_operator_t</h3>
1601
+ <a class="indexterm" name="id2636272"></a><pre class="programlisting">typedef enum _cairo_operator {
1602
+ CAIRO_OPERATOR_CLEAR,
1603
+
1604
+ CAIRO_OPERATOR_SOURCE,
1605
+ CAIRO_OPERATOR_OVER,
1606
+ CAIRO_OPERATOR_IN,
1607
+ CAIRO_OPERATOR_OUT,
1608
+ CAIRO_OPERATOR_ATOP,
1609
+
1610
+ CAIRO_OPERATOR_DEST,
1611
+ CAIRO_OPERATOR_DEST_OVER,
1612
+ CAIRO_OPERATOR_DEST_IN,
1613
+ CAIRO_OPERATOR_DEST_OUT,
1614
+ CAIRO_OPERATOR_DEST_ATOP,
1615
+
1616
+ CAIRO_OPERATOR_XOR,
1617
+ CAIRO_OPERATOR_ADD,
1618
+ CAIRO_OPERATOR_SATURATE
1619
+ } cairo_operator_t;
1620
+ </pre>
1621
+ <p>
1622
+ <a class="link" href="cairo-cairo-t.html#cairo-operator-t"><span class="type">cairo_operator_t</span></a> is used to set the compositing operator for all cairo
1623
+ drawing operations.
1624
+ </p>
1625
+ <p>
1626
+ The default operator is <a class="link" href="cairo-cairo-t.html#CAIRO-OPERATOR-OVER:CAPS"><code class="literal">CAIRO_OPERATOR_OVER</code></a>.
1627
+ </p>
1628
+ <p>
1629
+ The operators marked as <em class="firstterm">unbounded</em> modify their
1630
+ destination even outside of the mask layer (that is, their effect is not
1631
+ bound by the mask layer). However, their effect can still be limited by
1632
+ way of clipping.
1633
+ </p>
1634
+ <p>
1635
+ To keep things simple, the operator descriptions here
1636
+ document the behavior for when both source and destination are either fully
1637
+ transparent or fully opaque. The actual implementation works for
1638
+ translucent layers too.
1639
+ For a more detailed explanation of the effects of each operator, including
1640
+ the mathematical definitions, see
1641
+ <a class="ulink" href="http://cairographics.org/operators/" target="_top">http://cairographics.org/operators/</a>.</p>
1642
+ <p>
1643
+
1644
+ </p>
1645
+ <div class="variablelist"><table border="0">
1646
+ <col align="left" valign="top">
1647
+ <tbody>
1648
+ <tr>
1649
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-CLEAR:CAPS"></a><code class="literal">CAIRO_OPERATOR_CLEAR</code></span></p></td>
1650
+ <td> clear destination layer (bounded)
1651
+ </td>
1652
+ </tr>
1653
+ <tr>
1654
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-SOURCE:CAPS"></a><code class="literal">CAIRO_OPERATOR_SOURCE</code></span></p></td>
1655
+ <td> replace destination layer (bounded)
1656
+ </td>
1657
+ </tr>
1658
+ <tr>
1659
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-OVER:CAPS"></a><code class="literal">CAIRO_OPERATOR_OVER</code></span></p></td>
1660
+ <td> draw source layer on top of destination layer
1661
+ (bounded)
1662
+ </td>
1663
+ </tr>
1664
+ <tr>
1665
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-IN:CAPS"></a><code class="literal">CAIRO_OPERATOR_IN</code></span></p></td>
1666
+ <td> draw source where there was destination content
1667
+ (unbounded)
1668
+ </td>
1669
+ </tr>
1670
+ <tr>
1671
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-OUT:CAPS"></a><code class="literal">CAIRO_OPERATOR_OUT</code></span></p></td>
1672
+ <td> draw source where there was no destination
1673
+ content (unbounded)
1674
+ </td>
1675
+ </tr>
1676
+ <tr>
1677
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-ATOP:CAPS"></a><code class="literal">CAIRO_OPERATOR_ATOP</code></span></p></td>
1678
+ <td> draw source on top of destination content and
1679
+ only there
1680
+ </td>
1681
+ </tr>
1682
+ <tr>
1683
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-DEST:CAPS"></a><code class="literal">CAIRO_OPERATOR_DEST</code></span></p></td>
1684
+ <td> ignore the source
1685
+ </td>
1686
+ </tr>
1687
+ <tr>
1688
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-DEST-OVER:CAPS"></a><code class="literal">CAIRO_OPERATOR_DEST_OVER</code></span></p></td>
1689
+ <td> draw destination on top of source
1690
+ </td>
1691
+ </tr>
1692
+ <tr>
1693
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-DEST-IN:CAPS"></a><code class="literal">CAIRO_OPERATOR_DEST_IN</code></span></p></td>
1694
+ <td> leave destination only where there was
1695
+ source content (unbounded)
1696
+ </td>
1697
+ </tr>
1698
+ <tr>
1699
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-DEST-OUT:CAPS"></a><code class="literal">CAIRO_OPERATOR_DEST_OUT</code></span></p></td>
1700
+ <td> leave destination only where there was no
1701
+ source content
1702
+ </td>
1703
+ </tr>
1704
+ <tr>
1705
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-DEST-ATOP:CAPS"></a><code class="literal">CAIRO_OPERATOR_DEST_ATOP</code></span></p></td>
1706
+ <td> leave destination on top of source content
1707
+ and only there (unbounded)
1708
+ </td>
1709
+ </tr>
1710
+ <tr>
1711
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-XOR:CAPS"></a><code class="literal">CAIRO_OPERATOR_XOR</code></span></p></td>
1712
+ <td> source and destination are shown where there is only
1713
+ one of them
1714
+ </td>
1715
+ </tr>
1716
+ <tr>
1717
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-ADD:CAPS"></a><code class="literal">CAIRO_OPERATOR_ADD</code></span></p></td>
1718
+ <td> source and destination layers are accumulated
1719
+ </td>
1720
+ </tr>
1721
+ <tr>
1722
+ <td><p><span class="term"><a name="CAIRO-OPERATOR-SATURATE:CAPS"></a><code class="literal">CAIRO_OPERATOR_SATURATE</code></span></p></td>
1723
+ <td> like over, but assuming source and dest are
1724
+ disjoint geometries
1725
+ </td>
1726
+ </tr>
1727
+ </tbody>
1728
+ </table></div>
1729
+ </div>
1730
+ <hr>
1731
+ <div class="refsect2" lang="en">
1732
+ <a name="id2636683"></a><h3>
1733
+ <a name="cairo-set-operator"></a>cairo_set_operator ()</h3>
1734
+ <a class="indexterm" name="id2636697"></a><pre class="programlisting">void cairo_set_operator (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
1735
+ <a class="link" href="cairo-cairo-t.html#cairo-operator-t">cairo_operator_t</a> op);</pre>
1736
+ <p>
1737
+ Sets the compositing operator to be used for all drawing
1738
+ operations. See <a class="link" href="cairo-cairo-t.html#cairo-operator-t"><span class="type">cairo_operator_t</span></a> for details on the semantics of
1739
+ each available compositing operator.
1740
+ </p>
1741
+ <p>
1742
+ The default operator is <a class="link" href="cairo-cairo-t.html#CAIRO-OPERATOR-OVER:CAPS"><code class="literal">CAIRO_OPERATOR_OVER</code></a>.</p>
1743
+ <p>
1744
+
1745
+ </p>
1746
+ <div class="variablelist"><table border="0">
1747
+ <col align="left" valign="top">
1748
+ <tbody>
1749
+ <tr>
1750
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1751
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
1752
+ </td>
1753
+ </tr>
1754
+ <tr>
1755
+ <td><p><span class="term"><em class="parameter"><code>op</code></em>&#160;:</span></p></td>
1756
+ <td> a compositing operator, specified as a <a class="link" href="cairo-cairo-t.html#cairo-operator-t"><span class="type">cairo_operator_t</span></a>
1757
+ </td>
1758
+ </tr>
1759
+ </tbody>
1760
+ </table></div>
1761
+ </div>
1762
+ <hr>
1763
+ <div class="refsect2" lang="en">
1764
+ <a name="id2636806"></a><h3>
1765
+ <a name="cairo-get-operator"></a>cairo_get_operator ()</h3>
1766
+ <a class="indexterm" name="id2636820"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-operator-t">cairo_operator_t</a> cairo_get_operator (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1767
+ <p>
1768
+ Gets the current compositing operator for a cairo context.</p>
1769
+ <p>
1770
+
1771
+ </p>
1772
+ <div class="variablelist"><table border="0">
1773
+ <col align="left" valign="top">
1774
+ <tbody>
1775
+ <tr>
1776
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1777
+ <td> a cairo context
1778
+ </td>
1779
+ </tr>
1780
+ <tr>
1781
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1782
+ <td> the current compositing operator.
1783
+ </td>
1784
+ </tr>
1785
+ </tbody>
1786
+ </table></div>
1787
+ </div>
1788
+ <hr>
1789
+ <div class="refsect2" lang="en">
1790
+ <a name="id2636880"></a><h3>
1791
+ <a name="cairo-set-tolerance"></a>cairo_set_tolerance ()</h3>
1792
+ <a class="indexterm" name="id2636894"></a><pre class="programlisting">void cairo_set_tolerance (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
1793
+ double tolerance);</pre>
1794
+ <p>
1795
+ Sets the tolerance used when converting paths into trapezoids.
1796
+ Curved segments of the path will be subdivided until the maximum
1797
+ deviation between the original path and the polygonal approximation
1798
+ is less than <em class="parameter"><code>tolerance</code></em>. The default value is 0.1. A larger
1799
+ value will give better performance, a smaller value, better
1800
+ appearance. (Reducing the value from the default value of 0.1
1801
+ is unlikely to improve appearance significantly.)</p>
1802
+ <p>
1803
+
1804
+ </p>
1805
+ <div class="variablelist"><table border="0">
1806
+ <col align="left" valign="top">
1807
+ <tbody>
1808
+ <tr>
1809
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1810
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
1811
+ </td>
1812
+ </tr>
1813
+ <tr>
1814
+ <td><p><span class="term"><em class="parameter"><code>tolerance</code></em>&#160;:</span></p></td>
1815
+ <td> the tolerance, in device units (typically pixels)
1816
+ </td>
1817
+ </tr>
1818
+ </tbody>
1819
+ </table></div>
1820
+ </div>
1821
+ <hr>
1822
+ <div class="refsect2" lang="en">
1823
+ <a name="id2636985"></a><h3>
1824
+ <a name="cairo-get-tolerance"></a>cairo_get_tolerance ()</h3>
1825
+ <a class="indexterm" name="id2636999"></a><pre class="programlisting">double cairo_get_tolerance (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1826
+ <p>
1827
+ Gets the current tolerance value, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-tolerance"><code class="function">cairo_set_tolerance()</code></a>.</p>
1828
+ <p>
1829
+
1830
+ </p>
1831
+ <div class="variablelist"><table border="0">
1832
+ <col align="left" valign="top">
1833
+ <tbody>
1834
+ <tr>
1835
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1836
+ <td> a cairo context
1837
+ </td>
1838
+ </tr>
1839
+ <tr>
1840
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1841
+ <td> the current tolerance value.
1842
+ </td>
1843
+ </tr>
1844
+ </tbody>
1845
+ </table></div>
1846
+ </div>
1847
+ <hr>
1848
+ <div class="refsect2" lang="en">
1849
+ <a name="id2637070"></a><h3>
1850
+ <a name="cairo-clip"></a>cairo_clip ()</h3>
1851
+ <a class="indexterm" name="id2637083"></a><pre class="programlisting">void cairo_clip (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1852
+ <p>
1853
+ Establishes a new clip region by intersecting the current clip
1854
+ region with the current path as it would be filled by <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a>
1855
+ and according to the current fill rule (see <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule"><code class="function">cairo_set_fill_rule()</code></a>).
1856
+ </p>
1857
+ <p>
1858
+ After <a class="link" href="cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a>, the current path will be cleared from the cairo
1859
+ context.
1860
+ </p>
1861
+ <p>
1862
+ The current clip region affects all drawing operations by
1863
+ effectively masking out any changes to the surface that are outside
1864
+ the current clip region.
1865
+ </p>
1866
+ <p>
1867
+ Calling <a class="link" href="cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a> can only make the clip region smaller, never
1868
+ larger. But the current clip is part of the graphics state, so a
1869
+ temporary restriction of the clip region can be achieved by
1870
+ calling <a class="link" href="cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a> within a <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a>/<a class="link" href="cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a>
1871
+ pair. The only other means of increasing the size of the clip
1872
+ region is <a class="link" href="cairo-cairo-t.html#cairo-reset-clip"><code class="function">cairo_reset_clip()</code></a>.</p>
1873
+ <p>
1874
+
1875
+ </p>
1876
+ <div class="variablelist"><table border="0">
1877
+ <col align="left" valign="top">
1878
+ <tbody><tr>
1879
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1880
+ <td> a cairo context
1881
+ </td>
1882
+ </tr></tbody>
1883
+ </table></div>
1884
+ </div>
1885
+ <hr>
1886
+ <div class="refsect2" lang="en">
1887
+ <a name="id2637230"></a><h3>
1888
+ <a name="cairo-clip-preserve"></a>cairo_clip_preserve ()</h3>
1889
+ <a class="indexterm" name="id2637244"></a><pre class="programlisting">void cairo_clip_preserve (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1890
+ <p>
1891
+ Establishes a new clip region by intersecting the current clip
1892
+ region with the current path as it would be filled by <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a>
1893
+ and according to the current fill rule (see <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule"><code class="function">cairo_set_fill_rule()</code></a>).
1894
+ </p>
1895
+ <p>
1896
+ Unlike <a class="link" href="cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve"><code class="function">cairo_clip_preserve()</code></a> preserves the path within
1897
+ the cairo context.
1898
+ </p>
1899
+ <p>
1900
+ The current clip region affects all drawing operations by
1901
+ effectively masking out any changes to the surface that are outside
1902
+ the current clip region.
1903
+ </p>
1904
+ <p>
1905
+ Calling <a class="link" href="cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a> can only make the clip region smaller, never
1906
+ larger. But the current clip is part of the graphics state, so a
1907
+ temporary restriction of the clip region can be achieved by
1908
+ calling <a class="link" href="cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a> within a <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a>/<a class="link" href="cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a>
1909
+ pair. The only other means of increasing the size of the clip
1910
+ region is <a class="link" href="cairo-cairo-t.html#cairo-reset-clip"><code class="function">cairo_reset_clip()</code></a>.</p>
1911
+ <p>
1912
+
1913
+ </p>
1914
+ <div class="variablelist"><table border="0">
1915
+ <col align="left" valign="top">
1916
+ <tbody><tr>
1917
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1918
+ <td> a cairo context
1919
+ </td>
1920
+ </tr></tbody>
1921
+ </table></div>
1922
+ </div>
1923
+ <hr>
1924
+ <div class="refsect2" lang="en">
1925
+ <a name="id2637400"></a><h3>
1926
+ <a name="cairo-clip-extents"></a>cairo_clip_extents ()</h3>
1927
+ <a class="indexterm" name="id2637416"></a><pre class="programlisting">void cairo_clip_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
1928
+ double *x1,
1929
+ double *y1,
1930
+ double *x2,
1931
+ double *y2);</pre>
1932
+ <p>
1933
+ Computes a bounding box in user coordinates covering the area inside the
1934
+ current clip.</p>
1935
+ <p>
1936
+
1937
+ </p>
1938
+ <div class="variablelist"><table border="0">
1939
+ <col align="left" valign="top">
1940
+ <tbody>
1941
+ <tr>
1942
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1943
+ <td> a cairo context
1944
+ </td>
1945
+ </tr>
1946
+ <tr>
1947
+ <td><p><span class="term"><em class="parameter"><code>x1</code></em>&#160;:</span></p></td>
1948
+ <td> left of the resulting extents
1949
+ </td>
1950
+ </tr>
1951
+ <tr>
1952
+ <td><p><span class="term"><em class="parameter"><code>y1</code></em>&#160;:</span></p></td>
1953
+ <td> top of the resulting extents
1954
+ </td>
1955
+ </tr>
1956
+ <tr>
1957
+ <td><p><span class="term"><em class="parameter"><code>x2</code></em>&#160;:</span></p></td>
1958
+ <td> right of the resulting extents
1959
+ </td>
1960
+ </tr>
1961
+ <tr>
1962
+ <td><p><span class="term"><em class="parameter"><code>y2</code></em>&#160;:</span></p></td>
1963
+ <td> bottom of the resulting extents
1964
+ </td>
1965
+ </tr>
1966
+ </tbody>
1967
+ </table></div>
1968
+ <p class="since">Since 1.4
1969
+ </p>
1970
+ </div>
1971
+ <hr>
1972
+ <div class="refsect2" lang="en">
1973
+ <a name="id2637560"></a><h3>
1974
+ <a name="cairo-reset-clip"></a>cairo_reset_clip ()</h3>
1975
+ <a class="indexterm" name="id2637573"></a><pre class="programlisting">void cairo_reset_clip (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
1976
+ <p>
1977
+ Reset the current clip region to its original, unrestricted
1978
+ state. That is, set the clip region to an infinitely large shape
1979
+ containing the target surface. Equivalently, if infinity is too
1980
+ hard to grasp, one can imagine the clip region being reset to the
1981
+ exact bounds of the target surface.
1982
+ </p>
1983
+ <p>
1984
+ Note that code meant to be reusable should not call
1985
+ <a class="link" href="cairo-cairo-t.html#cairo-reset-clip"><code class="function">cairo_reset_clip()</code></a> as it will cause results unexpected by
1986
+ higher-level code which calls <a class="link" href="cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a>. Consider using
1987
+ <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a> around <a class="link" href="cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a> as a more
1988
+ robust means of temporarily restricting the clip region.</p>
1989
+ <p>
1990
+
1991
+ </p>
1992
+ <div class="variablelist"><table border="0">
1993
+ <col align="left" valign="top">
1994
+ <tbody><tr>
1995
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
1996
+ <td> a cairo context
1997
+ </td>
1998
+ </tr></tbody>
1999
+ </table></div>
2000
+ </div>
2001
+ <hr>
2002
+ <div class="refsect2" lang="en">
2003
+ <a name="id2637682"></a><h3>
2004
+ <a name="cairo-rectangle-t"></a>cairo_rectangle_t</h3>
2005
+ <a class="indexterm" name="id2637698"></a><pre class="programlisting">typedef struct {
2006
+ double x, y, width, height;
2007
+ } cairo_rectangle_t;
2008
+ </pre>
2009
+ <p>
2010
+ A data structure for holding a rectangle.</p>
2011
+ <p>
2012
+
2013
+ </p>
2014
+ <div class="variablelist"><table border="0">
2015
+ <col align="left" valign="top">
2016
+ <tbody>
2017
+ <tr>
2018
+ <td><p><span class="term">double&#160;<em class="structfield"><code>x</code></em>;</span></p></td>
2019
+ <td> X coordinate of the left side of the rectangle
2020
+ </td>
2021
+ </tr>
2022
+ <tr>
2023
+ <td><p><span class="term">double&#160;<em class="structfield"><code>y</code></em>;</span></p></td>
2024
+ <td> Y coordinate of the the top side of the rectangle
2025
+ </td>
2026
+ </tr>
2027
+ <tr>
2028
+ <td><p><span class="term">double&#160;<em class="structfield"><code>width</code></em>;</span></p></td>
2029
+ <td> width of the rectangle
2030
+ </td>
2031
+ </tr>
2032
+ <tr>
2033
+ <td><p><span class="term">double&#160;<em class="structfield"><code>height</code></em>;</span></p></td>
2034
+ <td> height of the rectangle
2035
+ </td>
2036
+ </tr>
2037
+ </tbody>
2038
+ </table></div>
2039
+ <p class="since">Since 1.4
2040
+ </p>
2041
+ </div>
2042
+ <hr>
2043
+ <div class="refsect2" lang="en">
2044
+ <a name="id2637815"></a><h3>
2045
+ <a name="cairo-rectangle-list-t"></a>cairo_rectangle_list_t</h3>
2046
+ <a class="indexterm" name="id2637831"></a><pre class="programlisting">typedef struct {
2047
+ cairo_status_t status;
2048
+ cairo_rectangle_t *rectangles;
2049
+ int num_rectangles;
2050
+ } cairo_rectangle_list_t;
2051
+ </pre>
2052
+ <p>
2053
+ A data structure for holding a dynamically allocated
2054
+ array of rectangles.</p>
2055
+ <p>
2056
+
2057
+ </p>
2058
+ <div class="variablelist"><table border="0">
2059
+ <col align="left" valign="top">
2060
+ <tbody>
2061
+ <tr>
2062
+ <td><p><span class="term"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a>&#160;<em class="structfield"><code>status</code></em>;</span></p></td>
2063
+ <td> Error status of the rectangle list
2064
+ </td>
2065
+ </tr>
2066
+ <tr>
2067
+ <td><p><span class="term"><a class="link" href="cairo-cairo-t.html#cairo-rectangle-t">cairo_rectangle_t</a>&#160;*<em class="structfield"><code>rectangles</code></em>;</span></p></td>
2068
+ <td> Array containing the rectangles
2069
+ </td>
2070
+ </tr>
2071
+ <tr>
2072
+ <td><p><span class="term">int&#160;<em class="structfield"><code>num_rectangles</code></em>;</span></p></td>
2073
+ <td> Number of rectangles in this list
2074
+ </td>
2075
+ </tr>
2076
+ </tbody>
2077
+ </table></div>
2078
+ <p class="since">Since 1.4
2079
+ </p>
2080
+ </div>
2081
+ <hr>
2082
+ <div class="refsect2" lang="en">
2083
+ <a name="id2637930"></a><h3>
2084
+ <a name="cairo-rectangle-list-destroy"></a>cairo_rectangle_list_destroy ()</h3>
2085
+ <a class="indexterm" name="id2637946"></a><pre class="programlisting">void cairo_rectangle_list_destroy (<a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t">cairo_rectangle_list_t</a> *rectangle_list);</pre>
2086
+ <p>
2087
+ Unconditionally frees <em class="parameter"><code>rectangle_list</code></em> and all associated
2088
+ references. After this call, the <em class="parameter"><code>rectangle_list</code></em> pointer must not
2089
+ be dereferenced.</p>
2090
+ <p>
2091
+
2092
+ </p>
2093
+ <div class="variablelist"><table border="0">
2094
+ <col align="left" valign="top">
2095
+ <tbody><tr>
2096
+ <td><p><span class="term"><em class="parameter"><code>rectangle_list</code></em>&#160;:</span></p></td>
2097
+ <td> a rectangle list, as obtained from <code class="function">cairo_copy_clip_rectangles()</code>
2098
+ </td>
2099
+ </tr></tbody>
2100
+ </table></div>
2101
+ <p class="since">Since 1.4
2102
+ </p>
2103
+ </div>
2104
+ <hr>
2105
+ <div class="refsect2" lang="en">
2106
+ <a name="id2638028"></a><h3>
2107
+ <a name="cairo-copy-clip-rectangle-list"></a>cairo_copy_clip_rectangle_list ()</h3>
2108
+ <a class="indexterm" name="id2638044"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t">cairo_rectangle_list_t</a>* cairo_copy_clip_rectangle_list (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
2109
+ <p>
2110
+ Gets the current clip region as a list of rectangles in user coordinates.
2111
+ Never returns <code class="literal">NULL</code>.
2112
+ </p>
2113
+ <p>
2114
+ The status in the list may be <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-CLIP-NOT-REPRESENTABLE:CAPS"><code class="literal">CAIRO_STATUS_CLIP_NOT_REPRESENTABLE</code></a> to
2115
+ indicate that the clip region cannot be represented as a list of
2116
+ user-space rectangles. The status may have other values to indicate
2117
+ other errors.</p>
2118
+ <p>
2119
+
2120
+ </p>
2121
+ <div class="variablelist"><table border="0">
2122
+ <col align="left" valign="top">
2123
+ <tbody>
2124
+ <tr>
2125
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2126
+ <td> a cairo context
2127
+ </td>
2128
+ </tr>
2129
+ <tr>
2130
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
2131
+ <td> the current clip region as a list of rectangles in user coordinates,
2132
+ which should be destroyed using <a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-destroy"><code class="function">cairo_rectangle_list_destroy()</code></a>.
2133
+
2134
+ </td>
2135
+ </tr>
2136
+ </tbody>
2137
+ </table></div>
2138
+ <p class="since">Since 1.4
2139
+ </p>
2140
+ </div>
2141
+ <hr>
2142
+ <div class="refsect2" lang="en">
2143
+ <a name="id2638152"></a><h3>
2144
+ <a name="cairo-fill"></a>cairo_fill ()</h3>
2145
+ <a class="indexterm" name="id2638164"></a><pre class="programlisting">void cairo_fill (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
2146
+ <p>
2147
+ A drawing operator that fills the current path according to the
2148
+ current fill rule, (each sub-path is implicitly closed before being
2149
+ filled). After <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a>, the current path will be cleared from
2150
+ the cairo context. See <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule"><code class="function">cairo_set_fill_rule()</code></a> and
2151
+ <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve"><code class="function">cairo_fill_preserve()</code></a>.</p>
2152
+ <p>
2153
+
2154
+ </p>
2155
+ <div class="variablelist"><table border="0">
2156
+ <col align="left" valign="top">
2157
+ <tbody><tr>
2158
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2159
+ <td> a cairo context
2160
+ </td>
2161
+ </tr></tbody>
2162
+ </table></div>
2163
+ </div>
2164
+ <hr>
2165
+ <div class="refsect2" lang="en">
2166
+ <a name="id2638246"></a><h3>
2167
+ <a name="cairo-fill-preserve"></a>cairo_fill_preserve ()</h3>
2168
+ <a class="indexterm" name="id2638260"></a><pre class="programlisting">void cairo_fill_preserve (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
2169
+ <p>
2170
+ A drawing operator that fills the current path according to the
2171
+ current fill rule, (each sub-path is implicitly closed before being
2172
+ filled). Unlike <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve"><code class="function">cairo_fill_preserve()</code></a> preserves the
2173
+ path within the cairo context.
2174
+ </p>
2175
+ <p>
2176
+ See <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a>.</p>
2177
+ <p>
2178
+
2179
+ </p>
2180
+ <div class="variablelist"><table border="0">
2181
+ <col align="left" valign="top">
2182
+ <tbody><tr>
2183
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2184
+ <td> a cairo context
2185
+ </td>
2186
+ </tr></tbody>
2187
+ </table></div>
2188
+ </div>
2189
+ <hr>
2190
+ <div class="refsect2" lang="en">
2191
+ <a name="id2638355"></a><h3>
2192
+ <a name="cairo-fill-extents"></a>cairo_fill_extents ()</h3>
2193
+ <a class="indexterm" name="id2638368"></a><pre class="programlisting">void cairo_fill_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
2194
+ double *x1,
2195
+ double *y1,
2196
+ double *x2,
2197
+ double *y2);</pre>
2198
+ <p>
2199
+ Computes a bounding box in user coordinates covering the area that
2200
+ would be affected, (the "inked" area), by a <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a> operation
2201
+ given the current path and fill parameters. If the current path is
2202
+ empty, returns an empty rectangle ((0,0), (0,0)). Surface
2203
+ dimensions and clipping are not taken into account.
2204
+ </p>
2205
+ <p>
2206
+ Contrast with <a class="link" href="cairo-Paths.html#cairo-path-extents"><code class="function">cairo_path_extents()</code></a>, which is similar, but returns
2207
+ non-zero extents for some paths with no inked area, (such as a
2208
+ simple line segment).
2209
+ </p>
2210
+ <p>
2211
+ Note that <a class="link" href="cairo-cairo-t.html#cairo-fill-extents"><code class="function">cairo_fill_extents()</code></a> must necessarily do more work to
2212
+ compute the precise inked areas in light of the fill rule, so
2213
+ <a class="link" href="cairo-Paths.html#cairo-path-extents"><code class="function">cairo_path_extents()</code></a> may be more desirable for sake of performance
2214
+ if the non-inked path extents are desired.
2215
+ </p>
2216
+ <p>
2217
+ See <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve"><code class="function">cairo_fill_preserve()</code></a>.</p>
2218
+ <p>
2219
+
2220
+ </p>
2221
+ <div class="variablelist"><table border="0">
2222
+ <col align="left" valign="top">
2223
+ <tbody>
2224
+ <tr>
2225
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2226
+ <td> a cairo context
2227
+ </td>
2228
+ </tr>
2229
+ <tr>
2230
+ <td><p><span class="term"><em class="parameter"><code>x1</code></em>&#160;:</span></p></td>
2231
+ <td> left of the resulting extents
2232
+ </td>
2233
+ </tr>
2234
+ <tr>
2235
+ <td><p><span class="term"><em class="parameter"><code>y1</code></em>&#160;:</span></p></td>
2236
+ <td> top of the resulting extents
2237
+ </td>
2238
+ </tr>
2239
+ <tr>
2240
+ <td><p><span class="term"><em class="parameter"><code>x2</code></em>&#160;:</span></p></td>
2241
+ <td> right of the resulting extents
2242
+ </td>
2243
+ </tr>
2244
+ <tr>
2245
+ <td><p><span class="term"><em class="parameter"><code>y2</code></em>&#160;:</span></p></td>
2246
+ <td> bottom of the resulting extents
2247
+ </td>
2248
+ </tr>
2249
+ </tbody>
2250
+ </table></div>
2251
+ </div>
2252
+ <hr>
2253
+ <div class="refsect2" lang="en">
2254
+ <a name="id2638592"></a><h3>
2255
+ <a name="cairo-in-fill"></a>cairo_in_fill ()</h3>
2256
+ <a class="indexterm" name="id2638606"></a><pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> cairo_in_fill (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
2257
+ double x,
2258
+ double y);</pre>
2259
+ <p>
2260
+ Tests whether the given point is inside the area that would be
2261
+ affected by a <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a> operation given the current path and
2262
+ filling parameters. Surface dimensions and clipping are not taken
2263
+ into account.
2264
+ </p>
2265
+ <p>
2266
+ See <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve"><code class="function">cairo_fill_preserve()</code></a>.</p>
2267
+ <p>
2268
+
2269
+ </p>
2270
+ <div class="variablelist"><table border="0">
2271
+ <col align="left" valign="top">
2272
+ <tbody>
2273
+ <tr>
2274
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2275
+ <td> a cairo context
2276
+ </td>
2277
+ </tr>
2278
+ <tr>
2279
+ <td><p><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></p></td>
2280
+ <td> X coordinate of the point to test
2281
+ </td>
2282
+ </tr>
2283
+ <tr>
2284
+ <td><p><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></p></td>
2285
+ <td> Y coordinate of the point to test
2286
+ </td>
2287
+ </tr>
2288
+ <tr>
2289
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
2290
+ <td> A non-zero value if the point is inside, or zero if
2291
+ outside.
2292
+ </td>
2293
+ </tr>
2294
+ </tbody>
2295
+ </table></div>
2296
+ </div>
2297
+ <hr>
2298
+ <div class="refsect2" lang="en">
2299
+ <a name="id2638756"></a><h3>
2300
+ <a name="cairo-mask"></a>cairo_mask ()</h3>
2301
+ <a class="indexterm" name="id2638769"></a><pre class="programlisting">void cairo_mask (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
2302
+ <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre>
2303
+ <p>
2304
+ A drawing operator that paints the current source
2305
+ using the alpha channel of <em class="parameter"><code>pattern</code></em> as a mask. (Opaque
2306
+ areas of <em class="parameter"><code>pattern</code></em> are painted with the source, transparent
2307
+ areas are not painted.)</p>
2308
+ <p>
2309
+
2310
+ </p>
2311
+ <div class="variablelist"><table border="0">
2312
+ <col align="left" valign="top">
2313
+ <tbody>
2314
+ <tr>
2315
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2316
+ <td> a cairo context
2317
+ </td>
2318
+ </tr>
2319
+ <tr>
2320
+ <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
2321
+ <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
2322
+ </td>
2323
+ </tr>
2324
+ </tbody>
2325
+ </table></div>
2326
+ </div>
2327
+ <hr>
2328
+ <div class="refsect2" lang="en">
2329
+ <a name="id2638862"></a><h3>
2330
+ <a name="cairo-mask-surface"></a>cairo_mask_surface ()</h3>
2331
+ <a class="indexterm" name="id2638876"></a><pre class="programlisting">void cairo_mask_surface (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
2332
+ <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,
2333
+ double surface_x,
2334
+ double surface_y);</pre>
2335
+ <p>
2336
+ A drawing operator that paints the current source
2337
+ using the alpha channel of <em class="parameter"><code>surface</code></em> as a mask. (Opaque
2338
+ areas of <em class="parameter"><code>surface</code></em> are painted with the source, transparent
2339
+ areas are not painted.)</p>
2340
+ <p>
2341
+
2342
+ </p>
2343
+ <div class="variablelist"><table border="0">
2344
+ <col align="left" valign="top">
2345
+ <tbody>
2346
+ <tr>
2347
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2348
+ <td> a cairo context
2349
+ </td>
2350
+ </tr>
2351
+ <tr>
2352
+ <td><p><span class="term"><em class="parameter"><code>surface</code></em>&#160;:</span></p></td>
2353
+ <td> a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a>
2354
+ </td>
2355
+ </tr>
2356
+ <tr>
2357
+ <td><p><span class="term"><em class="parameter"><code>surface_x</code></em>&#160;:</span></p></td>
2358
+ <td> X coordinate at which to place the origin of <em class="parameter"><code>surface</code></em>
2359
+ </td>
2360
+ </tr>
2361
+ <tr>
2362
+ <td><p><span class="term"><em class="parameter"><code>surface_y</code></em>&#160;:</span></p></td>
2363
+ <td> Y coordinate at which to place the origin of <em class="parameter"><code>surface</code></em>
2364
+ </td>
2365
+ </tr>
2366
+ </tbody>
2367
+ </table></div>
2368
+ </div>
2369
+ <hr>
2370
+ <div class="refsect2" lang="en">
2371
+ <a name="id2639025"></a><h3>
2372
+ <a name="cairo-paint"></a>cairo_paint ()</h3>
2373
+ <a class="indexterm" name="id2639038"></a><pre class="programlisting">void cairo_paint (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
2374
+ <p>
2375
+ A drawing operator that paints the current source everywhere within
2376
+ the current clip region.</p>
2377
+ <p>
2378
+
2379
+ </p>
2380
+ <div class="variablelist"><table border="0">
2381
+ <col align="left" valign="top">
2382
+ <tbody><tr>
2383
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2384
+ <td> a cairo context
2385
+ </td>
2386
+ </tr></tbody>
2387
+ </table></div>
2388
+ </div>
2389
+ <hr>
2390
+ <div class="refsect2" lang="en">
2391
+ <a name="id2639090"></a><h3>
2392
+ <a name="cairo-paint-with-alpha"></a>cairo_paint_with_alpha ()</h3>
2393
+ <a class="indexterm" name="id2639103"></a><pre class="programlisting">void cairo_paint_with_alpha (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
2394
+ double alpha);</pre>
2395
+ <p>
2396
+ A drawing operator that paints the current source everywhere within
2397
+ the current clip region using a mask of constant alpha value
2398
+ <em class="parameter"><code>alpha</code></em>. The effect is similar to <a class="link" href="cairo-cairo-t.html#cairo-paint"><code class="function">cairo_paint()</code></a>, but the drawing
2399
+ is faded out using the alpha value.</p>
2400
+ <p>
2401
+
2402
+ </p>
2403
+ <div class="variablelist"><table border="0">
2404
+ <col align="left" valign="top">
2405
+ <tbody>
2406
+ <tr>
2407
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2408
+ <td> a cairo context
2409
+ </td>
2410
+ </tr>
2411
+ <tr>
2412
+ <td><p><span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></p></td>
2413
+ <td> alpha value, between 0 (transparent) and 1 (opaque)
2414
+ </td>
2415
+ </tr>
2416
+ </tbody>
2417
+ </table></div>
2418
+ </div>
2419
+ <hr>
2420
+ <div class="refsect2" lang="en">
2421
+ <a name="id2639194"></a><h3>
2422
+ <a name="cairo-stroke"></a>cairo_stroke ()</h3>
2423
+ <a class="indexterm" name="id2639207"></a><pre class="programlisting">void cairo_stroke (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
2424
+ <p>
2425
+ A drawing operator that strokes the current path according to the
2426
+ current line width, line join, line cap, and dash settings. After
2427
+ cairo_stroke, the current path will be cleared from the cairo
2428
+ context. See <a class="link" href="cairo-cairo-t.html#cairo-set-line-width"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join"><code class="function">cairo_set_line_join()</code></a>,
2429
+ <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash"><code class="function">cairo_set_dash()</code></a>, and
2430
+ <a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve"><code class="function">cairo_stroke_preserve()</code></a>.
2431
+ </p>
2432
+ <p>
2433
+ Note: Degenerate segments and sub-paths are treated specially and
2434
+ provide a useful result. These can result in two different
2435
+ situations:
2436
+ </p>
2437
+ <p>
2438
+ 1. Zero-length "on" segments set in <a class="link" href="cairo-cairo-t.html#cairo-set-dash"><code class="function">cairo_set_dash()</code></a>. If the cap
2439
+ style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> or <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> then these
2440
+ segments will be drawn as circular dots or squares respectively. In
2441
+ the case of <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a>, the orientation of the squares
2442
+ is determined by the direction of the underlying path.
2443
+ </p>
2444
+ <p>
2445
+ 2. A sub-path created by <a class="link" href="cairo-Paths.html#cairo-move-to"><code class="function">cairo_move_to()</code></a> followed by either a
2446
+ <a class="link" href="cairo-Paths.html#cairo-close-path"><code class="function">cairo_close_path()</code></a> or one or more calls to <a class="link" href="cairo-Paths.html#cairo-line-to"><code class="function">cairo_line_to()</code></a> to the
2447
+ same coordinate as the <a class="link" href="cairo-Paths.html#cairo-move-to"><code class="function">cairo_move_to()</code></a>. If the cap style is
2448
+ CAIRO_LINE_CAP_ROUND then these sub-paths will be drawn as circular
2449
+ dots. Note that in the case of <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> a degenerate
2450
+ sub-path will not be drawn at all, (since the correct orientation
2451
+ is indeterminate).
2452
+ </p>
2453
+ <p>
2454
+ In no case will a cap style of <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a> cause anything
2455
+ to be drawn in the case of either degenerate segments or sub-paths.</p>
2456
+ <p>
2457
+
2458
+ </p>
2459
+ <div class="variablelist"><table border="0">
2460
+ <col align="left" valign="top">
2461
+ <tbody><tr>
2462
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2463
+ <td> a cairo context
2464
+ </td>
2465
+ </tr></tbody>
2466
+ </table></div>
2467
+ </div>
2468
+ <hr>
2469
+ <div class="refsect2" lang="en">
2470
+ <a name="id2639433"></a><h3>
2471
+ <a name="cairo-stroke-preserve"></a>cairo_stroke_preserve ()</h3>
2472
+ <a class="indexterm" name="id2639446"></a><pre class="programlisting">void cairo_stroke_preserve (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
2473
+ <p>
2474
+ A drawing operator that strokes the current path according to the
2475
+ current line width, line join, line cap, and dash settings. Unlike
2476
+ <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve"><code class="function">cairo_stroke_preserve()</code></a> preserves the path within the
2477
+ cairo context.
2478
+ </p>
2479
+ <p>
2480
+ See <a class="link" href="cairo-cairo-t.html#cairo-set-line-width"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join"><code class="function">cairo_set_line_join()</code></a>,
2481
+ <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash"><code class="function">cairo_set_dash()</code></a>, and
2482
+ <a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve"><code class="function">cairo_stroke_preserve()</code></a>.</p>
2483
+ <p>
2484
+
2485
+ </p>
2486
+ <div class="variablelist"><table border="0">
2487
+ <col align="left" valign="top">
2488
+ <tbody><tr>
2489
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2490
+ <td> a cairo context
2491
+ </td>
2492
+ </tr></tbody>
2493
+ </table></div>
2494
+ </div>
2495
+ <hr>
2496
+ <div class="refsect2" lang="en">
2497
+ <a name="id2639571"></a><h3>
2498
+ <a name="cairo-stroke-extents"></a>cairo_stroke_extents ()</h3>
2499
+ <a class="indexterm" name="id2639585"></a><pre class="programlisting">void cairo_stroke_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
2500
+ double *x1,
2501
+ double *y1,
2502
+ double *x2,
2503
+ double *y2);</pre>
2504
+ <p>
2505
+ Computes a bounding box in user coordinates covering the area that
2506
+ would be affected, (the "inked" area), by a <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a>
2507
+ operation operation given the current path and stroke
2508
+ parameters. If the current path is empty, returns an empty
2509
+ rectangle ((0,0), (0,0)). Surface dimensions and clipping are not
2510
+ taken into account.
2511
+ </p>
2512
+ <p>
2513
+ Note that if the line width is set to exactly zero, then
2514
+ <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents"><code class="function">cairo_stroke_extents()</code></a> will return an empty rectangle. Contrast with
2515
+ <a class="link" href="cairo-Paths.html#cairo-path-extents"><code class="function">cairo_path_extents()</code></a> which can be used to compute the non-empty
2516
+ bounds as the line width approaches zero.
2517
+ </p>
2518
+ <p>
2519
+ Note that <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents"><code class="function">cairo_stroke_extents()</code></a> must necessarily do more work to
2520
+ compute the precise inked areas in light of the stroke parameters,
2521
+ so <a class="link" href="cairo-Paths.html#cairo-path-extents"><code class="function">cairo_path_extents()</code></a> may be more desirable for sake of
2522
+ performance if non-inked path extents are desired.
2523
+ </p>
2524
+ <p>
2525
+ See <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-width"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join"><code class="function">cairo_set_line_join()</code></a>,
2526
+ <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash"><code class="function">cairo_set_dash()</code></a>, and
2527
+ <a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve"><code class="function">cairo_stroke_preserve()</code></a>.</p>
2528
+ <p>
2529
+
2530
+ </p>
2531
+ <div class="variablelist"><table border="0">
2532
+ <col align="left" valign="top">
2533
+ <tbody>
2534
+ <tr>
2535
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2536
+ <td> a cairo context
2537
+ </td>
2538
+ </tr>
2539
+ <tr>
2540
+ <td><p><span class="term"><em class="parameter"><code>x1</code></em>&#160;:</span></p></td>
2541
+ <td> left of the resulting extents
2542
+ </td>
2543
+ </tr>
2544
+ <tr>
2545
+ <td><p><span class="term"><em class="parameter"><code>y1</code></em>&#160;:</span></p></td>
2546
+ <td> top of the resulting extents
2547
+ </td>
2548
+ </tr>
2549
+ <tr>
2550
+ <td><p><span class="term"><em class="parameter"><code>x2</code></em>&#160;:</span></p></td>
2551
+ <td> right of the resulting extents
2552
+ </td>
2553
+ </tr>
2554
+ <tr>
2555
+ <td><p><span class="term"><em class="parameter"><code>y2</code></em>&#160;:</span></p></td>
2556
+ <td> bottom of the resulting extents
2557
+ </td>
2558
+ </tr>
2559
+ </tbody>
2560
+ </table></div>
2561
+ </div>
2562
+ <hr>
2563
+ <div class="refsect2" lang="en">
2564
+ <a name="id2639850"></a><h3>
2565
+ <a name="cairo-in-stroke"></a>cairo_in_stroke ()</h3>
2566
+ <a class="indexterm" name="id2639863"></a><pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> cairo_in_stroke (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
2567
+ double x,
2568
+ double y);</pre>
2569
+ <p>
2570
+ Tests whether the given point is inside the area that would be
2571
+ affected by a <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a> operation given the current path and
2572
+ stroking parameters. Surface dimensions and clipping are not taken
2573
+ into account.
2574
+ </p>
2575
+ <p>
2576
+ See <a class="link" href="cairo-cairo-t.html#cairo-stroke"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-width"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join"><code class="function">cairo_set_line_join()</code></a>,
2577
+ <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash"><code class="function">cairo_set_dash()</code></a>, and
2578
+ <a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve"><code class="function">cairo_stroke_preserve()</code></a>.</p>
2579
+ <p>
2580
+
2581
+ </p>
2582
+ <div class="variablelist"><table border="0">
2583
+ <col align="left" valign="top">
2584
+ <tbody>
2585
+ <tr>
2586
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2587
+ <td> a cairo context
2588
+ </td>
2589
+ </tr>
2590
+ <tr>
2591
+ <td><p><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></p></td>
2592
+ <td> X coordinate of the point to test
2593
+ </td>
2594
+ </tr>
2595
+ <tr>
2596
+ <td><p><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></p></td>
2597
+ <td> Y coordinate of the point to test
2598
+ </td>
2599
+ </tr>
2600
+ <tr>
2601
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
2602
+ <td> A non-zero value if the point is inside, or zero if
2603
+ outside.
2604
+ </td>
2605
+ </tr>
2606
+ </tbody>
2607
+ </table></div>
2608
+ </div>
2609
+ <hr>
2610
+ <div class="refsect2" lang="en">
2611
+ <a name="id2640043"></a><h3>
2612
+ <a name="cairo-copy-page"></a>cairo_copy_page ()</h3>
2613
+ <a class="indexterm" name="id2640056"></a><pre class="programlisting">void cairo_copy_page (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
2614
+ <p>
2615
+ Emits the current page for backends that support multiple pages, but
2616
+ doesn't clear it, so, the contents of the current page will be retained
2617
+ for the next page too. Use <a class="link" href="cairo-cairo-t.html#cairo-show-page"><code class="function">cairo_show_page()</code></a> if you want to get an
2618
+ empty page after the emission.
2619
+ </p>
2620
+ <p>
2621
+ This is a convenience function that simply calls
2622
+ <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-copy-page"><code class="function">cairo_surface_copy_page()</code></a> on <em class="parameter"><code>cr</code></em>'s target.</p>
2623
+ <p>
2624
+
2625
+ </p>
2626
+ <div class="variablelist"><table border="0">
2627
+ <col align="left" valign="top">
2628
+ <tbody><tr>
2629
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2630
+ <td> a cairo context
2631
+ </td>
2632
+ </tr></tbody>
2633
+ </table></div>
2634
+ </div>
2635
+ <hr>
2636
+ <div class="refsect2" lang="en">
2637
+ <a name="id2640140"></a><h3>
2638
+ <a name="cairo-show-page"></a>cairo_show_page ()</h3>
2639
+ <a class="indexterm" name="id2640153"></a><pre class="programlisting">void cairo_show_page (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
2640
+ <p>
2641
+ Emits and clears the current page for backends that support multiple
2642
+ pages. Use <a class="link" href="cairo-cairo-t.html#cairo-copy-page"><code class="function">cairo_copy_page()</code></a> if you don't want to clear the page.
2643
+ </p>
2644
+ <p>
2645
+ This is a convenience function that simply calls
2646
+ <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-show-page"><code class="function">cairo_surface_show_page()</code></a> on <em class="parameter"><code>cr</code></em>'s target.</p>
2647
+ <p>
2648
+
2649
+ </p>
2650
+ <div class="variablelist"><table border="0">
2651
+ <col align="left" valign="top">
2652
+ <tbody><tr>
2653
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2654
+ <td> a cairo context
2655
+ </td>
2656
+ </tr></tbody>
2657
+ </table></div>
2658
+ </div>
2659
+ <hr>
2660
+ <div class="refsect2" lang="en">
2661
+ <a name="id2640234"></a><h3>
2662
+ <a name="cairo-get-reference-count"></a>cairo_get_reference_count ()</h3>
2663
+ <a class="indexterm" name="id2640251"></a><pre class="programlisting">unsigned int cairo_get_reference_count (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
2664
+ <p>
2665
+ Returns the current reference count of <em class="parameter"><code>cr</code></em>.</p>
2666
+ <p>
2667
+
2668
+ </p>
2669
+ <div class="variablelist"><table border="0">
2670
+ <col align="left" valign="top">
2671
+ <tbody>
2672
+ <tr>
2673
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2674
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
2675
+ </td>
2676
+ </tr>
2677
+ <tr>
2678
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
2679
+ <td> the current reference count of <em class="parameter"><code>cr</code></em>. If the
2680
+ object is a nil object, 0 will be returned.
2681
+
2682
+ </td>
2683
+ </tr>
2684
+ </tbody>
2685
+ </table></div>
2686
+ <p class="since">Since 1.4
2687
+ </p>
2688
+ </div>
2689
+ <hr>
2690
+ <div class="refsect2" lang="en">
2691
+ <a name="id2640340"></a><h3>
2692
+ <a name="cairo-set-user-data"></a>cairo_set_user_data ()</h3>
2693
+ <a class="indexterm" name="id2640356"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_set_user_data (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
2694
+ const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key,
2695
+ void *user_data,
2696
+ <a class="link" href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);</pre>
2697
+ <p>
2698
+ Attach user data to <em class="parameter"><code>cr</code></em>. To remove user data from a surface,
2699
+ call this function with the key that was used to set it and <code class="literal">NULL</code>
2700
+ for <em class="parameter"><code>data</code></em>.</p>
2701
+ <p>
2702
+
2703
+ </p>
2704
+ <div class="variablelist"><table border="0">
2705
+ <col align="left" valign="top">
2706
+ <tbody>
2707
+ <tr>
2708
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2709
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
2710
+ </td>
2711
+ </tr>
2712
+ <tr>
2713
+ <td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
2714
+ <td> the address of a <a class="link" href="cairo-Types.html#cairo-user-data-key-t"><span class="type">cairo_user_data_key_t</span></a> to attach the user data to
2715
+ </td>
2716
+ </tr>
2717
+ <tr>
2718
+ <td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
2719
+ <td> the user data to attach to the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
2720
+ </td>
2721
+ </tr>
2722
+ <tr>
2723
+ <td><p><span class="term"><em class="parameter"><code>destroy</code></em>&#160;:</span></p></td>
2724
+ <td> a <a class="link" href="cairo-Types.html#cairo-destroy-func-t"><span class="type">cairo_destroy_func_t</span></a> which will be called when the
2725
+ <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> is destroyed or when new user data is attached using the
2726
+ same key.
2727
+ </td>
2728
+ </tr>
2729
+ <tr>
2730
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
2731
+ <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a
2732
+ slot could not be allocated for the user data.
2733
+
2734
+ </td>
2735
+ </tr>
2736
+ </tbody>
2737
+ </table></div>
2738
+ <p class="since">Since 1.4
2739
+ </p>
2740
+ </div>
2741
+ <hr>
2742
+ <div class="refsect2" lang="en">
2743
+ <a name="id2640570"></a><h3>
2744
+ <a name="cairo-get-user-data"></a>cairo_get_user_data ()</h3>
2745
+ <a class="indexterm" name="id2640586"></a><pre class="programlisting">void* cairo_get_user_data (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
2746
+ const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);</pre>
2747
+ <p>
2748
+ Return user data previously attached to <em class="parameter"><code>cr</code></em> using the specified
2749
+ key. If no user data has been attached with the given key this
2750
+ function returns <code class="literal">NULL</code>.</p>
2751
+ <p>
2752
+
2753
+ </p>
2754
+ <div class="variablelist"><table border="0">
2755
+ <col align="left" valign="top">
2756
+ <tbody>
2757
+ <tr>
2758
+ <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
2759
+ <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
2760
+ </td>
2761
+ </tr>
2762
+ <tr>
2763
+ <td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
2764
+ <td> the address of the <a class="link" href="cairo-Types.html#cairo-user-data-key-t"><span class="type">cairo_user_data_key_t</span></a> the user data was
2765
+ attached to
2766
+ </td>
2767
+ </tr>
2768
+ <tr>
2769
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
2770
+ <td> the user data previously attached or <code class="literal">NULL</code>.
2771
+
2772
+ </td>
2773
+ </tr>
2774
+ </tbody>
2775
+ </table></div>
2776
+ <p class="since">Since 1.4
2777
+ </p>
2778
+ </div>
2779
+ </div>
2780
+ <div class="refsect1" lang="en">
2781
+ <a name="id2640719"></a><h2>See Also</h2>
2782
+ <p>
2783
+ </p>
2784
+ <div class="itemizedlist"><ul type="disc"><li><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a></li></ul></div>
2785
+ <p>
2786
+ </p>
2787
+ </div>
2788
+ <div class="refsect1" lang="en">
2789
+ <a name="id2640742"></a><div class="refsect2" lang="en"><a name="id2640743"></a></div>
2790
+ <hr>
2791
+ <div class="refsect2" lang="en"><a name="id2640744"></a></div>
2792
+ </div>
2793
+ </div>
2794
+ </body>
2795
+ </html>