cairo 1.8.5-x86-mingw32 → 1.10.0-x86-mingw32

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 (450) hide show
  1. data/NEWS +2 -2
  2. data/Rakefile +44 -7
  3. data/ext/cairo/cairo.def +28 -1
  4. data/ext/cairo/extconf.rb +14 -16
  5. data/ext/cairo/rb_cairo.c +4 -1
  6. data/ext/cairo/rb_cairo.h +65 -1
  7. data/ext/cairo/rb_cairo_constants.c +150 -3
  8. data/ext/cairo/rb_cairo_context.c +17 -0
  9. data/ext/cairo/rb_cairo_device.c +406 -0
  10. data/ext/cairo/rb_cairo_exception.c +83 -32
  11. data/ext/cairo/rb_cairo_io.c +166 -0
  12. data/ext/cairo/rb_cairo_io.h +44 -0
  13. data/ext/cairo/rb_cairo_matrix.c +1 -1
  14. data/ext/cairo/rb_cairo_private.h +3 -0
  15. data/ext/cairo/rb_cairo_region.c +385 -0
  16. data/ext/cairo/rb_cairo_surface.c +674 -199
  17. data/lib/1.8/cairo.so +0 -0
  18. data/lib/1.9/cairo.so +0 -0
  19. data/samples/blur.rb +2 -3
  20. data/samples/{pac2.rb → pac-nomralize.rb} +5 -6
  21. data/samples/pac-tee.rb +170 -0
  22. data/samples/pac.rb +2 -3
  23. data/samples/png.rb +2 -3
  24. data/samples/scalable.rb +2 -3
  25. data/samples/text-on-path.rb +2 -3
  26. data/samples/text2.rb +2 -3
  27. data/test/cairo-test-utils.rb +15 -0
  28. data/test/run-test.rb +5 -4
  29. data/test/test_context.rb +4 -4
  30. data/test/test_font_face.rb +34 -21
  31. data/test/test_recording_surface.rb +18 -0
  32. data/test/test_region.rb +102 -0
  33. data/test/test_script_device.rb +46 -0
  34. data/test/test_script_surface.rb +13 -0
  35. data/test/test_surface.rb +14 -4
  36. data/test/test_tee_surface.rb +32 -0
  37. data/test/test_xml_device.rb +22 -0
  38. data/test/test_xml_surface.rb +32 -0
  39. data/tmp/i386-mingw32/cairo/1.9.2/rbconfig.rb +1 -1
  40. data/vendor/local/bin/libcairo-2.dll +0 -0
  41. data/vendor/local/include/cairo/cairo-deprecated.h +1 -16
  42. data/vendor/local/include/cairo/cairo-features.h +7 -0
  43. data/vendor/local/include/cairo/cairo-ft.h +16 -9
  44. data/vendor/local/include/cairo/cairo-gobject.h +186 -0
  45. data/vendor/local/include/cairo/cairo-pdf.h +27 -1
  46. data/vendor/local/include/cairo/cairo-ps.h +1 -1
  47. data/vendor/local/include/cairo/cairo-script-interpreter.h +117 -0
  48. data/vendor/local/include/cairo/cairo-svg.h +1 -1
  49. data/vendor/local/include/cairo/cairo-version.h +2 -2
  50. data/vendor/local/include/cairo/cairo-win32.h +1 -1
  51. data/vendor/local/include/cairo/cairo.h +382 -26
  52. data/vendor/local/lib/cairo.def +44 -0
  53. data/vendor/local/lib/cairo.lib +0 -0
  54. data/vendor/local/lib/libcairo.dll.a +0 -0
  55. data/vendor/local/lib/pkgconfig/cairo-fc.pc +12 -0
  56. data/vendor/local/lib/pkgconfig/cairo-ft.pc +4 -4
  57. data/vendor/local/lib/pkgconfig/cairo-gobject.pc +12 -0
  58. data/vendor/local/lib/pkgconfig/cairo-pdf.pc +3 -3
  59. data/vendor/local/lib/pkgconfig/cairo-png.pc +3 -3
  60. data/vendor/local/lib/pkgconfig/cairo-ps.pc +3 -3
  61. data/vendor/local/lib/pkgconfig/cairo-svg.pc +3 -3
  62. data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +3 -3
  63. data/vendor/local/lib/pkgconfig/cairo-win32.pc +3 -3
  64. data/vendor/local/lib/pkgconfig/cairo.pc +4 -4
  65. data/vendor/local/manifest/{cairo-dev_1.8.10-4_win32.mft → cairo-dev_1.10.0-1_win32.mft} +34 -27
  66. data/vendor/local/manifest/cairo_1.10.0-1_win32.mft +5 -0
  67. data/vendor/local/share/doc/{cairo_1.8.10-4_win32 → cairo_1.10.0-1_win32}/COPYING +9 -8
  68. data/vendor/local/share/doc/{cairo_1.8.10-4_win32 → cairo_1.10.0-1_win32}/COPYING-LGPL-2.1 +2 -2
  69. data/vendor/local/share/doc/{cairo_1.8.10-4_win32 → cairo_1.10.0-1_win32}/COPYING-MPL-1.1 +0 -0
  70. data/vendor/local/share/gtk-doc/html/cairo/bindings-errors.html +4 -14
  71. data/vendor/local/share/gtk-doc/html/cairo/bindings-fonts.html +5 -15
  72. data/vendor/local/share/gtk-doc/html/cairo/bindings-memory.html +7 -17
  73. data/vendor/local/share/gtk-doc/html/cairo/bindings-overloading.html +6 -16
  74. data/vendor/local/share/gtk-doc/html/cairo/bindings-path.html +6 -16
  75. data/vendor/local/share/gtk-doc/html/cairo/bindings-patterns.html +23 -28
  76. data/vendor/local/share/gtk-doc/html/cairo/bindings-return-values.html +3 -13
  77. data/vendor/local/share/gtk-doc/html/cairo/bindings-streams.html +3 -13
  78. data/vendor/local/share/gtk-doc/html/cairo/bindings-surfaces.html +7 -17
  79. data/vendor/local/share/gtk-doc/html/cairo/cairo-Error-handling.html +373 -0
  80. data/vendor/local/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +330 -0
  81. data/vendor/local/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +478 -0
  82. data/vendor/local/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +344 -0
  83. data/vendor/local/share/gtk-doc/html/cairo/cairo-PNG-Support.html +320 -0
  84. data/vendor/local/share/gtk-doc/html/cairo/cairo-Paths.html +1291 -0
  85. data/vendor/local/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +622 -0
  86. data/vendor/local/share/gtk-doc/html/cairo/cairo-Quartz-(CGFont)-Fonts.html +134 -0
  87. data/vendor/local/share/gtk-doc/html/cairo/cairo-Quartz-Surfaces.html +210 -0
  88. data/vendor/local/share/gtk-doc/html/cairo/cairo-Regions.html +834 -0
  89. data/vendor/local/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +318 -0
  90. data/vendor/local/share/gtk-doc/html/cairo/cairo-Transformations.html +410 -0
  91. data/vendor/local/share/gtk-doc/html/cairo/cairo-Types.html +169 -0
  92. data/vendor/local/share/gtk-doc/html/cairo/cairo-User-Fonts.html +715 -0
  93. data/vendor/local/share/gtk-doc/html/cairo/cairo-Version-Information.html +410 -0
  94. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +335 -0
  95. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +291 -0
  96. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +470 -0
  97. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-device-t.html +595 -0
  98. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +384 -0
  99. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-options-t.html +644 -0
  100. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-matrix-t.html +574 -0
  101. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html +1457 -0
  102. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html +1076 -0
  103. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +1396 -0
  104. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-t.html +2743 -0
  105. data/vendor/local/share/gtk-doc/html/cairo/cairo-drawing.html +13 -20
  106. data/vendor/local/share/gtk-doc/html/cairo/cairo-fonts.html +13 -23
  107. data/vendor/local/share/gtk-doc/html/cairo/cairo-support.html +11 -21
  108. data/vendor/local/share/gtk-doc/html/cairo/cairo-surfaces.html +19 -26
  109. data/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +279 -326
  110. data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp +411 -355
  111. data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp2 +579 -480
  112. data/vendor/local/share/gtk-doc/html/cairo/index-1.10.html +147 -0
  113. data/vendor/local/share/gtk-doc/html/cairo/index-1.2.html +88 -65
  114. data/vendor/local/share/gtk-doc/html/cairo/index-1.4.html +72 -47
  115. data/vendor/local/share/gtk-doc/html/cairo/index-1.6.html +43 -32
  116. data/vendor/local/share/gtk-doc/html/cairo/index-1.8.html +42 -41
  117. data/vendor/local/share/gtk-doc/html/cairo/index-all.html +542 -345
  118. data/vendor/local/share/gtk-doc/html/cairo/index.html +36 -39
  119. data/vendor/local/share/gtk-doc/html/cairo/index.sgml +674 -444
  120. data/vendor/local/share/gtk-doc/html/cairo/language-bindings.html +6 -16
  121. data/vendor/local/share/gtk-doc/html/cairo/style.css +152 -54
  122. data/vendor/local/src/tml/packaging/cairo_1.10.0-1_win32.log +1262 -0
  123. data/vendor/local/src/tml/packaging/{cairo_1.8.10-4_win32.sh → cairo_1.10.0-1_win32.sh} +3 -3
  124. metadata +137 -389
  125. data/doc/doc.css +0 -91
  126. data/doc/en/cairo-antialias.html +0 -38
  127. data/doc/en/cairo-clip-not-representable-error.html +0 -47
  128. data/doc/en/cairo-color-base.html +0 -69
  129. data/doc/en/cairo-color-cmyk.html +0 -157
  130. data/doc/en/cairo-color-hsv.html +0 -137
  131. data/doc/en/cairo-color-rgb.html +0 -142
  132. data/doc/en/cairo-color-x11.html +0 -173
  133. data/doc/en/cairo-color.html +0 -238
  134. data/doc/en/cairo-content.html +0 -37
  135. data/doc/en/cairo-context-blur.html +0 -39
  136. data/doc/en/cairo-context-circle.html +0 -39
  137. data/doc/en/cairo-context-color.html +0 -39
  138. data/doc/en/cairo-context-path.html +0 -44
  139. data/doc/en/cairo-context-rectangle.html +0 -39
  140. data/doc/en/cairo-context-triangle.html +0 -39
  141. data/doc/en/cairo-context.html +0 -643
  142. data/doc/en/cairo-error.html +0 -44
  143. data/doc/en/cairo-extend.html +0 -38
  144. data/doc/en/cairo-file-not-found.html +0 -47
  145. data/doc/en/cairo-fill-rule.html +0 -36
  146. data/doc/en/cairo-filter.html +0 -40
  147. data/doc/en/cairo-font-extents.html +0 -129
  148. data/doc/en/cairo-font-face.html +0 -38
  149. data/doc/en/cairo-font-options.html +0 -139
  150. data/doc/en/cairo-font-slant.html +0 -37
  151. data/doc/en/cairo-font-type-mismatch.html +0 -47
  152. data/doc/en/cairo-font-weight.html +0 -36
  153. data/doc/en/cairo-format.html +0 -46
  154. data/doc/en/cairo-glyph.html +0 -99
  155. data/doc/en/cairo-gradient-pattern.html +0 -74
  156. data/doc/en/cairo-hint-metrics.html +0 -37
  157. data/doc/en/cairo-hint-style.html +0 -39
  158. data/doc/en/cairo-image-surface.html +0 -82
  159. data/doc/en/cairo-invalid-clusters.html +0 -47
  160. data/doc/en/cairo-invalid-content-error.html +0 -47
  161. data/doc/en/cairo-invalid-dash-error.html +0 -47
  162. data/doc/en/cairo-invalid-dsc-comment-error.html +0 -47
  163. data/doc/en/cairo-invalid-format-error.html +0 -47
  164. data/doc/en/cairo-invalid-index-error.html +0 -47
  165. data/doc/en/cairo-invalid-matrix-error.html +0 -47
  166. data/doc/en/cairo-invalid-path-data-error.html +0 -47
  167. data/doc/en/cairo-invalid-pop-group-error.html +0 -47
  168. data/doc/en/cairo-invalid-restore-error.html +0 -47
  169. data/doc/en/cairo-invalid-slant.html +0 -47
  170. data/doc/en/cairo-invalid-status-error.html +0 -47
  171. data/doc/en/cairo-invalid-stride-error.html +0 -47
  172. data/doc/en/cairo-invalid-string-error.html +0 -47
  173. data/doc/en/cairo-invalid-visual-error.html +0 -47
  174. data/doc/en/cairo-invalid-weight.html +0 -47
  175. data/doc/en/cairo-line-cap.html +0 -37
  176. data/doc/en/cairo-line-join.html +0 -37
  177. data/doc/en/cairo-linear-pattern.html +0 -60
  178. data/doc/en/cairo-matrix.html +0 -259
  179. data/doc/en/cairo-negative-count.html +0 -47
  180. data/doc/en/cairo-no-current-point-error.html +0 -47
  181. data/doc/en/cairo-null-pointer-error.html +0 -47
  182. data/doc/en/cairo-operator.html +0 -48
  183. data/doc/en/cairo-paper-parse-error.html +0 -47
  184. data/doc/en/cairo-paper-unknown-paper-name.html +0 -66
  185. data/doc/en/cairo-paper-unknown-unit.html +0 -66
  186. data/doc/en/cairo-paper-unrecognized-paper-description.html +0 -66
  187. data/doc/en/cairo-paper.html +0 -184
  188. data/doc/en/cairo-path-close-path.html +0 -49
  189. data/doc/en/cairo-path-curve-to.html +0 -49
  190. data/doc/en/cairo-path-data-type.html +0 -38
  191. data/doc/en/cairo-path-data.html +0 -98
  192. data/doc/en/cairo-path-line-to.html +0 -49
  193. data/doc/en/cairo-path-move-to.html +0 -49
  194. data/doc/en/cairo-path.html +0 -155
  195. data/doc/en/cairo-pattern-type-mismatch-error.html +0 -47
  196. data/doc/en/cairo-pattern.html +0 -99
  197. data/doc/en/cairo-pdf-surface.html +0 -57
  198. data/doc/en/cairo-point.html +0 -74
  199. data/doc/en/cairo-ps-level.html +0 -49
  200. data/doc/en/cairo-ps-surface.html +0 -92
  201. data/doc/en/cairo-quartz-image-surface.html +0 -57
  202. data/doc/en/cairo-quartz-surface.html +0 -57
  203. data/doc/en/cairo-radial-pattern.html +0 -60
  204. data/doc/en/cairo-read-error.html +0 -47
  205. data/doc/en/cairo-rectangle.html +0 -89
  206. data/doc/en/cairo-scaled-font.html +0 -94
  207. data/doc/en/cairo-solid-pattern.html +0 -62
  208. data/doc/en/cairo-subpixel-order.html +0 -39
  209. data/doc/en/cairo-surface-finished-error.html +0 -47
  210. data/doc/en/cairo-surface-pattern.html +0 -57
  211. data/doc/en/cairo-surface-type-mismatch-error.html +0 -47
  212. data/doc/en/cairo-surface.html +0 -121
  213. data/doc/en/cairo-svg-surface.html +0 -77
  214. data/doc/en/cairo-svg-version.html +0 -49
  215. data/doc/en/cairo-temp-file-error.html +0 -47
  216. data/doc/en/cairo-text-cluster-flag.html +0 -35
  217. data/doc/en/cairo-text-cluster.html +0 -84
  218. data/doc/en/cairo-text-extents.html +0 -144
  219. data/doc/en/cairo-toy-font-face.html +0 -67
  220. data/doc/en/cairo-user-font-error.html +0 -47
  221. data/doc/en/cairo-user-font-face-text-to-glyphs-data.html +0 -94
  222. data/doc/en/cairo-user-font-face.html +0 -72
  223. data/doc/en/cairo-user-font-immutable.html +0 -47
  224. data/doc/en/cairo-win32-printing-surface.html +0 -57
  225. data/doc/en/cairo-win32-surface.html +0 -62
  226. data/doc/en/cairo-write-error.html +0 -47
  227. data/doc/en/cairo.html +0 -131
  228. data/doc/en/index.html +0 -1154
  229. data/doc/index.html +0 -18
  230. data/doc/ja/cairo-antialias.html +0 -57
  231. data/doc/ja/cairo-clip-not-representable-error.html +0 -56
  232. data/doc/ja/cairo-color-base.html +0 -75
  233. data/doc/ja/cairo-color-cmyk.html +0 -152
  234. data/doc/ja/cairo-color-hsv.html +0 -135
  235. data/doc/ja/cairo-color-rgb.html +0 -145
  236. data/doc/ja/cairo-color-x11.html +0 -183
  237. data/doc/ja/cairo-color.html +0 -317
  238. data/doc/ja/cairo-content.html +0 -51
  239. data/doc/ja/cairo-context-blur.html +0 -53
  240. data/doc/ja/cairo-context-circle.html +0 -54
  241. data/doc/ja/cairo-context-color.html +0 -52
  242. data/doc/ja/cairo-context-path.html +0 -77
  243. data/doc/ja/cairo-context-rectangle.html +0 -60
  244. data/doc/ja/cairo-context-triangle.html +0 -47
  245. data/doc/ja/cairo-context.html +0 -1542
  246. data/doc/ja/cairo-error.html +0 -56
  247. data/doc/ja/cairo-extend.html +0 -56
  248. data/doc/ja/cairo-file-not-found.html +0 -51
  249. data/doc/ja/cairo-fill-rule.html +0 -58
  250. data/doc/ja/cairo-filter.html +0 -43
  251. data/doc/ja/cairo-font-extents.html +0 -164
  252. data/doc/ja/cairo-font-face.html +0 -55
  253. data/doc/ja/cairo-font-options.html +0 -189
  254. data/doc/ja/cairo-font-slant.html +0 -50
  255. data/doc/ja/cairo-font-type-mismatch.html +0 -52
  256. data/doc/ja/cairo-font-weight.html +0 -47
  257. data/doc/ja/cairo-format.html +0 -81
  258. data/doc/ja/cairo-glyph.html +0 -115
  259. data/doc/ja/cairo-gradient-pattern.html +0 -119
  260. data/doc/ja/cairo-hint-metrics.html +0 -57
  261. data/doc/ja/cairo-hint-style.html +0 -64
  262. data/doc/ja/cairo-image-surface.html +0 -131
  263. data/doc/ja/cairo-invalid-clusters.html +0 -55
  264. data/doc/ja/cairo-invalid-content-error.html +0 -54
  265. data/doc/ja/cairo-invalid-dash-error.html +0 -54
  266. data/doc/ja/cairo-invalid-dsc-comment-error.html +0 -54
  267. data/doc/ja/cairo-invalid-format-error.html +0 -54
  268. data/doc/ja/cairo-invalid-index-error.html +0 -54
  269. data/doc/ja/cairo-invalid-matrix-error.html +0 -54
  270. data/doc/ja/cairo-invalid-path-data-error.html +0 -54
  271. data/doc/ja/cairo-invalid-pop-group-error.html +0 -54
  272. data/doc/ja/cairo-invalid-restore-error.html +0 -55
  273. data/doc/ja/cairo-invalid-slant.html +0 -57
  274. data/doc/ja/cairo-invalid-status-error.html +0 -55
  275. data/doc/ja/cairo-invalid-stride-error.html +0 -55
  276. data/doc/ja/cairo-invalid-string-error.html +0 -54
  277. data/doc/ja/cairo-invalid-visual-error.html +0 -57
  278. data/doc/ja/cairo-invalid-weight.html +0 -57
  279. data/doc/ja/cairo-line-cap.html +0 -50
  280. data/doc/ja/cairo-line-join.html +0 -53
  281. data/doc/ja/cairo-linear-pattern.html +0 -87
  282. data/doc/ja/cairo-matrix.html +0 -354
  283. data/doc/ja/cairo-negative-count.html +0 -52
  284. data/doc/ja/cairo-no-current-point-error.html +0 -54
  285. data/doc/ja/cairo-null-pointer-error.html +0 -54
  286. data/doc/ja/cairo-operator.html +0 -51
  287. data/doc/ja/cairo-paper-parse-error.html +0 -55
  288. data/doc/ja/cairo-paper-unknown-paper-name.html +0 -76
  289. data/doc/ja/cairo-paper-unknown-unit.html +0 -75
  290. data/doc/ja/cairo-paper-unrecognized-paper-description.html +0 -76
  291. data/doc/ja/cairo-paper.html +0 -357
  292. data/doc/ja/cairo-path-close-path.html +0 -57
  293. data/doc/ja/cairo-path-curve-to.html +0 -70
  294. data/doc/ja/cairo-path-data-type.html +0 -53
  295. data/doc/ja/cairo-path-data.html +0 -127
  296. data/doc/ja/cairo-path-line-to.html +0 -62
  297. data/doc/ja/cairo-path-move-to.html +0 -62
  298. data/doc/ja/cairo-path.html +0 -144
  299. data/doc/ja/cairo-pattern-type-mismatch-error.html +0 -56
  300. data/doc/ja/cairo-pattern.html +0 -128
  301. data/doc/ja/cairo-pdf-surface.html +0 -86
  302. data/doc/ja/cairo-point.html +0 -90
  303. data/doc/ja/cairo-ps-level.html +0 -62
  304. data/doc/ja/cairo-ps-surface.html +0 -214
  305. data/doc/ja/cairo-quartz-image-surface.html +0 -75
  306. data/doc/ja/cairo-quartz-surface.html +0 -93
  307. data/doc/ja/cairo-radial-pattern.html +0 -93
  308. data/doc/ja/cairo-read-error.html +0 -55
  309. data/doc/ja/cairo-rectangle.html +0 -109
  310. data/doc/ja/cairo-scaled-font.html +0 -180
  311. data/doc/ja/cairo-solid-pattern.html +0 -87
  312. data/doc/ja/cairo-subpixel-order.html +0 -57
  313. data/doc/ja/cairo-surface-finished-error.html +0 -54
  314. data/doc/ja/cairo-surface-pattern.html +0 -68
  315. data/doc/ja/cairo-surface-type-mismatch-error.html +0 -56
  316. data/doc/ja/cairo-surface.html +0 -213
  317. data/doc/ja/cairo-svg-surface.html +0 -114
  318. data/doc/ja/cairo-svg-version.html +0 -66
  319. data/doc/ja/cairo-temp-file-error.html +0 -50
  320. data/doc/ja/cairo-text-cluster-flag.html +0 -46
  321. data/doc/ja/cairo-text-cluster.html +0 -102
  322. data/doc/ja/cairo-text-extents.html +0 -163
  323. data/doc/ja/cairo-toy-font-face.html +0 -107
  324. data/doc/ja/cairo-user-font-error.html +0 -55
  325. data/doc/ja/cairo-user-font-face-text-to-glyphs-data.html +0 -156
  326. data/doc/ja/cairo-user-font-face.html +0 -268
  327. data/doc/ja/cairo-user-font-immutable.html +0 -54
  328. data/doc/ja/cairo-win32-printing-surface.html +0 -80
  329. data/doc/ja/cairo-win32-surface.html +0 -100
  330. data/doc/ja/cairo-write-error.html +0 -55
  331. data/doc/ja/cairo.html +0 -177
  332. data/doc/ja/index.html +0 -1156
  333. data/pkg-config.rb +0 -313
  334. data/test-unit/Rakefile +0 -30
  335. data/test-unit/bin/testrb +0 -5
  336. data/test-unit/lib/test/unit.rb +0 -280
  337. data/test-unit/lib/test/unit/assertionfailederror.rb +0 -14
  338. data/test-unit/lib/test/unit/assertions.rb +0 -722
  339. data/test-unit/lib/test/unit/attribute.rb +0 -125
  340. data/test-unit/lib/test/unit/autorunner.rb +0 -254
  341. data/test-unit/lib/test/unit/collector.rb +0 -43
  342. data/test-unit/lib/test/unit/collector/descendant.rb +0 -23
  343. data/test-unit/lib/test/unit/collector/dir.rb +0 -108
  344. data/test-unit/lib/test/unit/collector/load.rb +0 -135
  345. data/test-unit/lib/test/unit/collector/objectspace.rb +0 -34
  346. data/test-unit/lib/test/unit/color.rb +0 -61
  347. data/test-unit/lib/test/unit/diff.rb +0 -524
  348. data/test-unit/lib/test/unit/error.rb +0 -124
  349. data/test-unit/lib/test/unit/exceptionhandler.rb +0 -39
  350. data/test-unit/lib/test/unit/failure.rb +0 -110
  351. data/test-unit/lib/test/unit/fixture.rb +0 -185
  352. data/test-unit/lib/test/unit/notification.rb +0 -125
  353. data/test-unit/lib/test/unit/omission.rb +0 -143
  354. data/test-unit/lib/test/unit/pending.rb +0 -146
  355. data/test-unit/lib/test/unit/priority.rb +0 -146
  356. data/test-unit/lib/test/unit/runner/console.rb +0 -46
  357. data/test-unit/lib/test/unit/runner/emacs.rb +0 -8
  358. data/test-unit/lib/test/unit/testcase.rb +0 -281
  359. data/test-unit/lib/test/unit/testresult.rb +0 -89
  360. data/test-unit/lib/test/unit/testsuite.rb +0 -110
  361. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +0 -14
  362. data/test-unit/lib/test/unit/ui/console/testrunner.rb +0 -195
  363. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +0 -49
  364. data/test-unit/lib/test/unit/ui/testrunner.rb +0 -20
  365. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +0 -77
  366. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +0 -41
  367. data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -41
  368. data/test-unit/lib/test/unit/util/observable.rb +0 -90
  369. data/test-unit/lib/test/unit/util/procwrapper.rb +0 -48
  370. data/test-unit/lib/test/unit/version.rb +0 -7
  371. data/test-unit/sample/adder.rb +0 -13
  372. data/test-unit/sample/subtracter.rb +0 -12
  373. data/test-unit/sample/tc_adder.rb +0 -18
  374. data/test-unit/sample/tc_subtracter.rb +0 -18
  375. data/test-unit/sample/ts_examples.rb +0 -7
  376. data/test-unit/test/collector/test_descendant.rb +0 -135
  377. data/test-unit/test/collector/test_dir.rb +0 -406
  378. data/test-unit/test/collector/test_load.rb +0 -333
  379. data/test-unit/test/collector/test_objectspace.rb +0 -98
  380. data/test-unit/test/run-test.rb +0 -13
  381. data/test-unit/test/test_assertions.rb +0 -693
  382. data/test-unit/test/test_attribute.rb +0 -86
  383. data/test-unit/test/test_color.rb +0 -37
  384. data/test-unit/test/test_diff.rb +0 -477
  385. data/test-unit/test/test_emacs_runner.rb +0 -60
  386. data/test-unit/test/test_error.rb +0 -26
  387. data/test-unit/test/test_failure.rb +0 -33
  388. data/test-unit/test/test_fixture.rb +0 -252
  389. data/test-unit/test/test_notification.rb +0 -33
  390. data/test-unit/test/test_omission.rb +0 -81
  391. data/test-unit/test/test_pending.rb +0 -70
  392. data/test-unit/test/test_priority.rb +0 -89
  393. data/test-unit/test/test_testcase.rb +0 -430
  394. data/test-unit/test/test_testresult.rb +0 -113
  395. data/test-unit/test/test_testsuite.rb +0 -129
  396. data/test-unit/test/testunit_test_util.rb +0 -14
  397. data/test-unit/test/ui/test_testrunmediator.rb +0 -20
  398. data/test-unit/test/util/test_backtracefilter.rb +0 -41
  399. data/test-unit/test/util/test_observable.rb +0 -102
  400. data/test-unit/test/util/test_procwrapper.rb +0 -36
  401. data/test/test_pkg_config.rb +0 -123
  402. data/vendor/local/include/libpng14/png.h +0 -2701
  403. data/vendor/local/include/libpng14/pngconf.h +0 -1525
  404. data/vendor/local/include/png.h +0 -2701
  405. data/vendor/local/include/pngconf.h +0 -1525
  406. data/vendor/local/include/zconf.h +0 -461
  407. data/vendor/local/include/zlib.h +0 -1589
  408. data/vendor/local/lib/libpng.def +0 -192
  409. data/vendor/local/lib/libpng.lib +0 -0
  410. data/vendor/local/lib/libpng14.dll.a +0 -0
  411. data/vendor/local/lib/libz.dll.a +0 -0
  412. data/vendor/local/lib/pkgconfig/libpng.pc +0 -11
  413. data/vendor/local/lib/pkgconfig/libpng14.pc +0 -11
  414. data/vendor/local/lib/zdll.lib +0 -0
  415. data/vendor/local/lib/zlib.def +0 -67
  416. data/vendor/local/manifest/cairo_1.8.10-4_win32.mft +0 -5
  417. data/vendor/local/manifest/libpng-dev_1.4.3-1_win32.mft +0 -15
  418. data/vendor/local/manifest/zlib-dev_1.2.5-2_win32.mft +0 -8
  419. data/vendor/local/share/gtk-doc/html/cairo/cairo-context.html +0 -2643
  420. data/vendor/local/share/gtk-doc/html/cairo/cairo-error-status.html +0 -360
  421. data/vendor/local/share/gtk-doc/html/cairo/cairo-font-face.html +0 -408
  422. data/vendor/local/share/gtk-doc/html/cairo/cairo-font-options.html +0 -678
  423. data/vendor/local/share/gtk-doc/html/cairo/cairo-ft-font.html +0 -319
  424. data/vendor/local/share/gtk-doc/html/cairo/cairo-image-surface.html +0 -473
  425. data/vendor/local/share/gtk-doc/html/cairo/cairo-matrix.html +0 -596
  426. data/vendor/local/share/gtk-doc/html/cairo/cairo-paths.html +0 -1274
  427. data/vendor/local/share/gtk-doc/html/cairo/cairo-pattern.html +0 -1485
  428. data/vendor/local/share/gtk-doc/html/cairo/cairo-pdf-surface.html +0 -238
  429. data/vendor/local/share/gtk-doc/html/cairo/cairo-png-functions.html +0 -341
  430. data/vendor/local/share/gtk-doc/html/cairo/cairo-ps-surface.html +0 -622
  431. data/vendor/local/share/gtk-doc/html/cairo/cairo-quartz-font.html +0 -151
  432. data/vendor/local/share/gtk-doc/html/cairo/cairo-quartz-surface.html +0 -219
  433. data/vendor/local/share/gtk-doc/html/cairo/cairo-scaled-font.html +0 -1023
  434. data/vendor/local/share/gtk-doc/html/cairo/cairo-surface.html +0 -1026
  435. data/vendor/local/share/gtk-doc/html/cairo/cairo-svg-surface.html +0 -321
  436. data/vendor/local/share/gtk-doc/html/cairo/cairo-transformations.html +0 -436
  437. data/vendor/local/share/gtk-doc/html/cairo/cairo-types.html +0 -133
  438. data/vendor/local/share/gtk-doc/html/cairo/cairo-user-font.html +0 -735
  439. data/vendor/local/share/gtk-doc/html/cairo/cairo-version-info.html +0 -345
  440. data/vendor/local/share/gtk-doc/html/cairo/cairo-win32-font.html +0 -358
  441. data/vendor/local/share/gtk-doc/html/cairo/cairo-win32-surface.html +0 -312
  442. data/vendor/local/share/gtk-doc/html/cairo/cairo-xlib-surface.html +0 -492
  443. data/vendor/local/share/man/man3/libpng.3 +0 -4455
  444. data/vendor/local/share/man/man3/libpngpf.3 +0 -808
  445. data/vendor/local/share/man/man5/png.5 +0 -74
  446. data/vendor/local/src/tml/packaging/cairo_1.8.10-4_win32.log +0 -920
  447. data/vendor/local/src/tml/packaging/libpng_1.4.3-1_win32.log +0 -272
  448. data/vendor/local/src/tml/packaging/libpng_1.4.3-1_win32.sh +0 -71
  449. data/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.log +0 -42
  450. data/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.sh +0 -189
@@ -1,1274 +0,0 @@
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=UTF-8">
5
- <title>Paths</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
- <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8
- <link rel="up" href="cairo-drawing.html" title="Drawing">
9
- <link rel="prev" href="cairo-context.html" title="cairo_t">
10
- <link rel="next" href="cairo-pattern.html" title="cairo_pattern_t">
11
- <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
- <link rel="stylesheet" href="style.css" type="text/css">
13
- <link rel="chapter" href="cairo-drawing.html" title="Drawing">
14
- <link rel="chapter" href="cairo-fonts.html" title="Fonts">
15
- <link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
16
- <link rel="chapter" href="cairo-support.html" title="Utilities">
17
- <link rel="index" href="index-all.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="index" href="index-1.8.html" title="Index of new symbols in 1.8">
22
- <link rel="appendix" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
23
- </head>
24
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
- <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
26
- <tr valign="middle">
27
- <td><a accesskey="p" href="cairo-context.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
28
- <td><a accesskey="u" href="cairo-drawing.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
29
- <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
30
- <th width="100%" align="center">Cairo: A Vector Graphics Library</th>
31
- <td><a accesskey="n" href="cairo-pattern.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
32
- </tr>
33
- <tr><td colspan="5" class="shortcuts">
34
- <a href="#cairo-paths.synopsis" class="shortcut">Top</a>
35
-  | 
36
- <a href="#cairo-paths.description" class="shortcut">Description</a>
37
- </td></tr>
38
- </table>
39
- <div class="refentry" title="Paths">
40
- <a name="cairo-paths"></a><div class="titlepage"></div>
41
- <div class="refnamediv"><table width="100%"><tr>
42
- <td valign="top">
43
- <h2><span class="refentrytitle"><a name="cairo-paths.top_of_page"></a>Paths</span></h2>
44
- <p>Paths — Creating paths and manipulating path data</p>
45
- </td>
46
- <td valign="top" align="right"></td>
47
- </tr></table></div>
48
- <div class="refsynopsisdiv" title="Synopsis">
49
- <a name="cairo-paths.synopsis"></a><h2>Synopsis</h2>
50
- <pre class="synopsis">
51
- <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t">cairo_path_t</a>;
52
- union <a class="link" href="cairo-paths.html#cairo-path-data-t" title="union cairo_path_data_t">cairo_path_data_t</a>;
53
- enum <a class="link" href="cairo-paths.html#cairo-path-data-type-t" title="enum cairo_path_data_type_t">cairo_path_data_type_t</a>;
54
- <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t">cairo_path_t</a> * <a class="link" href="cairo-paths.html#cairo-copy-path" title="cairo_copy_path ()">cairo_copy_path</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
55
- <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t">cairo_path_t</a> * <a class="link" href="cairo-paths.html#cairo-copy-path-flat" title="cairo_copy_path_flat ()">cairo_copy_path_flat</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
56
- void <a class="link" href="cairo-paths.html#cairo-path-destroy" title="cairo_path_destroy ()">cairo_path_destroy</a> (<a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t">cairo_path_t</a> *path);
57
- void <a class="link" href="cairo-paths.html#cairo-append-path" title="cairo_append_path ()">cairo_append_path</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
58
- const <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t">cairo_path_t</a> *path);
59
- <a class="link" href="cairo-types.html#cairo-bool-t" title="cairo_bool_t">cairo_bool_t</a> <a class="link" href="cairo-paths.html#cairo-has-current-point" title="cairo_has_current_point ()">cairo_has_current_point</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
60
- void <a class="link" href="cairo-paths.html#cairo-get-current-point" title="cairo_get_current_point ()">cairo_get_current_point</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
61
- double *x,
62
- double *y);
63
- void <a class="link" href="cairo-paths.html#cairo-new-path" title="cairo_new_path ()">cairo_new_path</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
64
- void <a class="link" href="cairo-paths.html#cairo-new-sub-path" title="cairo_new_sub_path ()">cairo_new_sub_path</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
65
- void <a class="link" href="cairo-paths.html#cairo-close-path" title="cairo_close_path ()">cairo_close_path</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
66
- void <a class="link" href="cairo-paths.html#cairo-arc" title="cairo_arc ()">cairo_arc</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
67
- double xc,
68
- double yc,
69
- double radius,
70
- double angle1,
71
- double angle2);
72
- void <a class="link" href="cairo-paths.html#cairo-arc-negative" title="cairo_arc_negative ()">cairo_arc_negative</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
73
- double xc,
74
- double yc,
75
- double radius,
76
- double angle1,
77
- double angle2);
78
- void <a class="link" href="cairo-paths.html#cairo-curve-to" title="cairo_curve_to ()">cairo_curve_to</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
79
- double x1,
80
- double y1,
81
- double x2,
82
- double y2,
83
- double x3,
84
- double y3);
85
- void <a class="link" href="cairo-paths.html#cairo-line-to" title="cairo_line_to ()">cairo_line_to</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
86
- double x,
87
- double y);
88
- void <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()">cairo_move_to</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
89
- double x,
90
- double y);
91
- void <a class="link" href="cairo-paths.html#cairo-rectangle" title="cairo_rectangle ()">cairo_rectangle</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
92
- double x,
93
- double y,
94
- double width,
95
- double height);
96
- void <a class="link" href="cairo-paths.html#cairo-glyph-path" title="cairo_glyph_path ()">cairo_glyph_path</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
97
- const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs,
98
- int num_glyphs);
99
- void <a class="link" href="cairo-paths.html#cairo-text-path" title="cairo_text_path ()">cairo_text_path</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
100
- const char *utf8);
101
- void <a class="link" href="cairo-paths.html#cairo-rel-curve-to" title="cairo_rel_curve_to ()">cairo_rel_curve_to</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
102
- double dx1,
103
- double dy1,
104
- double dx2,
105
- double dy2,
106
- double dx3,
107
- double dy3);
108
- void <a class="link" href="cairo-paths.html#cairo-rel-line-to" title="cairo_rel_line_to ()">cairo_rel_line_to</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
109
- double dx,
110
- double dy);
111
- void <a class="link" href="cairo-paths.html#cairo-rel-move-to" title="cairo_rel_move_to ()">cairo_rel_move_to</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
112
- double dx,
113
- double dy);
114
- void <a class="link" href="cairo-paths.html#cairo-path-extents" title="cairo_path_extents ()">cairo_path_extents</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
115
- double *x1,
116
- double *y1,
117
- double *x2,
118
- double *y2);
119
- </pre>
120
- </div>
121
- <div class="refsect1" title="Description">
122
- <a name="cairo-paths.description"></a><h2>Description</h2>
123
- <p>
124
- Paths are the most basic drawing tools and are primarily used to implicitly
125
- generate simple masks.
126
- </p>
127
- </div>
128
- <div class="refsect1" title="Details">
129
- <a name="cairo-paths.details"></a><h2>Details</h2>
130
- <div class="refsect2" title="cairo_path_t">
131
- <a name="cairo-path-t"></a><h3>cairo_path_t</h3>
132
- <pre class="programlisting">typedef struct {
133
- cairo_status_t status;
134
- cairo_path_data_t *data;
135
- int num_data;
136
- } cairo_path_t;
137
- </pre>
138
- <p>
139
- A data structure for holding a path. This data structure serves as
140
- the return value for <a class="link" href="cairo-paths.html#cairo-copy-path" title="cairo_copy_path ()"><code class="function">cairo_copy_path()</code></a> and
141
- <a class="link" href="cairo-paths.html#cairo-copy-path-flat" title="cairo_copy_path_flat ()"><code class="function">cairo_copy_path_flat()</code></a> as well the input value for
142
- <a class="link" href="cairo-paths.html#cairo-append-path" title="cairo_append_path ()"><code class="function">cairo_append_path()</code></a>.
143
- </p>
144
- <p>
145
- See <a class="link" href="cairo-paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> for hints on how to iterate over the
146
- actual data within the path.
147
- </p>
148
- <p>
149
- The num_data member gives the number of elements in the data
150
- array. This number is larger than the number of independent path
151
- portions (defined in <a class="link" href="cairo-paths.html#cairo-path-data-type-t" title="enum cairo_path_data_type_t"><span class="type">cairo_path_data_type_t</span></a>), since the data
152
- includes both headers and coordinates for each portion.</p>
153
- <p>
154
- </p>
155
- <div class="variablelist"><table border="0">
156
- <col align="left" valign="top">
157
- <tbody>
158
- <tr>
159
- <td><p><span class="term"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> <em class="structfield"><code>status</code></em>;</span></p></td>
160
- <td> the current error status
161
- </td>
162
- </tr>
163
- <tr>
164
- <td><p><span class="term"><a class="link" href="cairo-paths.html#cairo-path-data-t" title="union cairo_path_data_t">cairo_path_data_t</a> *<em class="structfield"><code>data</code></em>;</span></p></td>
165
- <td> the elements in the path
166
- </td>
167
- </tr>
168
- <tr>
169
- <td><p><span class="term">int <em class="structfield"><code>num_data</code></em>;</span></p></td>
170
- <td> the number of elements in the data array
171
- </td>
172
- </tr>
173
- </tbody>
174
- </table></div>
175
- </div>
176
- <hr>
177
- <div class="refsect2" title="union cairo_path_data_t">
178
- <a name="cairo-path-data-t"></a><h3>union cairo_path_data_t</h3>
179
- <pre class="programlisting">union cairo_path_data_t {
180
- struct {
181
- cairo_path_data_type_t type;
182
- int length;
183
- } header;
184
- struct {
185
- double x, y;
186
- } point;
187
- };
188
- </pre>
189
- <p>
190
- <a class="link" href="cairo-paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> is used to represent the path data inside a
191
- <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a>.
192
- </p>
193
- <p>
194
- The data structure is designed to try to balance the demands of
195
- efficiency and ease-of-use. A path is represented as an array of
196
- <a class="link" href="cairo-paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a>, which is a union of headers and points.
197
- </p>
198
- <p>
199
- Each portion of the path is represented by one or more elements in
200
- the array, (one header followed by 0 or more points). The length
201
- value of the header is the number of array elements for the current
202
- portion including the header, (ie. length == 1 + # of points), and
203
- where the number of points for each element type is as follows:
204
- </p>
205
- <p>
206
- </p>
207
- <pre class="programlisting">
208
- %CAIRO_PATH_MOVE_TO: 1 point
209
- %CAIRO_PATH_LINE_TO: 1 point
210
- %CAIRO_PATH_CURVE_TO: 3 points
211
- %CAIRO_PATH_CLOSE_PATH: 0 points
212
- </pre>
213
- <p>
214
- </p>
215
- <p>
216
- The semantics and ordering of the coordinate values are consistent
217
- with <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>, <a class="link" href="cairo-paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>, <a class="link" href="cairo-paths.html#cairo-curve-to" title="cairo_curve_to ()"><code class="function">cairo_curve_to()</code></a>, and
218
- <a class="link" href="cairo-paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a>.
219
- </p>
220
- <p>
221
- Here is sample code for iterating through a <span class="type">""</span>
222
- </p>
223
- <p>
224
- </p>
225
- <div class="informalexample"><pre class="programlisting">
226
- int i;
227
- cairo_path_t *path;
228
- cairo_path_data_t *data;
229
-  
230
- path = cairo_copy_path (cr);
231
-  
232
- for (i=0; i &lt; path-&gt;num_data; i += path-&gt;data[i].header.length) {
233
- data = &amp;path-&gt;data[i];
234
- switch (data-&gt;header.type) {
235
- case CAIRO_PATH_MOVE_TO:
236
- do_move_to_things (data[1].point.x, data[1].point.y);
237
- break;
238
- case CAIRO_PATH_LINE_TO:
239
- do_line_to_things (data[1].point.x, data[1].point.y);
240
- break;
241
- case CAIRO_PATH_CURVE_TO:
242
- do_curve_to_things (data[1].point.x, data[1].point.y,
243
- data[2].point.x, data[2].point.y,
244
- data[3].point.x, data[3].point.y);
245
- break;
246
- case CAIRO_PATH_CLOSE_PATH:
247
- do_close_path_things ();
248
- break;
249
- }
250
- }
251
- cairo_path_destroy (path);
252
- </pre></div>
253
- <p>
254
- </p>
255
- <p>
256
- As of cairo 1.4, cairo does not mind if there are more elements in
257
- a portion of the path than needed. Such elements can be used by
258
- users of the cairo API to hold extra values in the path data
259
- structure. For this reason, it is recommended that applications
260
- always use <code class="literal">data-&gt;header.length</code> to
261
- iterate over the path data, instead of hardcoding the number of
262
- elements for each element type.</p>
263
- <p>
264
- </p>
265
- </div>
266
- <hr>
267
- <div class="refsect2" title="enum cairo_path_data_type_t">
268
- <a name="cairo-path-data-type-t"></a><h3>enum cairo_path_data_type_t</h3>
269
- <pre class="programlisting">typedef enum _cairo_path_data_type {
270
- CAIRO_PATH_MOVE_TO,
271
- CAIRO_PATH_LINE_TO,
272
- CAIRO_PATH_CURVE_TO,
273
- CAIRO_PATH_CLOSE_PATH
274
- } cairo_path_data_type_t;
275
- </pre>
276
- <p>
277
- <a class="link" href="cairo-paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> is used to describe the type of one portion
278
- of a path when represented as a <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a>.
279
- See <a class="link" href="cairo-paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> for details.</p>
280
- <p>
281
- </p>
282
- <div class="variablelist"><table border="0">
283
- <col align="left" valign="top">
284
- <tbody>
285
- <tr>
286
- <td><p><a name="CAIRO-PATH-MOVE-TO--CAPS"></a><span class="term"><code class="literal">CAIRO_PATH_MOVE_TO</code></span></p></td>
287
- <td> A move-to operation
288
- </td>
289
- </tr>
290
- <tr>
291
- <td><p><a name="CAIRO-PATH-LINE-TO--CAPS"></a><span class="term"><code class="literal">CAIRO_PATH_LINE_TO</code></span></p></td>
292
- <td> A line-to operation
293
- </td>
294
- </tr>
295
- <tr>
296
- <td><p><a name="CAIRO-PATH-CURVE-TO--CAPS"></a><span class="term"><code class="literal">CAIRO_PATH_CURVE_TO</code></span></p></td>
297
- <td> A curve-to operation
298
- </td>
299
- </tr>
300
- <tr>
301
- <td><p><a name="CAIRO-PATH-CLOSE-PATH--CAPS"></a><span class="term"><code class="literal">CAIRO_PATH_CLOSE_PATH</code></span></p></td>
302
- <td> A close-path operation
303
- </td>
304
- </tr>
305
- </tbody>
306
- </table></div>
307
- </div>
308
- <hr>
309
- <div class="refsect2" title="cairo_copy_path ()">
310
- <a name="cairo-copy-path"></a><h3>cairo_copy_path ()</h3>
311
- <pre class="programlisting"><a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t">cairo_path_t</a> * cairo_copy_path (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
312
- <p>
313
- Creates a copy of the current path and returns it to the user as a
314
- <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a>. See <a class="link" href="cairo-paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> for hints on how to iterate
315
- over the returned data structure.
316
- </p>
317
- <p>
318
- This function will always return a valid pointer, but the result
319
- will have no data (<code class="literal">data==<code class="literal">NULL</code></code> and
320
- <code class="literal">num_data==0</code>), if either of the following
321
- conditions hold:
322
- </p>
323
- <p>
324
- </p>
325
- <div class="orderedlist"><ol class="orderedlist" type="1">
326
- <li class="listitem">If there is insufficient memory to copy the path. In this
327
- case <code class="literal">path-&gt;status</code> will be set to
328
- <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-MEMORY--CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.</li>
329
- <li class="listitem">If <em class="parameter"><code>cr</code></em> is already in an error state. In this case
330
- <code class="literal">path-&gt;status</code> will contain the same status that
331
- would be returned by <a class="link" href="cairo-context.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a>.</li>
332
- </ol></div>
333
- <p>
334
- </p>
335
- <div class="variablelist"><table border="0">
336
- <col align="left" valign="top">
337
- <tbody>
338
- <tr>
339
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
340
- <td> a cairo context
341
- </td>
342
- </tr>
343
- <tr>
344
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
345
- <td> the copy of the current path. The caller owns the
346
- returned object and should call <a class="link" href="cairo-paths.html#cairo-path-destroy" title="cairo_path_destroy ()"><code class="function">cairo_path_destroy()</code></a> when finished
347
- with it.
348
- </td>
349
- </tr>
350
- </tbody>
351
- </table></div>
352
- </div>
353
- <hr>
354
- <div class="refsect2" title="cairo_copy_path_flat ()">
355
- <a name="cairo-copy-path-flat"></a><h3>cairo_copy_path_flat ()</h3>
356
- <pre class="programlisting"><a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t">cairo_path_t</a> * cairo_copy_path_flat (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
357
- <p>
358
- Gets a flattened copy of the current path and returns it to the
359
- user as a <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a>. See <a class="link" href="cairo-paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> for hints on
360
- how to iterate over the returned data structure.
361
- </p>
362
- <p>
363
- This function is like <a class="link" href="cairo-paths.html#cairo-copy-path" title="cairo_copy_path ()"><code class="function">cairo_copy_path()</code></a> except that any curves
364
- in the path will be approximated with piecewise-linear
365
- approximations, (accurate to within the current tolerance
366
- value). That is, the result is guaranteed to not have any elements
367
- of type <a class="link" href="cairo-paths.html#CAIRO-PATH-CURVE-TO--CAPS"><code class="literal">CAIRO_PATH_CURVE_TO</code></a> which will instead be replaced by a
368
- series of <a class="link" href="cairo-paths.html#CAIRO-PATH-LINE-TO--CAPS"><code class="literal">CAIRO_PATH_LINE_TO</code></a> elements.
369
- </p>
370
- <p>
371
- This function will always return a valid pointer, but the result
372
- will have no data (<code class="literal">data==<code class="literal">NULL</code></code> and
373
- <code class="literal">num_data==0</code>), if either of the following
374
- conditions hold:
375
- </p>
376
- <p>
377
- </p>
378
- <div class="orderedlist"><ol class="orderedlist" type="1">
379
- <li class="listitem">If there is insufficient memory to copy the path. In this
380
- case <code class="literal">path-&gt;status</code> will be set to
381
- <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-MEMORY--CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.</li>
382
- <li class="listitem">If <em class="parameter"><code>cr</code></em> is already in an error state. In this case
383
- <code class="literal">path-&gt;status</code> will contain the same status that
384
- would be returned by <a class="link" href="cairo-context.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a>.</li>
385
- </ol></div>
386
- <p>
387
- </p>
388
- <div class="variablelist"><table border="0">
389
- <col align="left" valign="top">
390
- <tbody>
391
- <tr>
392
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
393
- <td> a cairo context
394
- </td>
395
- </tr>
396
- <tr>
397
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
398
- <td> the copy of the current path. The caller owns the
399
- returned object and should call <a class="link" href="cairo-paths.html#cairo-path-destroy" title="cairo_path_destroy ()"><code class="function">cairo_path_destroy()</code></a> when finished
400
- with it.
401
- </td>
402
- </tr>
403
- </tbody>
404
- </table></div>
405
- </div>
406
- <hr>
407
- <div class="refsect2" title="cairo_path_destroy ()">
408
- <a name="cairo-path-destroy"></a><h3>cairo_path_destroy ()</h3>
409
- <pre class="programlisting">void cairo_path_destroy (<a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t">cairo_path_t</a> *path);</pre>
410
- <p>
411
- Immediately releases all memory associated with <em class="parameter"><code>path</code></em>. After a call
412
- to <a class="link" href="cairo-paths.html#cairo-path-destroy" title="cairo_path_destroy ()"><code class="function">cairo_path_destroy()</code></a> the <em class="parameter"><code>path</code></em> pointer is no longer valid and
413
- should not be used further.
414
- </p>
415
- <p>
416
- Note: <a class="link" href="cairo-paths.html#cairo-path-destroy" title="cairo_path_destroy ()"><code class="function">cairo_path_destroy()</code></a> should only be called with a
417
- pointer to a <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a> returned by a cairo function. Any path
418
- that is created manually (ie. outside of cairo) should be destroyed
419
- manually as well.</p>
420
- <p>
421
- </p>
422
- <div class="variablelist"><table border="0">
423
- <col align="left" valign="top">
424
- <tbody><tr>
425
- <td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
426
- <td> a path previously returned by either <a class="link" href="cairo-paths.html#cairo-copy-path" title="cairo_copy_path ()"><code class="function">cairo_copy_path()</code></a> or
427
- <a class="link" href="cairo-paths.html#cairo-copy-path-flat" title="cairo_copy_path_flat ()"><code class="function">cairo_copy_path_flat()</code></a>.
428
- </td>
429
- </tr></tbody>
430
- </table></div>
431
- </div>
432
- <hr>
433
- <div class="refsect2" title="cairo_append_path ()">
434
- <a name="cairo-append-path"></a><h3>cairo_append_path ()</h3>
435
- <pre class="programlisting">void cairo_append_path (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
436
- const <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t">cairo_path_t</a> *path);</pre>
437
- <p>
438
- Append the <em class="parameter"><code>path</code></em> onto the current path. The <em class="parameter"><code>path</code></em> may be either the
439
- return value from one of <a class="link" href="cairo-paths.html#cairo-copy-path" title="cairo_copy_path ()"><code class="function">cairo_copy_path()</code></a> or
440
- <a class="link" href="cairo-paths.html#cairo-copy-path-flat" title="cairo_copy_path_flat ()"><code class="function">cairo_copy_path_flat()</code></a> or it may be constructed manually. See
441
- <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a> for details on how the path data structure should be
442
- initialized, and note that <code class="literal">path-&gt;status</code> must be
443
- initialized to <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS--CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.</p>
444
- <p>
445
- </p>
446
- <div class="variablelist"><table border="0">
447
- <col align="left" valign="top">
448
- <tbody>
449
- <tr>
450
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
451
- <td> a cairo context
452
- </td>
453
- </tr>
454
- <tr>
455
- <td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
456
- <td> path to be appended
457
- </td>
458
- </tr>
459
- </tbody>
460
- </table></div>
461
- </div>
462
- <hr>
463
- <div class="refsect2" title="cairo_has_current_point ()">
464
- <a name="cairo-has-current-point"></a><h3>cairo_has_current_point ()</h3>
465
- <pre class="programlisting"><a class="link" href="cairo-types.html#cairo-bool-t" title="cairo_bool_t">cairo_bool_t</a> cairo_has_current_point (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
466
- <p>
467
- Returns whether a current point is defined on the current path.
468
- See <a class="link" href="cairo-paths.html#cairo-get-current-point" title="cairo_get_current_point ()"><code class="function">cairo_get_current_point()</code></a> for details on the current point.</p>
469
- <p>
470
- </p>
471
- <div class="variablelist"><table border="0">
472
- <col align="left" valign="top">
473
- <tbody>
474
- <tr>
475
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
476
- <td> a cairo context
477
- </td>
478
- </tr>
479
- <tr>
480
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
481
- <td> whether a current point is defined.
482
-
483
- </td>
484
- </tr>
485
- </tbody>
486
- </table></div>
487
- <p class="since">Since 1.6</p>
488
- </div>
489
- <hr>
490
- <div class="refsect2" title="cairo_get_current_point ()">
491
- <a name="cairo-get-current-point"></a><h3>cairo_get_current_point ()</h3>
492
- <pre class="programlisting">void cairo_get_current_point (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
493
- double *x,
494
- double *y);</pre>
495
- <p>
496
- Gets the current point of the current path, which is
497
- conceptually the final point reached by the path so far.
498
- </p>
499
- <p>
500
- The current point is returned in the user-space coordinate
501
- system. If there is no defined current point or if <em class="parameter"><code>cr</code></em> is in an
502
- error status, <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> will both be set to 0.0. It is possible to
503
- check this in advance with <a class="link" href="cairo-paths.html#cairo-has-current-point" title="cairo_has_current_point ()"><code class="function">cairo_has_current_point()</code></a>.
504
- </p>
505
- <p>
506
- Most path construction functions alter the current point. See the
507
- following for details on how they affect the current point:
508
- <a class="link" href="cairo-paths.html#cairo-new-path" title="cairo_new_path ()"><code class="function">cairo_new_path()</code></a>, <a class="link" href="cairo-paths.html#cairo-new-sub-path" title="cairo_new_sub_path ()"><code class="function">cairo_new_sub_path()</code></a>,
509
- <a class="link" href="cairo-paths.html#cairo-append-path" title="cairo_append_path ()"><code class="function">cairo_append_path()</code></a>, <a class="link" href="cairo-paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a>,
510
- <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>, <a class="link" href="cairo-paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>, <a class="link" href="cairo-paths.html#cairo-curve-to" title="cairo_curve_to ()"><code class="function">cairo_curve_to()</code></a>,
511
- <a class="link" href="cairo-paths.html#cairo-rel-move-to" title="cairo_rel_move_to ()"><code class="function">cairo_rel_move_to()</code></a>, <a class="link" href="cairo-paths.html#cairo-rel-line-to" title="cairo_rel_line_to ()"><code class="function">cairo_rel_line_to()</code></a>, <a class="link" href="cairo-paths.html#cairo-rel-curve-to" title="cairo_rel_curve_to ()"><code class="function">cairo_rel_curve_to()</code></a>,
512
- <a class="link" href="cairo-paths.html#cairo-arc" title="cairo_arc ()"><code class="function">cairo_arc()</code></a>, <a class="link" href="cairo-paths.html#cairo-arc-negative" title="cairo_arc_negative ()"><code class="function">cairo_arc_negative()</code></a>, <a class="link" href="cairo-paths.html#cairo-rectangle" title="cairo_rectangle ()"><code class="function">cairo_rectangle()</code></a>,
513
- <a class="link" href="cairo-paths.html#cairo-text-path" title="cairo_text_path ()"><code class="function">cairo_text_path()</code></a>, <a class="link" href="cairo-paths.html#cairo-glyph-path" title="cairo_glyph_path ()"><code class="function">cairo_glyph_path()</code></a>, <code class="function">cairo_stroke_to_path()</code>.
514
- </p>
515
- <p>
516
- Some functions use and alter the current point but do not
517
- otherwise change current path:
518
- <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>.
519
- </p>
520
- <p>
521
- Some functions unset the current path and as a result, current point:
522
- <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>.</p>
523
- <p>
524
- </p>
525
- <div class="variablelist"><table border="0">
526
- <col align="left" valign="top">
527
- <tbody>
528
- <tr>
529
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
530
- <td> a cairo context
531
- </td>
532
- </tr>
533
- <tr>
534
- <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
535
- <td> return value for X coordinate of the current point
536
- </td>
537
- </tr>
538
- <tr>
539
- <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
540
- <td> return value for Y coordinate of the current point
541
- </td>
542
- </tr>
543
- </tbody>
544
- </table></div>
545
- </div>
546
- <hr>
547
- <div class="refsect2" title="cairo_new_path ()">
548
- <a name="cairo-new-path"></a><h3>cairo_new_path ()</h3>
549
- <pre class="programlisting">void cairo_new_path (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
550
- <p>
551
- Clears the current path. After this call there will be no path and
552
- no current point.</p>
553
- <p>
554
- </p>
555
- <div class="variablelist"><table border="0">
556
- <col align="left" valign="top">
557
- <tbody><tr>
558
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
559
- <td> a cairo context
560
- </td>
561
- </tr></tbody>
562
- </table></div>
563
- </div>
564
- <hr>
565
- <div class="refsect2" title="cairo_new_sub_path ()">
566
- <a name="cairo-new-sub-path"></a><h3>cairo_new_sub_path ()</h3>
567
- <pre class="programlisting">void cairo_new_sub_path (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
568
- <p>
569
- Begin a new sub-path. Note that the existing path is not
570
- affected. After this call there will be no current point.
571
- </p>
572
- <p>
573
- In many cases, this call is not needed since new sub-paths are
574
- frequently started with <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>.
575
- </p>
576
- <p>
577
- A call to <a class="link" href="cairo-paths.html#cairo-new-sub-path" title="cairo_new_sub_path ()"><code class="function">cairo_new_sub_path()</code></a> is particularly useful when
578
- beginning a new sub-path with one of the <a class="link" href="cairo-paths.html#cairo-arc" title="cairo_arc ()"><code class="function">cairo_arc()</code></a> calls. This
579
- makes things easier as it is no longer necessary to manually
580
- compute the arc's initial coordinates for a call to
581
- <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>.</p>
582
- <p>
583
- </p>
584
- <div class="variablelist"><table border="0">
585
- <col align="left" valign="top">
586
- <tbody><tr>
587
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
588
- <td> a cairo context
589
- </td>
590
- </tr></tbody>
591
- </table></div>
592
- <p class="since">Since 1.2</p>
593
- </div>
594
- <hr>
595
- <div class="refsect2" title="cairo_close_path ()">
596
- <a name="cairo-close-path"></a><h3>cairo_close_path ()</h3>
597
- <pre class="programlisting">void cairo_close_path (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
598
- <p>
599
- Adds a line segment to the path from the current point to the
600
- beginning of the current sub-path, (the most recent point passed to
601
- <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>), and closes this sub-path. After this call the
602
- current point will be at the joined endpoint of the sub-path.
603
- </p>
604
- <p>
605
- The behavior of <a class="link" href="cairo-paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a> is distinct from simply calling
606
- <a class="link" href="cairo-paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a> with the equivalent coordinate in the case of
607
- stroking. When a closed sub-path is stroked, there are no caps on
608
- the ends of the sub-path. Instead, there is a line join connecting
609
- the final and initial segments of the sub-path.
610
- </p>
611
- <p>
612
- If there is no current point before the call to <a class="link" href="cairo-paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a>,
613
- this function will have no effect.
614
- </p>
615
- <p>
616
- Note: As of cairo version 1.2.4 any call to <a class="link" href="cairo-paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a> will
617
- place an explicit MOVE_TO element into the path immediately after
618
- the CLOSE_PATH element, (which can be seen in <a class="link" href="cairo-paths.html#cairo-copy-path" title="cairo_copy_path ()"><code class="function">cairo_copy_path()</code></a> for
619
- example). This can simplify path processing in some cases as it may
620
- not be necessary to save the "last move_to point" during processing
621
- as the MOVE_TO immediately after the CLOSE_PATH will provide that
622
- point.</p>
623
- <p>
624
- </p>
625
- <div class="variablelist"><table border="0">
626
- <col align="left" valign="top">
627
- <tbody><tr>
628
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
629
- <td> a cairo context
630
- </td>
631
- </tr></tbody>
632
- </table></div>
633
- </div>
634
- <hr>
635
- <div class="refsect2" title="cairo_arc ()">
636
- <a name="cairo-arc"></a><h3>cairo_arc ()</h3>
637
- <pre class="programlisting">void cairo_arc (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
638
- double xc,
639
- double yc,
640
- double radius,
641
- double angle1,
642
- double angle2);</pre>
643
- <p>
644
- Adds a circular arc of the given <em class="parameter"><code>radius</code></em> to the current path. The
645
- arc is centered at (<em class="parameter"><code>xc</code></em>, <em class="parameter"><code>yc</code></em>), begins at <em class="parameter"><code>angle1</code></em> and proceeds in
646
- the direction of increasing angles to end at <em class="parameter"><code>angle2</code></em>. If <em class="parameter"><code>angle2</code></em> is
647
- less than <em class="parameter"><code>angle1</code></em> it will be progressively increased by 2*M_PI
648
- until it is greater than <em class="parameter"><code>angle1</code></em>.
649
- </p>
650
- <p>
651
- If there is a current point, an initial line segment will be added
652
- to the path to connect the current point to the beginning of the
653
- arc. If this initial line is undesired, it can be avoided by
654
- calling <a class="link" href="cairo-paths.html#cairo-new-sub-path" title="cairo_new_sub_path ()"><code class="function">cairo_new_sub_path()</code></a> before calling <a class="link" href="cairo-paths.html#cairo-arc" title="cairo_arc ()"><code class="function">cairo_arc()</code></a>.
655
- </p>
656
- <p>
657
- Angles are measured in radians. An angle of 0.0 is in the direction
658
- of the positive X axis (in user space). An angle of <code class="literal">M_PI</code>/2.0 radians
659
- (90 degrees) is in the direction of the positive Y axis (in
660
- user space). Angles increase in the direction from the positive X
661
- axis toward the positive Y axis. So with the default transformation
662
- matrix, angles increase in a clockwise direction.
663
- </p>
664
- <p>
665
- (To convert from degrees to radians, use <code class="literal">degrees * (M_PI /
666
- 180.)</code>.)
667
- </p>
668
- <p>
669
- This function gives the arc in the direction of increasing angles;
670
- see <a class="link" href="cairo-paths.html#cairo-arc-negative" title="cairo_arc_negative ()"><code class="function">cairo_arc_negative()</code></a> to get the arc in the direction of
671
- decreasing angles.
672
- </p>
673
- <p>
674
- The arc is circular in user space. To achieve an elliptical arc,
675
- you can scale the current transformation matrix by different
676
- amounts in the X and Y directions. For example, to draw an ellipse
677
- in the box given by <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>, <em class="parameter"><code>width</code></em>, <em class="parameter"><code>height</code></em>:
678
- </p>
679
- <p>
680
- </p>
681
- <div class="informalexample"><pre class="programlisting">
682
- cairo_save (cr);
683
- cairo_translate (cr, x + width / 2., y + height / 2.);
684
- cairo_scale (cr, width / 2., height / 2.);
685
- cairo_arc (cr, 0., 0., 1., 0., 2 * M_PI);
686
- cairo_restore (cr);
687
- </pre></div>
688
- <p>
689
- </p>
690
- <div class="variablelist"><table border="0">
691
- <col align="left" valign="top">
692
- <tbody>
693
- <tr>
694
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
695
- <td> a cairo context
696
- </td>
697
- </tr>
698
- <tr>
699
- <td><p><span class="term"><em class="parameter"><code>xc</code></em> :</span></p></td>
700
- <td> X position of the center of the arc
701
- </td>
702
- </tr>
703
- <tr>
704
- <td><p><span class="term"><em class="parameter"><code>yc</code></em> :</span></p></td>
705
- <td> Y position of the center of the arc
706
- </td>
707
- </tr>
708
- <tr>
709
- <td><p><span class="term"><em class="parameter"><code>radius</code></em> :</span></p></td>
710
- <td> the radius of the arc
711
- </td>
712
- </tr>
713
- <tr>
714
- <td><p><span class="term"><em class="parameter"><code>angle1</code></em> :</span></p></td>
715
- <td> the start angle, in radians
716
- </td>
717
- </tr>
718
- <tr>
719
- <td><p><span class="term"><em class="parameter"><code>angle2</code></em> :</span></p></td>
720
- <td> the end angle, in radians
721
- </td>
722
- </tr>
723
- </tbody>
724
- </table></div>
725
- </div>
726
- <hr>
727
- <div class="refsect2" title="cairo_arc_negative ()">
728
- <a name="cairo-arc-negative"></a><h3>cairo_arc_negative ()</h3>
729
- <pre class="programlisting">void cairo_arc_negative (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
730
- double xc,
731
- double yc,
732
- double radius,
733
- double angle1,
734
- double angle2);</pre>
735
- <p>
736
- Adds a circular arc of the given <em class="parameter"><code>radius</code></em> to the current path. The
737
- arc is centered at (<em class="parameter"><code>xc</code></em>, <em class="parameter"><code>yc</code></em>), begins at <em class="parameter"><code>angle1</code></em> and proceeds in
738
- the direction of decreasing angles to end at <em class="parameter"><code>angle2</code></em>. If <em class="parameter"><code>angle2</code></em> is
739
- greater than <em class="parameter"><code>angle1</code></em> it will be progressively decreased by 2*M_PI
740
- until it is less than <em class="parameter"><code>angle1</code></em>.
741
- </p>
742
- <p>
743
- See <a class="link" href="cairo-paths.html#cairo-arc" title="cairo_arc ()"><code class="function">cairo_arc()</code></a> for more details. This function differs only in the
744
- direction of the arc between the two angles.</p>
745
- <p>
746
- </p>
747
- <div class="variablelist"><table border="0">
748
- <col align="left" valign="top">
749
- <tbody>
750
- <tr>
751
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
752
- <td> a cairo context
753
- </td>
754
- </tr>
755
- <tr>
756
- <td><p><span class="term"><em class="parameter"><code>xc</code></em> :</span></p></td>
757
- <td> X position of the center of the arc
758
- </td>
759
- </tr>
760
- <tr>
761
- <td><p><span class="term"><em class="parameter"><code>yc</code></em> :</span></p></td>
762
- <td> Y position of the center of the arc
763
- </td>
764
- </tr>
765
- <tr>
766
- <td><p><span class="term"><em class="parameter"><code>radius</code></em> :</span></p></td>
767
- <td> the radius of the arc
768
- </td>
769
- </tr>
770
- <tr>
771
- <td><p><span class="term"><em class="parameter"><code>angle1</code></em> :</span></p></td>
772
- <td> the start angle, in radians
773
- </td>
774
- </tr>
775
- <tr>
776
- <td><p><span class="term"><em class="parameter"><code>angle2</code></em> :</span></p></td>
777
- <td> the end angle, in radians
778
- </td>
779
- </tr>
780
- </tbody>
781
- </table></div>
782
- </div>
783
- <hr>
784
- <div class="refsect2" title="cairo_curve_to ()">
785
- <a name="cairo-curve-to"></a><h3>cairo_curve_to ()</h3>
786
- <pre class="programlisting">void cairo_curve_to (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
787
- double x1,
788
- double y1,
789
- double x2,
790
- double y2,
791
- double x3,
792
- double y3);</pre>
793
- <p>
794
- Adds a cubic Bézier spline to the path from the current point to
795
- position (<em class="parameter"><code>x3</code></em>, <em class="parameter"><code>y3</code></em>) in user-space coordinates, using (<em class="parameter"><code>x1</code></em>, <em class="parameter"><code>y1</code></em>) and
796
- (<em class="parameter"><code>x2</code></em>, <em class="parameter"><code>y2</code></em>) as the control points. After this call the current point
797
- will be (<em class="parameter"><code>x3</code></em>, <em class="parameter"><code>y3</code></em>).
798
- </p>
799
- <p>
800
- If there is no current point before the call to <a class="link" href="cairo-paths.html#cairo-curve-to" title="cairo_curve_to ()"><code class="function">cairo_curve_to()</code></a>
801
- this function will behave as if preceded by a call to
802
- cairo_move_to(<em class="parameter"><code>cr</code></em>, <em class="parameter"><code>x1</code></em>, <em class="parameter"><code>y1</code></em>).</p>
803
- <p>
804
- </p>
805
- <div class="variablelist"><table border="0">
806
- <col align="left" valign="top">
807
- <tbody>
808
- <tr>
809
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
810
- <td> a cairo context
811
- </td>
812
- </tr>
813
- <tr>
814
- <td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
815
- <td> the X coordinate of the first control point
816
- </td>
817
- </tr>
818
- <tr>
819
- <td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
820
- <td> the Y coordinate of the first control point
821
- </td>
822
- </tr>
823
- <tr>
824
- <td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
825
- <td> the X coordinate of the second control point
826
- </td>
827
- </tr>
828
- <tr>
829
- <td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
830
- <td> the Y coordinate of the second control point
831
- </td>
832
- </tr>
833
- <tr>
834
- <td><p><span class="term"><em class="parameter"><code>x3</code></em> :</span></p></td>
835
- <td> the X coordinate of the end of the curve
836
- </td>
837
- </tr>
838
- <tr>
839
- <td><p><span class="term"><em class="parameter"><code>y3</code></em> :</span></p></td>
840
- <td> the Y coordinate of the end of the curve
841
- </td>
842
- </tr>
843
- </tbody>
844
- </table></div>
845
- </div>
846
- <hr>
847
- <div class="refsect2" title="cairo_line_to ()">
848
- <a name="cairo-line-to"></a><h3>cairo_line_to ()</h3>
849
- <pre class="programlisting">void cairo_line_to (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
850
- double x,
851
- double y);</pre>
852
- <p>
853
- Adds a line to the path from the current point to position (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>)
854
- in user-space coordinates. After this call the current point
855
- will be (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>).
856
- </p>
857
- <p>
858
- If there is no current point before the call to <a class="link" href="cairo-paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>
859
- this function will behave as cairo_move_to(<em class="parameter"><code>cr</code></em>, <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>).</p>
860
- <p>
861
- </p>
862
- <div class="variablelist"><table border="0">
863
- <col align="left" valign="top">
864
- <tbody>
865
- <tr>
866
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
867
- <td> a cairo context
868
- </td>
869
- </tr>
870
- <tr>
871
- <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
872
- <td> the X coordinate of the end of the new line
873
- </td>
874
- </tr>
875
- <tr>
876
- <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
877
- <td> the Y coordinate of the end of the new line
878
- </td>
879
- </tr>
880
- </tbody>
881
- </table></div>
882
- </div>
883
- <hr>
884
- <div class="refsect2" title="cairo_move_to ()">
885
- <a name="cairo-move-to"></a><h3>cairo_move_to ()</h3>
886
- <pre class="programlisting">void cairo_move_to (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
887
- double x,
888
- double y);</pre>
889
- <p>
890
- Begin a new sub-path. After this call the current point will be (<em class="parameter"><code>x</code></em>,
891
- <em class="parameter"><code>y</code></em>).</p>
892
- <p>
893
- </p>
894
- <div class="variablelist"><table border="0">
895
- <col align="left" valign="top">
896
- <tbody>
897
- <tr>
898
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
899
- <td> a cairo context
900
- </td>
901
- </tr>
902
- <tr>
903
- <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
904
- <td> the X coordinate of the new position
905
- </td>
906
- </tr>
907
- <tr>
908
- <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
909
- <td> the Y coordinate of the new position
910
- </td>
911
- </tr>
912
- </tbody>
913
- </table></div>
914
- </div>
915
- <hr>
916
- <div class="refsect2" title="cairo_rectangle ()">
917
- <a name="cairo-rectangle"></a><h3>cairo_rectangle ()</h3>
918
- <pre class="programlisting">void cairo_rectangle (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
919
- double x,
920
- double y,
921
- double width,
922
- double height);</pre>
923
- <p>
924
- Adds a closed sub-path rectangle of the given size to the current
925
- path at position (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>) in user-space coordinates.
926
- </p>
927
- <p>
928
- This function is logically equivalent to:
929
- </p>
930
- <div class="informalexample"><pre class="programlisting">
931
- cairo_move_to (cr, x, y);
932
- cairo_rel_line_to (cr, width, 0);
933
- cairo_rel_line_to (cr, 0, height);
934
- cairo_rel_line_to (cr, -width, 0);
935
- cairo_close_path (cr);
936
- </pre></div>
937
- <p>
938
- </p>
939
- <div class="variablelist"><table border="0">
940
- <col align="left" valign="top">
941
- <tbody>
942
- <tr>
943
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
944
- <td> a cairo context
945
- </td>
946
- </tr>
947
- <tr>
948
- <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
949
- <td> the X coordinate of the top left corner of the rectangle
950
- </td>
951
- </tr>
952
- <tr>
953
- <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
954
- <td> the Y coordinate to the top left corner of the rectangle
955
- </td>
956
- </tr>
957
- <tr>
958
- <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
959
- <td> the width of the rectangle
960
- </td>
961
- </tr>
962
- <tr>
963
- <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
964
- <td> the height of the rectangle
965
- </td>
966
- </tr>
967
- </tbody>
968
- </table></div>
969
- </div>
970
- <hr>
971
- <div class="refsect2" title="cairo_glyph_path ()">
972
- <a name="cairo-glyph-path"></a><h3>cairo_glyph_path ()</h3>
973
- <pre class="programlisting">void cairo_glyph_path (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
974
- const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs,
975
- int num_glyphs);</pre>
976
- <p>
977
- Adds closed paths for the glyphs to the current path. The generated
978
- path if filled, achieves an effect similar to that of
979
- <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a>.</p>
980
- <p>
981
- </p>
982
- <div class="variablelist"><table border="0">
983
- <col align="left" valign="top">
984
- <tbody>
985
- <tr>
986
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
987
- <td> a cairo context
988
- </td>
989
- </tr>
990
- <tr>
991
- <td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
992
- <td> array of glyphs to show
993
- </td>
994
- </tr>
995
- <tr>
996
- <td><p><span class="term"><em class="parameter"><code>num_glyphs</code></em> :</span></p></td>
997
- <td> number of glyphs to show
998
- </td>
999
- </tr>
1000
- </tbody>
1001
- </table></div>
1002
- </div>
1003
- <hr>
1004
- <div class="refsect2" title="cairo_text_path ()">
1005
- <a name="cairo-text-path"></a><h3>cairo_text_path ()</h3>
1006
- <pre class="programlisting">void cairo_text_path (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
1007
- const char *utf8);</pre>
1008
- <p>
1009
- Adds closed paths for text to the current path. The generated
1010
- path if filled, achieves an effect similar to that of
1011
- <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>.
1012
- </p>
1013
- <p>
1014
- Text conversion and positioning is done similar to <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>.
1015
- </p>
1016
- <p>
1017
- Like <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>, After this call the current point is
1018
- moved to the origin of where the next glyph would be placed in
1019
- this same progression. That is, the current point will be at
1020
- the origin of the final glyph offset by its advance values.
1021
- This allows for chaining multiple calls to to <a class="link" href="cairo-paths.html#cairo-text-path" title="cairo_text_path ()"><code class="function">cairo_text_path()</code></a>
1022
- without having to set current point in between.
1023
- </p>
1024
- <p>
1025
- Note: The <a class="link" href="cairo-paths.html#cairo-text-path" title="cairo_text_path ()"><code class="function">cairo_text_path()</code></a> function call is part of what the cairo
1026
- designers call the "toy" text API. It is convenient for short demos
1027
- and simple programs, but it is not expected to be adequate for
1028
- serious text-using applications. See <a class="link" href="cairo-paths.html#cairo-glyph-path" title="cairo_glyph_path ()"><code class="function">cairo_glyph_path()</code></a> for the
1029
- "real" text path API in cairo.</p>
1030
- <p>
1031
- </p>
1032
- <div class="variablelist"><table border="0">
1033
- <col align="left" valign="top">
1034
- <tbody>
1035
- <tr>
1036
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
1037
- <td> a cairo context
1038
- </td>
1039
- </tr>
1040
- <tr>
1041
- <td><p><span class="term"><em class="parameter"><code>utf8</code></em> :</span></p></td>
1042
- <td> a NUL-terminated string of text encoded in UTF-8, or <code class="literal">NULL</code>
1043
- </td>
1044
- </tr>
1045
- </tbody>
1046
- </table></div>
1047
- </div>
1048
- <hr>
1049
- <div class="refsect2" title="cairo_rel_curve_to ()">
1050
- <a name="cairo-rel-curve-to"></a><h3>cairo_rel_curve_to ()</h3>
1051
- <pre class="programlisting">void cairo_rel_curve_to (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
1052
- double dx1,
1053
- double dy1,
1054
- double dx2,
1055
- double dy2,
1056
- double dx3,
1057
- double dy3);</pre>
1058
- <p>
1059
- Relative-coordinate version of <a class="link" href="cairo-paths.html#cairo-curve-to" title="cairo_curve_to ()"><code class="function">cairo_curve_to()</code></a>. All offsets are
1060
- relative to the current point. Adds a cubic Bézier spline to the
1061
- path from the current point to a point offset from the current
1062
- point by (<em class="parameter"><code>dx3</code></em>, <em class="parameter"><code>dy3</code></em>), using points offset by (<em class="parameter"><code>dx1</code></em>, <em class="parameter"><code>dy1</code></em>) and
1063
- (<em class="parameter"><code>dx2</code></em>, <em class="parameter"><code>dy2</code></em>) as the control points. After this call the current
1064
- point will be offset by (<em class="parameter"><code>dx3</code></em>, <em class="parameter"><code>dy3</code></em>).
1065
- </p>
1066
- <p>
1067
- Given a current point of (x, y), cairo_rel_curve_to(<em class="parameter"><code>cr</code></em>, <em class="parameter"><code>dx1</code></em>,
1068
- <em class="parameter"><code>dy1</code></em>, <em class="parameter"><code>dx2</code></em>, <em class="parameter"><code>dy2</code></em>, <em class="parameter"><code>dx3</code></em>, <em class="parameter"><code>dy3</code></em>) is logically equivalent to
1069
- cairo_curve_to(<em class="parameter"><code>cr</code></em>, x+<em class="parameter"><code>dx1</code></em>, y+<em class="parameter"><code>dy1</code></em>, x+<em class="parameter"><code>dx2</code></em>, y+<em class="parameter"><code>dy2</code></em>, x+<em class="parameter"><code>dx3</code></em>, y+<em class="parameter"><code>dy3</code></em>).
1070
- </p>
1071
- <p>
1072
- It is an error to call this function with no current point. Doing
1073
- so will cause <em class="parameter"><code>cr</code></em> to shutdown with a status of
1074
- <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-CURRENT-POINT--CAPS"><code class="literal">CAIRO_STATUS_NO_CURRENT_POINT</code></a>.</p>
1075
- <p>
1076
- </p>
1077
- <div class="variablelist"><table border="0">
1078
- <col align="left" valign="top">
1079
- <tbody>
1080
- <tr>
1081
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
1082
- <td> a cairo context
1083
- </td>
1084
- </tr>
1085
- <tr>
1086
- <td><p><span class="term"><em class="parameter"><code>dx1</code></em> :</span></p></td>
1087
- <td> the X offset to the first control point
1088
- </td>
1089
- </tr>
1090
- <tr>
1091
- <td><p><span class="term"><em class="parameter"><code>dy1</code></em> :</span></p></td>
1092
- <td> the Y offset to the first control point
1093
- </td>
1094
- </tr>
1095
- <tr>
1096
- <td><p><span class="term"><em class="parameter"><code>dx2</code></em> :</span></p></td>
1097
- <td> the X offset to the second control point
1098
- </td>
1099
- </tr>
1100
- <tr>
1101
- <td><p><span class="term"><em class="parameter"><code>dy2</code></em> :</span></p></td>
1102
- <td> the Y offset to the second control point
1103
- </td>
1104
- </tr>
1105
- <tr>
1106
- <td><p><span class="term"><em class="parameter"><code>dx3</code></em> :</span></p></td>
1107
- <td> the X offset to the end of the curve
1108
- </td>
1109
- </tr>
1110
- <tr>
1111
- <td><p><span class="term"><em class="parameter"><code>dy3</code></em> :</span></p></td>
1112
- <td> the Y offset to the end of the curve
1113
- </td>
1114
- </tr>
1115
- </tbody>
1116
- </table></div>
1117
- </div>
1118
- <hr>
1119
- <div class="refsect2" title="cairo_rel_line_to ()">
1120
- <a name="cairo-rel-line-to"></a><h3>cairo_rel_line_to ()</h3>
1121
- <pre class="programlisting">void cairo_rel_line_to (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
1122
- double dx,
1123
- double dy);</pre>
1124
- <p>
1125
- Relative-coordinate version of <a class="link" href="cairo-paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>. Adds a line to the
1126
- path from the current point to a point that is offset from the
1127
- current point by (<em class="parameter"><code>dx</code></em>, <em class="parameter"><code>dy</code></em>) in user space. After this call the
1128
- current point will be offset by (<em class="parameter"><code>dx</code></em>, <em class="parameter"><code>dy</code></em>).
1129
- </p>
1130
- <p>
1131
- Given a current point of (x, y), cairo_rel_line_to(<em class="parameter"><code>cr</code></em>, <em class="parameter"><code>dx</code></em>, <em class="parameter"><code>dy</code></em>)
1132
- is logically equivalent to cairo_line_to(<em class="parameter"><code>cr</code></em>, x + <em class="parameter"><code>dx</code></em>, y + <em class="parameter"><code>dy</code></em>).
1133
- </p>
1134
- <p>
1135
- It is an error to call this function with no current point. Doing
1136
- so will cause <em class="parameter"><code>cr</code></em> to shutdown with a status of
1137
- <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-CURRENT-POINT--CAPS"><code class="literal">CAIRO_STATUS_NO_CURRENT_POINT</code></a>.</p>
1138
- <p>
1139
- </p>
1140
- <div class="variablelist"><table border="0">
1141
- <col align="left" valign="top">
1142
- <tbody>
1143
- <tr>
1144
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
1145
- <td> a cairo context
1146
- </td>
1147
- </tr>
1148
- <tr>
1149
- <td><p><span class="term"><em class="parameter"><code>dx</code></em> :</span></p></td>
1150
- <td> the X offset to the end of the new line
1151
- </td>
1152
- </tr>
1153
- <tr>
1154
- <td><p><span class="term"><em class="parameter"><code>dy</code></em> :</span></p></td>
1155
- <td> the Y offset to the end of the new line
1156
- </td>
1157
- </tr>
1158
- </tbody>
1159
- </table></div>
1160
- </div>
1161
- <hr>
1162
- <div class="refsect2" title="cairo_rel_move_to ()">
1163
- <a name="cairo-rel-move-to"></a><h3>cairo_rel_move_to ()</h3>
1164
- <pre class="programlisting">void cairo_rel_move_to (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
1165
- double dx,
1166
- double dy);</pre>
1167
- <p>
1168
- Begin a new sub-path. After this call the current point will offset
1169
- by (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>).
1170
- </p>
1171
- <p>
1172
- Given a current point of (x, y), cairo_rel_move_to(<em class="parameter"><code>cr</code></em>, <em class="parameter"><code>dx</code></em>, <em class="parameter"><code>dy</code></em>)
1173
- is logically equivalent to cairo_move_to(<em class="parameter"><code>cr</code></em>, x + <em class="parameter"><code>dx</code></em>, y + <em class="parameter"><code>dy</code></em>).
1174
- </p>
1175
- <p>
1176
- It is an error to call this function with no current point. Doing
1177
- so will cause <em class="parameter"><code>cr</code></em> to shutdown with a status of
1178
- <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-CURRENT-POINT--CAPS"><code class="literal">CAIRO_STATUS_NO_CURRENT_POINT</code></a>.</p>
1179
- <p>
1180
- </p>
1181
- <div class="variablelist"><table border="0">
1182
- <col align="left" valign="top">
1183
- <tbody>
1184
- <tr>
1185
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
1186
- <td> a cairo context
1187
- </td>
1188
- </tr>
1189
- <tr>
1190
- <td><p><span class="term"><em class="parameter"><code>dx</code></em> :</span></p></td>
1191
- <td> the X offset
1192
- </td>
1193
- </tr>
1194
- <tr>
1195
- <td><p><span class="term"><em class="parameter"><code>dy</code></em> :</span></p></td>
1196
- <td> the Y offset
1197
- </td>
1198
- </tr>
1199
- </tbody>
1200
- </table></div>
1201
- </div>
1202
- <hr>
1203
- <div class="refsect2" title="cairo_path_extents ()">
1204
- <a name="cairo-path-extents"></a><h3>cairo_path_extents ()</h3>
1205
- <pre class="programlisting">void cairo_path_extents (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
1206
- double *x1,
1207
- double *y1,
1208
- double *x2,
1209
- double *y2);</pre>
1210
- <p>
1211
- Computes a bounding box in user-space coordinates covering the
1212
- points on the current path. If the current path is empty, returns
1213
- an empty rectangle ((0,0), (0,0)). Stroke parameters, fill rule,
1214
- surface dimensions and clipping are not taken into account.
1215
- </p>
1216
- <p>
1217
- Contrast with <a class="link" href="cairo-context.html#cairo-fill-extents" title="cairo_fill_extents ()"><code class="function">cairo_fill_extents()</code></a> and <a class="link" href="cairo-context.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> which
1218
- return the extents of only the area that would be "inked" by
1219
- the corresponding drawing operations.
1220
- </p>
1221
- <p>
1222
- The result of <a class="link" href="cairo-paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> is defined as equivalent to the
1223
- limit of <a class="link" href="cairo-context.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> with <a class="link" href="cairo-context.html#CAIRO-LINE-CAP-ROUND--CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> as the
1224
- line width approaches 0.0, (but never reaching the empty-rectangle
1225
- returned by <a class="link" href="cairo-context.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> for a line width of 0.0).
1226
- </p>
1227
- <p>
1228
- Specifically, this means that zero-area sub-paths such as
1229
- <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>;<a class="link" href="cairo-paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a> segments, (even degenerate cases
1230
- where the coordinates to both calls are identical), will be
1231
- considered as contributing to the extents. However, a lone
1232
- <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a> will not contribute to the results of
1233
- <a class="link" href="cairo-paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a>.</p>
1234
- <p>
1235
- </p>
1236
- <div class="variablelist"><table border="0">
1237
- <col align="left" valign="top">
1238
- <tbody>
1239
- <tr>
1240
- <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
1241
- <td> a cairo context
1242
- </td>
1243
- </tr>
1244
- <tr>
1245
- <td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
1246
- <td> left of the resulting extents
1247
- </td>
1248
- </tr>
1249
- <tr>
1250
- <td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
1251
- <td> top of the resulting extents
1252
- </td>
1253
- </tr>
1254
- <tr>
1255
- <td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
1256
- <td> right of the resulting extents
1257
- </td>
1258
- </tr>
1259
- <tr>
1260
- <td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
1261
- <td> bottom of the resulting extents
1262
- </td>
1263
- </tr>
1264
- </tbody>
1265
- </table></div>
1266
- <p class="since">Since 1.6</p>
1267
- </div>
1268
- </div>
1269
- </div>
1270
- <div class="footer">
1271
- <hr>
1272
- Generated by GTK-Doc V1.11</div>
1273
- </body>
1274
- </html>