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