cairo 1.7.0-x86-mswin32 → 1.8.0-x86-mswin32

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

Potentially problematic release.


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

Files changed (167) hide show
  1. data/ChangeLog +32 -0
  2. data/NEWS +9 -1
  3. data/README +1 -0
  4. data/Rakefile +2 -2
  5. data/cairo/DLL_FAQ.txt +397 -0
  6. data/cairo/README.txt +53 -0
  7. data/cairo/USAGE.txt +94 -0
  8. data/cairo/bin/libcairo-2.dll +0 -0
  9. data/cairo/bin/libpng12-0.dll +0 -0
  10. data/cairo/bin/zlib1.dll +0 -0
  11. data/cairo/include/cairo/cairo-deprecated.h +0 -4
  12. data/cairo/include/cairo/cairo-features.h +7 -22
  13. data/cairo/include/cairo/cairo-pdf.h +1 -1
  14. data/cairo/include/cairo/cairo-ps.h +1 -1
  15. data/cairo/include/cairo/cairo-svg.h +1 -1
  16. data/cairo/include/cairo/cairo-version.h +8 -0
  17. data/cairo/include/cairo/cairo-win32.h +9 -1
  18. data/cairo/include/cairo/cairo.h +420 -32
  19. data/cairo/include/libpng12/png.h +3592 -0
  20. data/cairo/include/libpng12/pngconf.h +1481 -0
  21. data/cairo/include/png.h +36 -13
  22. data/cairo/include/pngconf.h +3 -3
  23. data/cairo/include/zconf.h +332 -0
  24. data/cairo/include/zlib.h +1357 -0
  25. data/cairo/lib/cairo.def +22 -0
  26. data/cairo/lib/cairo.lib +0 -0
  27. data/cairo/lib/libcairo.dll.a +0 -0
  28. data/cairo/lib/libpng.def +1 -0
  29. data/cairo/lib/libpng.lib +0 -0
  30. data/cairo/lib/libpng12.dll.a +0 -0
  31. data/cairo/lib/pkgconfig/cairo-pdf.pc +5 -5
  32. data/cairo/lib/pkgconfig/cairo-png.pc +5 -5
  33. data/cairo/lib/pkgconfig/cairo-ps.pc +5 -5
  34. data/cairo/lib/pkgconfig/cairo-svg.pc +4 -4
  35. data/cairo/lib/pkgconfig/cairo-win32-font.pc +4 -4
  36. data/cairo/lib/pkgconfig/cairo-win32.pc +4 -4
  37. data/cairo/lib/pkgconfig/cairo.pc +4 -4
  38. data/cairo/lib/pkgconfig/libpng.pc +3 -2
  39. data/cairo/lib/pkgconfig/libpng12.pc +3 -2
  40. data/cairo/lib/zdll.exp +0 -0
  41. data/cairo/lib/zdll.lib +0 -0
  42. data/cairo/lib/zlib.def +60 -0
  43. data/cairo/manifest/cairo-dev_1.8.0-1_win32.mft +76 -0
  44. data/cairo/manifest/cairo_1.8.0-1_win32.mft +5 -0
  45. data/cairo/manifest/{libpng-dev-1.2.29.mft → libpng-dev_1.2.32-1_win32.mft} +5 -2
  46. data/cairo/manifest/libpng_1.2.32-1_win32.mft +2 -0
  47. data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING +0 -0
  48. data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING-LGPL-2.1 +0 -0
  49. data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING-MPL-1.1 +0 -0
  50. data/cairo/share/gtk-doc/html/cairo/bindings-errors.html +15 -11
  51. data/cairo/share/gtk-doc/html/cairo/bindings-fonts.html +15 -11
  52. data/cairo/share/gtk-doc/html/cairo/bindings-memory.html +20 -16
  53. data/cairo/share/gtk-doc/html/cairo/bindings-overloading.html +16 -12
  54. data/cairo/share/gtk-doc/html/cairo/bindings-path.html +17 -13
  55. data/cairo/share/gtk-doc/html/cairo/bindings-patterns.html +25 -21
  56. data/cairo/share/gtk-doc/html/cairo/bindings-return-values.html +17 -13
  57. data/cairo/share/gtk-doc/html/cairo/bindings-streams.html +14 -10
  58. data/cairo/share/gtk-doc/html/cairo/bindings-surfaces.html +19 -15
  59. data/cairo/share/gtk-doc/html/cairo/cairo-context.html +2721 -0
  60. data/cairo/share/gtk-doc/html/cairo/cairo-drawing.html +57 -0
  61. data/cairo/share/gtk-doc/html/cairo/cairo-error-status.html +361 -0
  62. data/cairo/share/gtk-doc/html/cairo/cairo-font-face.html +418 -0
  63. data/cairo/share/gtk-doc/html/cairo/cairo-font-options.html +695 -0
  64. data/cairo/share/gtk-doc/html/cairo/cairo-fonts.html +63 -0
  65. data/cairo/share/gtk-doc/html/cairo/cairo-ft-font.html +318 -0
  66. data/cairo/share/gtk-doc/html/cairo/cairo-image-surface.html +486 -0
  67. data/cairo/share/gtk-doc/html/cairo/{cairo-cairo-matrix-t.html → cairo-matrix.html} +137 -156
  68. data/cairo/share/gtk-doc/html/cairo/{cairo-Paths.html → cairo-paths.html} +275 -306
  69. data/cairo/share/gtk-doc/html/cairo/cairo-pattern.html +1524 -0
  70. data/cairo/share/gtk-doc/html/cairo/{cairo-PDF-Surfaces.html → cairo-pdf-surface.html} +60 -70
  71. data/cairo/share/gtk-doc/html/cairo/cairo-png-functions.html +332 -0
  72. data/cairo/share/gtk-doc/html/cairo/{cairo-PostScript-Surfaces.html → cairo-ps-surface.html} +131 -150
  73. data/cairo/share/gtk-doc/html/cairo/cairo-quartz-font.html +153 -0
  74. data/cairo/share/gtk-doc/html/cairo/{cairo-Quartz-Surfaces.html → cairo-quartz-surface.html} +53 -62
  75. data/cairo/share/gtk-doc/html/cairo/cairo-scaled-font.html +1051 -0
  76. data/cairo/share/gtk-doc/html/cairo/cairo-support.html +54 -0
  77. data/cairo/share/gtk-doc/html/cairo/cairo-surface.html +1064 -0
  78. data/cairo/share/gtk-doc/html/cairo/cairo-surfaces.html +69 -0
  79. data/cairo/share/gtk-doc/html/cairo/cairo-svg-surface.html +324 -0
  80. data/cairo/share/gtk-doc/html/cairo/cairo-text.html +1264 -0
  81. data/cairo/share/gtk-doc/html/cairo/{cairo-Transformations.html → cairo-transformations.html} +98 -115
  82. data/cairo/share/gtk-doc/html/cairo/cairo-types.html +134 -0
  83. data/cairo/share/gtk-doc/html/cairo/cairo-user-font.html +769 -0
  84. data/cairo/share/gtk-doc/html/cairo/cairo-version-info.html +355 -0
  85. data/cairo/share/gtk-doc/html/cairo/cairo-win32-font.html +366 -0
  86. data/cairo/share/gtk-doc/html/cairo/cairo-win32-surface.html +321 -0
  87. data/cairo/share/gtk-doc/html/cairo/{cairo-XLib-Surfaces.html → cairo-xlib-surface.html} +104 -121
  88. data/cairo/share/gtk-doc/html/cairo/cairo.devhelp +390 -405
  89. data/cairo/share/gtk-doc/html/cairo/cairo.devhelp2 +390 -405
  90. data/cairo/share/gtk-doc/html/cairo/index-1.2.html +63 -59
  91. data/cairo/share/gtk-doc/html/cairo/index-1.4.html +45 -41
  92. data/cairo/share/gtk-doc/html/cairo/index-1.6.html +29 -23
  93. data/cairo/share/gtk-doc/html/cairo/index-1.8.html +107 -0
  94. data/cairo/share/gtk-doc/html/cairo/index-all.html +759 -0
  95. data/cairo/share/gtk-doc/html/cairo/index.html +51 -41
  96. data/cairo/share/gtk-doc/html/cairo/index.sgml +478 -466
  97. data/cairo/share/gtk-doc/html/cairo/language-bindings.html +22 -18
  98. data/cairo/share/gtk-doc/html/cairo/style.css +14 -2
  99. data/cairo/share/man/man3/libpng.3 +443 -17
  100. data/cairo/share/man/man3/libpngpf.3 +618 -102
  101. data/cairo/share/man/man5/png.5 +1 -1
  102. data/cairo/src/tml/make/cairo_1.8.0-1_win32.log +1021 -0
  103. data/cairo/src/tml/make/cairo_1.8.0-1_win32.sh +68 -0
  104. data/cairo/src/tml/make/libpng_1.2.32-1_win32.log +269 -0
  105. data/cairo/src/tml/make/libpng_1.2.32-1_win32.sh +63 -0
  106. data/cairo/test/example_d.exe +0 -0
  107. data/cairo/test/minigzip_d.exe +0 -0
  108. data/cairo/test/testzlib_d.exe +0 -0
  109. data/cairo/test/untgz_d.exe +0 -0
  110. data/doc/en/cairo-context.html +81 -91
  111. data/doc/en/cairo-font-options.html +11 -26
  112. data/doc/en/cairo-text-cluster-flag.html +35 -0
  113. data/doc/en/cairo-user-font-face-text-to-glyphs-data.html +3 -3
  114. data/doc/en/cairo.html +38 -42
  115. data/doc/en/index.html +129 -142
  116. data/doc/ja/cairo-font-options.html +3 -25
  117. data/doc/ja/cairo-text-cluster-flag.html +46 -0
  118. data/doc/ja/cairo-user-font-face-text-to-glyphs-data.html +16 -15
  119. data/doc/ja/cairo.html +3 -7
  120. data/doc/ja/index.html +9 -17
  121. data/src/cairo.def +1 -1
  122. data/src/cairo.so +0 -0
  123. data/src/lib/cairo/constants.rb +3 -1
  124. data/src/libruby-cairo.a +0 -0
  125. data/src/rb_cairo.c +2 -2
  126. data/src/rb_cairo.h +5 -5
  127. data/src/rb_cairo_constants.c +12 -19
  128. data/src/rb_cairo_context.c +25 -21
  129. data/src/rb_cairo_font_face.c +44 -29
  130. data/src/rb_cairo_font_options.c +1 -23
  131. data/src/rb_cairo_scaled_font.c +5 -5
  132. data/test/test_constants.rb +6 -9
  133. data/test/test_context.rb +0 -12
  134. data/test/test_font_face.rb +7 -7
  135. data/test/test_font_options.rb +2 -21
  136. data/test/test_scaled_font.rb +3 -3
  137. data/test/test_text_to_glyphs_data.rb +19 -15
  138. metadata +68 -45
  139. data/cairo/make/cairo-1.6.4-2.sh +0 -55
  140. data/cairo/make/libpng-1.2.29.sh +0 -35
  141. data/cairo/manifest/cairo-1.6.4-2.mft +0 -6
  142. data/cairo/manifest/cairo-dev-1.6.4-2.mft +0 -72
  143. data/cairo/manifest/libpng-1.2.29.mft +0 -2
  144. data/cairo/share/gtk-doc/html/cairo/Drawing.html +0 -53
  145. data/cairo/share/gtk-doc/html/cairo/Fonts.html +0 -56
  146. data/cairo/share/gtk-doc/html/cairo/Support.html +0 -50
  147. data/cairo/share/gtk-doc/html/cairo/Surfaces.html +0 -65
  148. data/cairo/share/gtk-doc/html/cairo/cairo-Error-Handling.html +0 -328
  149. data/cairo/share/gtk-doc/html/cairo/cairo-Font-Options.html +0 -720
  150. data/cairo/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +0 -297
  151. data/cairo/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +0 -484
  152. data/cairo/share/gtk-doc/html/cairo/cairo-PNG-Support.html +0 -345
  153. data/cairo/share/gtk-doc/html/cairo/cairo-Patterns.html +0 -1560
  154. data/cairo/share/gtk-doc/html/cairo/cairo-Quartz-Fonts.html +0 -161
  155. data/cairo/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +0 -337
  156. data/cairo/share/gtk-doc/html/cairo/cairo-Scaled-Fonts.html +0 -823
  157. data/cairo/share/gtk-doc/html/cairo/cairo-Text.html +0 -836
  158. data/cairo/share/gtk-doc/html/cairo/cairo-Types.html +0 -143
  159. data/cairo/share/gtk-doc/html/cairo/cairo-Version-Information.html +0 -325
  160. data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +0 -381
  161. data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +0 -331
  162. data/cairo/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +0 -427
  163. data/cairo/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +0 -995
  164. data/cairo/share/gtk-doc/html/cairo/cairo-cairo-t.html +0 -2795
  165. data/cairo/share/gtk-doc/html/cairo/ix01.html +0 -693
  166. data/doc/en/cairo-lcd-filter.html +0 -39
  167. data/doc/ja/cairo-lcd-filter.html +0 -63
@@ -1,345 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
- <title>PNG Support</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
- <link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
8
- <link rel="up" href="Surfaces.html" title="Surfaces">
9
- <link rel="prev" href="cairo-PDF-Surfaces.html" title="PDF Surfaces">
10
- <link rel="next" href="cairo-PostScript-Surfaces.html" title="PostScript Surfaces">
11
- <meta name="generator" content="GTK-Doc V1.9 (XML mode)">
12
- <link rel="stylesheet" href="style.css" type="text/css">
13
- <link rel="chapter" href="Drawing.html" title="Drawing">
14
- <link rel="chapter" href="Fonts.html" title="Fonts">
15
- <link rel="chapter" href="Surfaces.html" title="Surfaces">
16
- <link rel="chapter" href="Support.html" title="Utilities">
17
- <link rel="index" href="ix01.html" title="Index">
18
- <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
19
- <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
20
- <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
21
- <link rel="appendix" href="language-bindings.html" title="Appendix&#160;A.&#160;Creating a language binding for cairo">
22
- </head>
23
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
24
- <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
25
- <tr valign="middle">
26
- <td><a accesskey="p" href="cairo-PDF-Surfaces.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
27
- <td><a accesskey="u" href="Surfaces.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
28
- <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
29
- <th width="100%" align="center">Cairo: A Vector Graphics Library</th>
30
- <td><a accesskey="n" href="cairo-PostScript-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
- </tr>
32
- <tr><td colspan="5" class="shortcuts"><nobr><a href="#id2621948" class="shortcut">Top</a>
33
- &#160;|&#160;
34
- <a href="#id2660174" class="shortcut">Description</a></nobr></td></tr>
35
- </table>
36
- <div class="refentry" lang="en">
37
- <a name="cairo-PNG-Support"></a><div class="titlepage"></div>
38
- <div class="refnamediv"><table width="100%"><tr>
39
- <td valign="top">
40
- <h2>
41
- <a name="id2621948"></a><span class="refentrytitle">PNG Support</span>
42
- </h2>
43
- <p>PNG Support &#8212; Reading and writing PNG images</p>
44
- </td>
45
- <td valign="top" align="right"></td>
46
- </tr></table></div>
47
- <div class="refsynopsisdiv">
48
- <h2>Synopsis</h2>
49
- <pre class="synopsis">
50
-
51
-
52
-
53
- #define <a class="link" href="cairo-PNG-Support.html#CAIRO-HAS-PNG-FUNCTIONS:CAPS">CAIRO_HAS_PNG_FUNCTIONS</a>
54
- <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* <a class="link" href="cairo-PNG-Support.html#cairo-image-surface-create-from-png">cairo_image_surface_create_from_png</a> (const char *filename);
55
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> (<a class="link" href="cairo-PNG-Support.html#cairo-read-func-t">*cairo_read_func_t</a>) (void *closure,
56
- unsigned char *data,
57
- unsigned int length);
58
- <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* <a class="link" href="cairo-PNG-Support.html#cairo-image-surface-create-from-png-stream">cairo_image_surface_create_from_png_stream</a>
59
- (<a class="link" href="cairo-PNG-Support.html#cairo-read-func-t">cairo_read_func_t</a> read_func,
60
- void *closure);
61
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-PNG-Support.html#cairo-surface-write-to-png">cairo_surface_write_to_png</a> (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,
62
- const char *filename);
63
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> (<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">*cairo_write_func_t</a>) (void *closure,
64
- unsigned char *data,
65
- unsigned int length);
66
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-PNG-Support.html#cairo-surface-write-to-png-stream">cairo_surface_write_to_png_stream</a> (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,
67
- <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">cairo_write_func_t</a> write_func,
68
- void *closure);
69
- </pre>
70
- </div>
71
- <div class="refsect1" lang="en">
72
- <a name="id2660174"></a><h2>Description</h2>
73
- <p>
74
- The PNG functions allow reading PNG images into image surfaces, and writing
75
- any surface to a PNG file.
76
- </p>
77
- </div>
78
- <div class="refsect1" lang="en">
79
- <a name="id2660192"></a><h2>Details</h2>
80
- <div class="refsect2" lang="en">
81
- <a name="id2660202"></a><h3>
82
- <a name="CAIRO-HAS-PNG-FUNCTIONS:CAPS"></a>CAIRO_HAS_PNG_FUNCTIONS</h3>
83
- <a class="indexterm" name="id2660214"></a><pre class="programlisting">#define CAIRO_HAS_PNG_FUNCTIONS 1
84
- </pre>
85
- <p>
86
- Defined if the PNG functions are available.
87
- This macro can be used to conditionally compile code using the cairo
88
- PNG functions.
89
- </p>
90
- </div>
91
- <hr>
92
- <div class="refsect2" lang="en">
93
- <a name="id2660231"></a><h3>
94
- <a name="cairo-image-surface-create-from-png"></a>cairo_image_surface_create_from_png ()</h3>
95
- <a class="indexterm" name="id2660242"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_image_surface_create_from_png (const char *filename);</pre>
96
- <p>
97
- Creates a new image surface and initializes the contents to the
98
- given PNG file.</p>
99
- <p>
100
-
101
- </p>
102
- <div class="variablelist"><table border="0">
103
- <col align="left" valign="top">
104
- <tbody>
105
- <tr>
106
- <td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
107
- <td> name of PNG file to load
108
- </td>
109
- </tr>
110
- <tr>
111
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
112
- <td> a new <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> initialized with the contents
113
- of the PNG file, or a "nil" surface if any error occurred. A nil
114
- surface can be checked for with cairo_surface_status(surface) which
115
- may return one of the following values:
116
-
117
- CAIRO_STATUS_NO_MEMORY
118
- CAIRO_STATUS_FILE_NOT_FOUND
119
- CAIRO_STATUS_READ_ERROR
120
- </td>
121
- </tr>
122
- </tbody>
123
- </table></div>
124
- </div>
125
- <hr>
126
- <div class="refsect2" lang="en">
127
- <a name="id2660315"></a><h3>
128
- <a name="cairo-read-func-t"></a>cairo_read_func_t ()</h3>
129
- <a class="indexterm" name="id2660328"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> (*cairo_read_func_t) (void *closure,
130
- unsigned char *data,
131
- unsigned int length);</pre>
132
- <p>
133
- <a class="link" href="cairo-PNG-Support.html#cairo-read-func-t"><span class="type">cairo_read_func_t</span></a> is the type of function which is called when a
134
- backend needs to read data from an input stream. It is passed the
135
- closure which was specified by the user at the time the read
136
- function was registered, the buffer to read the data into and the
137
- length of the data in bytes. The read function should return
138
- CAIRO_STATUS_SUCCESS if all the data was successfully read,
139
- CAIRO_STATUS_READ_ERROR otherwise.</p>
140
- <p>
141
-
142
- </p>
143
- <div class="variablelist"><table border="0">
144
- <col align="left" valign="top">
145
- <tbody>
146
- <tr>
147
- <td><p><span class="term"><em class="parameter"><code>closure</code></em>&#160;:</span></p></td>
148
- <td> the input closure
149
- </td>
150
- </tr>
151
- <tr>
152
- <td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
153
- <td> the buffer into which to read the data
154
- </td>
155
- </tr>
156
- <tr>
157
- <td><p><span class="term"><em class="parameter"><code>length</code></em>&#160;:</span></p></td>
158
- <td> the amount of data to read
159
- </td>
160
- </tr>
161
- <tr>
162
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
163
- <td> the status code of the read operation
164
- </td>
165
- </tr>
166
- </tbody>
167
- </table></div>
168
- </div>
169
- <hr>
170
- <div class="refsect2" lang="en">
171
- <a name="id2660444"></a><h3>
172
- <a name="cairo-image-surface-create-from-png-stream"></a>cairo_image_surface_create_from_png_stream ()</h3>
173
- <a class="indexterm" name="id2660458"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_image_surface_create_from_png_stream
174
- (<a class="link" href="cairo-PNG-Support.html#cairo-read-func-t">cairo_read_func_t</a> read_func,
175
- void *closure);</pre>
176
- <p>
177
- Creates a new image surface from PNG data read incrementally
178
- via the <em class="parameter"><code>read_func</code></em> function.</p>
179
- <p>
180
-
181
- </p>
182
- <div class="variablelist"><table border="0">
183
- <col align="left" valign="top">
184
- <tbody>
185
- <tr>
186
- <td><p><span class="term"><em class="parameter"><code>read_func</code></em>&#160;:</span></p></td>
187
- <td> function called to read the data of the file
188
- </td>
189
- </tr>
190
- <tr>
191
- <td><p><span class="term"><em class="parameter"><code>closure</code></em>&#160;:</span></p></td>
192
- <td> data to pass to <em class="parameter"><code>read_func</code></em>.
193
- </td>
194
- </tr>
195
- <tr>
196
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
197
- <td> a new <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> initialized with the contents
198
- of the PNG file or <code class="literal">NULL</code> if the data read is not a valid PNG image or
199
- memory could not be allocated for the operation.
200
- </td>
201
- </tr>
202
- </tbody>
203
- </table></div>
204
- </div>
205
- <hr>
206
- <div class="refsect2" lang="en">
207
- <a name="id2661205"></a><h3>
208
- <a name="cairo-surface-write-to-png"></a>cairo_surface_write_to_png ()</h3>
209
- <a class="indexterm" name="id2661217"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_write_to_png (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,
210
- const char *filename);</pre>
211
- <p>
212
- Writes the contents of <em class="parameter"><code>surface</code></em> to a new file <em class="parameter"><code>filename</code></em> as a PNG
213
- image.</p>
214
- <p>
215
-
216
- </p>
217
- <div class="variablelist"><table border="0">
218
- <col align="left" valign="top">
219
- <tbody>
220
- <tr>
221
- <td><p><span class="term"><em class="parameter"><code>surface</code></em>&#160;:</span></p></td>
222
- <td> a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> with pixel contents
223
- </td>
224
- </tr>
225
- <tr>
226
- <td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
227
- <td> the name of a file to write to
228
- </td>
229
- </tr>
230
- <tr>
231
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
232
- <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if the PNG file was written
233
- successfully. Otherwise, <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if memory could not
234
- be allocated for the operation or
235
- CAIRO_STATUS_SURFACE_TYPE_MISMATCH if the surface does not have
236
- pixel contents, or <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-WRITE-ERROR:CAPS"><code class="literal">CAIRO_STATUS_WRITE_ERROR</code></a> if an I/O error occurs
237
- while attempting to write the file.
238
- </td>
239
- </tr>
240
- </tbody>
241
- </table></div>
242
- </div>
243
- <hr>
244
- <div class="refsect2" lang="en">
245
- <a name="id2661348"></a><h3>
246
- <a name="cairo-write-func-t"></a>cairo_write_func_t ()</h3>
247
- <a class="indexterm" name="id2661360"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> (*cairo_write_func_t) (void *closure,
248
- unsigned char *data,
249
- unsigned int length);</pre>
250
- <p>
251
- <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t"><span class="type">cairo_write_func_t</span></a> is the type of function which is called when a
252
- backend needs to write data to an output stream. It is passed the
253
- closure which was specified by the user at the time the write
254
- function was registered, the data to write and the length of the
255
- data in bytes. The write function should return
256
- CAIRO_STATUS_SUCCESS if all the data was successfully written,
257
- CAIRO_STATUS_WRITE_ERROR otherwise.</p>
258
- <p>
259
-
260
- </p>
261
- <div class="variablelist"><table border="0">
262
- <col align="left" valign="top">
263
- <tbody>
264
- <tr>
265
- <td><p><span class="term"><em class="parameter"><code>closure</code></em>&#160;:</span></p></td>
266
- <td> the output closure
267
- </td>
268
- </tr>
269
- <tr>
270
- <td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
271
- <td> the buffer containing the data to write
272
- </td>
273
- </tr>
274
- <tr>
275
- <td><p><span class="term"><em class="parameter"><code>length</code></em>&#160;:</span></p></td>
276
- <td> the amount of data to write
277
- </td>
278
- </tr>
279
- <tr>
280
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
281
- <td> the status code of the write operation
282
- </td>
283
- </tr>
284
- </tbody>
285
- </table></div>
286
- </div>
287
- <hr>
288
- <div class="refsect2" lang="en">
289
- <a name="id2661477"></a><h3>
290
- <a name="cairo-surface-write-to-png-stream"></a>cairo_surface_write_to_png_stream ()</h3>
291
- <a class="indexterm" name="id2661489"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_write_to_png_stream (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,
292
- <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">cairo_write_func_t</a> write_func,
293
- void *closure);</pre>
294
- <p>
295
- Writes the image surface to the write function.</p>
296
- <p>
297
-
298
- </p>
299
- <div class="variablelist"><table border="0">
300
- <col align="left" valign="top">
301
- <tbody>
302
- <tr>
303
- <td><p><span class="term"><em class="parameter"><code>surface</code></em>&#160;:</span></p></td>
304
- <td> a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> with pixel contents
305
- </td>
306
- </tr>
307
- <tr>
308
- <td><p><span class="term"><em class="parameter"><code>write_func</code></em>&#160;:</span></p></td>
309
- <td> a <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t"><span class="type">cairo_write_func_t</span></a>
310
- </td>
311
- </tr>
312
- <tr>
313
- <td><p><span class="term"><em class="parameter"><code>closure</code></em>&#160;:</span></p></td>
314
- <td> closure data for the write function
315
- </td>
316
- </tr>
317
- <tr>
318
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
319
- <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if the PNG file was written
320
- successfully. Otherwise, <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> is returned if
321
- memory could not be allocated for the operation,
322
- CAIRO_STATUS_SURFACE_TYPE_MISMATCH if the surface does not have
323
- pixel contents.
324
- </td>
325
- </tr>
326
- </tbody>
327
- </table></div>
328
- </div>
329
- </div>
330
- <div class="refsect1" lang="en">
331
- <a name="id2657468"></a><h2>See Also</h2>
332
- <p>
333
- </p>
334
- <div class="itemizedlist"><ul type="disc"><li><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a></li></ul></div>
335
- <p>
336
- </p>
337
- </div>
338
- <div class="refsect1" lang="en">
339
- <a name="id2657492"></a><div class="refsect2" lang="en"><a name="id2657493"></a></div>
340
- <hr>
341
- <div class="refsect2" lang="en"><a name="id2657494"></a></div>
342
- </div>
343
- </div>
344
- </body>
345
- </html>
@@ -1,1560 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
- <title>cairo_pattern_t</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
- <link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
8
- <link rel="up" href="Drawing.html" title="Drawing">
9
- <link rel="prev" href="cairo-Paths.html" title="Paths">
10
- <link rel="next" href="cairo-Transformations.html" title="Transformations">
11
- <meta name="generator" content="GTK-Doc V1.9 (XML mode)">
12
- <link rel="stylesheet" href="style.css" type="text/css">
13
- <link rel="chapter" href="Drawing.html" title="Drawing">
14
- <link rel="chapter" href="Fonts.html" title="Fonts">
15
- <link rel="chapter" href="Surfaces.html" title="Surfaces">
16
- <link rel="chapter" href="Support.html" title="Utilities">
17
- <link rel="index" href="ix01.html" title="Index">
18
- <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
19
- <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
20
- <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
21
- <link rel="appendix" href="language-bindings.html" title="Appendix&#160;A.&#160;Creating a language binding for cairo">
22
- </head>
23
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
24
- <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
25
- <tr valign="middle">
26
- <td><a accesskey="p" href="cairo-Paths.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
27
- <td><a accesskey="u" href="Drawing.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
28
- <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
29
- <th width="100%" align="center">Cairo: A Vector Graphics Library</th>
30
- <td><a accesskey="n" href="cairo-Transformations.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
- </tr>
32
- <tr><td colspan="5" class="shortcuts"><nobr><a href="#id2609746" class="shortcut">Top</a>
33
- &#160;|&#160;
34
- <a href="#id2642369" class="shortcut">Description</a></nobr></td></tr>
35
- </table>
36
- <div class="refentry" lang="en">
37
- <a name="cairo-Patterns"></a><div class="titlepage"></div>
38
- <div class="refnamediv"><table width="100%"><tr>
39
- <td valign="top">
40
- <h2>
41
- <a name="id2609746"></a><span class="refentrytitle">cairo_pattern_t</span>
42
- </h2>
43
- <p>cairo_pattern_t &#8212; Sources for drawing</p>
44
- </td>
45
- <td valign="top" align="right"></td>
46
- </tr></table></div>
47
- <div class="refsynopsisdiv">
48
- <h2>Synopsis</h2>
49
- <pre class="synopsis">
50
-
51
-
52
-
53
- typedef <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>;
54
- void <a class="link" href="cairo-Patterns.html#cairo-pattern-add-color-stop-rgb">cairo_pattern_add_color_stop_rgb</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
55
- double offset,
56
- double red,
57
- double green,
58
- double blue);
59
- void <a class="link" href="cairo-Patterns.html#cairo-pattern-add-color-stop-rgba">cairo_pattern_add_color_stop_rgba</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
60
- double offset,
61
- double red,
62
- double green,
63
- double blue,
64
- double alpha);
65
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-get-color-stop-count">cairo_pattern_get_color_stop_count</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
66
- int *count);
67
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-get-color-stop-rgba">cairo_pattern_get_color_stop_rgba</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
68
- int index,
69
- double *offset,
70
- double *red,
71
- double *green,
72
- double *blue,
73
- double *alpha);
74
- <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* <a class="link" href="cairo-Patterns.html#cairo-pattern-create-rgb">cairo_pattern_create_rgb</a> (double red,
75
- double green,
76
- double blue);
77
- <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* <a class="link" href="cairo-Patterns.html#cairo-pattern-create-rgba">cairo_pattern_create_rgba</a> (double red,
78
- double green,
79
- double blue,
80
- double alpha);
81
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-get-rgba">cairo_pattern_get_rgba</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
82
- double *red,
83
- double *green,
84
- double *blue,
85
- double *alpha);
86
- <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* <a class="link" href="cairo-Patterns.html#cairo-pattern-create-for-surface">cairo_pattern_create_for_surface</a> (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);
87
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-get-surface">cairo_pattern_get_surface</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
88
- <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> **surface);
89
- <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* <a class="link" href="cairo-Patterns.html#cairo-pattern-create-linear">cairo_pattern_create_linear</a> (double x0,
90
- double y0,
91
- double x1,
92
- double y1);
93
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-get-linear-points">cairo_pattern_get_linear_points</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
94
- double *x0,
95
- double *y0,
96
- double *x1,
97
- double *y1);
98
- <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* <a class="link" href="cairo-Patterns.html#cairo-pattern-create-radial">cairo_pattern_create_radial</a> (double cx0,
99
- double cy0,
100
- double radius0,
101
- double cx1,
102
- double cy1,
103
- double radius1);
104
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-get-radial-circles">cairo_pattern_get_radial_circles</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
105
- double *x0,
106
- double *y0,
107
- double *r0,
108
- double *x1,
109
- double *y1,
110
- double *r1);
111
- <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* <a class="link" href="cairo-Patterns.html#cairo-pattern-reference">cairo_pattern_reference</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);
112
- void <a class="link" href="cairo-Patterns.html#cairo-pattern-destroy">cairo_pattern_destroy</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);
113
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-status">cairo_pattern_status</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);
114
- enum <a class="link" href="cairo-Patterns.html#cairo-extend-t">cairo_extend_t</a>;
115
- void <a class="link" href="cairo-Patterns.html#cairo-pattern-set-extend">cairo_pattern_set_extend</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
116
- <a class="link" href="cairo-Patterns.html#cairo-extend-t">cairo_extend_t</a> extend);
117
- <a class="link" href="cairo-Patterns.html#cairo-extend-t">cairo_extend_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-get-extend">cairo_pattern_get_extend</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);
118
- enum <a class="link" href="cairo-Patterns.html#cairo-filter-t">cairo_filter_t</a>;
119
- void <a class="link" href="cairo-Patterns.html#cairo-pattern-set-filter">cairo_pattern_set_filter</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
120
- <a class="link" href="cairo-Patterns.html#cairo-filter-t">cairo_filter_t</a> filter);
121
- <a class="link" href="cairo-Patterns.html#cairo-filter-t">cairo_filter_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-get-filter">cairo_pattern_get_filter</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);
122
- void <a class="link" href="cairo-Patterns.html#cairo-pattern-set-matrix">cairo_pattern_set_matrix</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
123
- const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);
124
- void <a class="link" href="cairo-Patterns.html#cairo-pattern-get-matrix">cairo_pattern_get_matrix</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
125
- <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);
126
- enum <a class="link" href="cairo-Patterns.html#cairo-pattern-type-t">cairo_pattern_type_t</a>;
127
- <a class="link" href="cairo-Patterns.html#cairo-pattern-type-t">cairo_pattern_type_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-get-type">cairo_pattern_get_type</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);
128
- unsigned int <a class="link" href="cairo-Patterns.html#cairo-pattern-get-reference-count">cairo_pattern_get_reference_count</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);
129
- <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> <a class="link" href="cairo-Patterns.html#cairo-pattern-set-user-data">cairo_pattern_set_user_data</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
130
- const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key,
131
- void *user_data,
132
- <a class="link" href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);
133
- void* <a class="link" href="cairo-Patterns.html#cairo-pattern-get-user-data">cairo_pattern_get_user_data</a> (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
134
- const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);
135
- </pre>
136
- </div>
137
- <div class="refsect1" lang="en">
138
- <a name="id2642369"></a><h2>Description</h2>
139
- <p>
140
- <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> is the paint with which cairo draws.
141
- The primary use of patterns is as the source for all cairo drawing operations,
142
- although they can also be used as masks, that is, as the brush too.
143
- </p>
144
- <p>
145
- A cairo pattern is created by using one of the many constructors,
146
- of the form cairo_pattern_create_<span class="emphasis"><em>type</em></span>()
147
- or implicitly through
148
- cairo_set_source_<span class="emphasis"><em>type</em></span>() functions.
149
- </p>
150
- </div>
151
- <div class="refsect1" lang="en">
152
- <a name="id2642404"></a><h2>Details</h2>
153
- <div class="refsect2" lang="en">
154
- <a name="id2642413"></a><h3>
155
- <a name="cairo-pattern-t"></a>cairo_pattern_t</h3>
156
- <a class="indexterm" name="id2642423"></a><pre class="programlisting">typedef struct _cairo_pattern cairo_pattern_t;
157
- </pre>
158
- <p>
159
- A <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> represents a source when drawing onto a
160
- surface. There are different subtypes of <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>,
161
- for different types of sources; for example,
162
- <a class="link" href="cairo-Patterns.html#cairo-pattern-create-rgb"><code class="function">cairo_pattern_create_rgb()</code></a> creates a pattern for a solid
163
- opaque color.
164
- </p>
165
- <p>
166
- Other than various cairo_pattern_create_<span class="emphasis"><em>type</em></span>()
167
- functions, some of the pattern types can be implicitly created
168
- using various cairo_set_source_<span class="emphasis"><em>type</em></span>() functions;
169
- for example <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgb"><code class="function">cairo_set_source_rgb()</code></a>.
170
- </p>
171
- <p>
172
- The type of a pattern can be queried with <a class="link" href="cairo-Patterns.html#cairo-pattern-get-type"><code class="function">cairo_pattern_get_type()</code></a>.
173
- </p>
174
- <p>
175
- Memory management of <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> is done with
176
- <a class="link" href="cairo-Patterns.html#cairo-pattern-reference"><code class="function">cairo_pattern_reference()</code></a> and <a class="link" href="cairo-Patterns.html#cairo-pattern-destroy"><code class="function">cairo_pattern_destroy()</code></a>.</p>
177
- <p>
178
-
179
- </p>
180
- </div>
181
- <hr>
182
- <div class="refsect2" lang="en">
183
- <a name="id2642526"></a><h3>
184
- <a name="cairo-pattern-add-color-stop-rgb"></a>cairo_pattern_add_color_stop_rgb ()</h3>
185
- <a class="indexterm" name="id2642539"></a><pre class="programlisting">void cairo_pattern_add_color_stop_rgb (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
186
- double offset,
187
- double red,
188
- double green,
189
- double blue);</pre>
190
- <p>
191
- Adds an opaque color stop to a gradient pattern. The offset
192
- specifies the location along the gradient's control vector. For
193
- example, a linear gradient's control vector is from (x0,y0) to
194
- (x1,y1) while a radial gradient's control vector is from any point
195
- on the start circle to the corresponding point on the end circle.
196
- </p>
197
- <p>
198
- The color is specified in the same way as in <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgb"><code class="function">cairo_set_source_rgb()</code></a>.
199
- </p>
200
- <p>
201
- If two (or more) stops are specified with identical offset values,
202
- they will be sorted according to the order in which the stops are
203
- added, (stops added earlier will compare less than stops added
204
- later). This can be useful for reliably making sharp color
205
- transitions instead of the typical blend.
206
- </p>
207
- <p>
208
- Note: If the pattern is not a gradient pattern, (eg. a linear or
209
- radial pattern), then the pattern will be put into an error status
210
- with a status of <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>.</p>
211
- <p>
212
-
213
- </p>
214
- <div class="variablelist"><table border="0">
215
- <col align="left" valign="top">
216
- <tbody>
217
- <tr>
218
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
219
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
220
- </td>
221
- </tr>
222
- <tr>
223
- <td><p><span class="term"><em class="parameter"><code>offset</code></em>&#160;:</span></p></td>
224
- <td> an offset in the range [0.0 .. 1.0]
225
- </td>
226
- </tr>
227
- <tr>
228
- <td><p><span class="term"><em class="parameter"><code>red</code></em>&#160;:</span></p></td>
229
- <td> red component of color
230
- </td>
231
- </tr>
232
- <tr>
233
- <td><p><span class="term"><em class="parameter"><code>green</code></em>&#160;:</span></p></td>
234
- <td> green component of color
235
- </td>
236
- </tr>
237
- <tr>
238
- <td><p><span class="term"><em class="parameter"><code>blue</code></em>&#160;:</span></p></td>
239
- <td> blue component of color
240
- </td>
241
- </tr>
242
- </tbody>
243
- </table></div>
244
- </div>
245
- <hr>
246
- <div class="refsect2" lang="en">
247
- <a name="id2642723"></a><h3>
248
- <a name="cairo-pattern-add-color-stop-rgba"></a>cairo_pattern_add_color_stop_rgba ()</h3>
249
- <a class="indexterm" name="id2642737"></a><pre class="programlisting">void cairo_pattern_add_color_stop_rgba (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
250
- double offset,
251
- double red,
252
- double green,
253
- double blue,
254
- double alpha);</pre>
255
- <p>
256
- Adds a translucent color stop to a gradient pattern. The offset
257
- specifies the location along the gradient's control vector. For
258
- example, a linear gradient's control vector is from (x0,y0) to
259
- (x1,y1) while a radial gradient's control vector is from any point
260
- on the start circle to the corresponding point on the end circle.
261
- </p>
262
- <p>
263
- The color is specified in the same way as in <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgba"><code class="function">cairo_set_source_rgba()</code></a>.
264
- </p>
265
- <p>
266
- If two (or more) stops are specified with identical offset values,
267
- they will be sorted according to the order in which the stops are
268
- added, (stops added earlier will compare less than stops added
269
- later). This can be useful for reliably making sharp color
270
- transitions instead of the typical blend.
271
- </p>
272
- <p>
273
- Note: If the pattern is not a gradient pattern, (eg. a linear or
274
- radial pattern), then the pattern will be put into an error status
275
- with a status of <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>.</p>
276
- <p>
277
-
278
- </p>
279
- <div class="variablelist"><table border="0">
280
- <col align="left" valign="top">
281
- <tbody>
282
- <tr>
283
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
284
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
285
- </td>
286
- </tr>
287
- <tr>
288
- <td><p><span class="term"><em class="parameter"><code>offset</code></em>&#160;:</span></p></td>
289
- <td> an offset in the range [0.0 .. 1.0]
290
- </td>
291
- </tr>
292
- <tr>
293
- <td><p><span class="term"><em class="parameter"><code>red</code></em>&#160;:</span></p></td>
294
- <td> red component of color
295
- </td>
296
- </tr>
297
- <tr>
298
- <td><p><span class="term"><em class="parameter"><code>green</code></em>&#160;:</span></p></td>
299
- <td> green component of color
300
- </td>
301
- </tr>
302
- <tr>
303
- <td><p><span class="term"><em class="parameter"><code>blue</code></em>&#160;:</span></p></td>
304
- <td> blue component of color
305
- </td>
306
- </tr>
307
- <tr>
308
- <td><p><span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></p></td>
309
- <td> alpha component of color
310
- </td>
311
- </tr>
312
- </tbody>
313
- </table></div>
314
- </div>
315
- <hr>
316
- <div class="refsect2" lang="en">
317
- <a name="id2642943"></a><h3>
318
- <a name="cairo-pattern-get-color-stop-count"></a>cairo_pattern_get_color_stop_count ()</h3>
319
- <a class="indexterm" name="id2642959"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_color_stop_count (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
320
- int *count);</pre>
321
- <p>
322
- Gets the number of color stops specified in the given gradient
323
- pattern.</p>
324
- <p>
325
-
326
- </p>
327
- <div class="variablelist"><table border="0">
328
- <col align="left" valign="top">
329
- <tbody>
330
- <tr>
331
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
332
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
333
- </td>
334
- </tr>
335
- <tr>
336
- <td><p><span class="term"><em class="parameter"><code>count</code></em>&#160;:</span></p></td>
337
- <td> return value for the number of color stops, or <code class="literal">NULL</code>
338
- </td>
339
- </tr>
340
- <tr>
341
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
342
- <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or
343
- <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if <em class="parameter"><code>pattern</code></em> is not a gradient
344
- pattern.
345
-
346
- </td>
347
- </tr>
348
- </tbody>
349
- </table></div>
350
- <p class="since">Since 1.4
351
- </p>
352
- </div>
353
- <hr>
354
- <div class="refsect2" lang="en">
355
- <a name="id2643092"></a><h3>
356
- <a name="cairo-pattern-get-color-stop-rgba"></a>cairo_pattern_get_color_stop_rgba ()</h3>
357
- <a class="indexterm" name="id2643108"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_color_stop_rgba (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
358
- int index,
359
- double *offset,
360
- double *red,
361
- double *green,
362
- double *blue,
363
- double *alpha);</pre>
364
- <p>
365
- Gets the color and offset information at the given <em class="parameter"><code>index</code></em> for a
366
- gradient pattern. Values of <em class="parameter"><code>index</code></em> are 0 to 1 less than the number
367
- returned by <a class="link" href="cairo-Patterns.html#cairo-pattern-get-color-stop-count"><code class="function">cairo_pattern_get_color_stop_count()</code></a>.</p>
368
- <p>
369
-
370
- </p>
371
- <div class="variablelist"><table border="0">
372
- <col align="left" valign="top">
373
- <tbody>
374
- <tr>
375
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
376
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
377
- </td>
378
- </tr>
379
- <tr>
380
- <td><p><span class="term"><em class="parameter"><code>index</code></em>&#160;:</span></p></td>
381
- <td> index of the stop to return data for
382
- </td>
383
- </tr>
384
- <tr>
385
- <td><p><span class="term"><em class="parameter"><code>offset</code></em>&#160;:</span></p></td>
386
- <td> return value for the offset of the stop, or <code class="literal">NULL</code>
387
- </td>
388
- </tr>
389
- <tr>
390
- <td><p><span class="term"><em class="parameter"><code>red</code></em>&#160;:</span></p></td>
391
- <td> return value for red component of color, or <code class="literal">NULL</code>
392
- </td>
393
- </tr>
394
- <tr>
395
- <td><p><span class="term"><em class="parameter"><code>green</code></em>&#160;:</span></p></td>
396
- <td> return value for green component of color, or <code class="literal">NULL</code>
397
- </td>
398
- </tr>
399
- <tr>
400
- <td><p><span class="term"><em class="parameter"><code>blue</code></em>&#160;:</span></p></td>
401
- <td> return value for blue component of color, or <code class="literal">NULL</code>
402
- </td>
403
- </tr>
404
- <tr>
405
- <td><p><span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></p></td>
406
- <td> return value for alpha component of color, or <code class="literal">NULL</code>
407
- </td>
408
- </tr>
409
- <tr>
410
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
411
- <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a>
412
- if <em class="parameter"><code>index</code></em> is not valid for the given pattern. If the pattern is
413
- not a gradient pattern, <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> is
414
- returned.
415
-
416
- </td>
417
- </tr>
418
- </tbody>
419
- </table></div>
420
- <p class="since">Since 1.4
421
- </p>
422
- </div>
423
- <hr>
424
- <div class="refsect2" lang="en">
425
- <a name="id2643421"></a><h3>
426
- <a name="cairo-pattern-create-rgb"></a>cairo_pattern_create_rgb ()</h3>
427
- <a class="indexterm" name="id2643432"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_rgb (double red,
428
- double green,
429
- double blue);</pre>
430
- <p>
431
- Creates a new <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> corresponding to an opaque color. The
432
- color components are floating point numbers in the range 0 to 1.
433
- If the values passed in are outside that range, they will be
434
- clamped.</p>
435
- <p>
436
-
437
- </p>
438
- <div class="variablelist"><table border="0">
439
- <col align="left" valign="top">
440
- <tbody>
441
- <tr>
442
- <td><p><span class="term"><em class="parameter"><code>red</code></em>&#160;:</span></p></td>
443
- <td> red component of the color
444
- </td>
445
- </tr>
446
- <tr>
447
- <td><p><span class="term"><em class="parameter"><code>green</code></em>&#160;:</span></p></td>
448
- <td> green component of the color
449
- </td>
450
- </tr>
451
- <tr>
452
- <td><p><span class="term"><em class="parameter"><code>blue</code></em>&#160;:</span></p></td>
453
- <td> blue component of the color
454
- </td>
455
- </tr>
456
- <tr>
457
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
458
- <td> the newly created <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> if successful, or
459
- an error pattern in case of no memory. The caller owns the
460
- returned object and should call <a class="link" href="cairo-Patterns.html#cairo-pattern-destroy"><code class="function">cairo_pattern_destroy()</code></a> when
461
- finished with it.
462
-
463
- This function will always return a valid pointer, but if an error
464
- occurred the pattern status will be set to an error. To inspect
465
- the status of a pattern use <a class="link" href="cairo-Patterns.html#cairo-pattern-status"><code class="function">cairo_pattern_status()</code></a>.
466
- </td>
467
- </tr>
468
- </tbody>
469
- </table></div>
470
- </div>
471
- <hr>
472
- <div class="refsect2" lang="en">
473
- <a name="id2643576"></a><h3>
474
- <a name="cairo-pattern-create-rgba"></a>cairo_pattern_create_rgba ()</h3>
475
- <a class="indexterm" name="id2643588"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_rgba (double red,
476
- double green,
477
- double blue,
478
- double alpha);</pre>
479
- <p>
480
- Creates a new <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> corresponding to a translucent color.
481
- The color components are floating point numbers in the range 0 to
482
- 1. If the values passed in are outside that range, they will be
483
- clamped.</p>
484
- <p>
485
-
486
- </p>
487
- <div class="variablelist"><table border="0">
488
- <col align="left" valign="top">
489
- <tbody>
490
- <tr>
491
- <td><p><span class="term"><em class="parameter"><code>red</code></em>&#160;:</span></p></td>
492
- <td> red component of the color
493
- </td>
494
- </tr>
495
- <tr>
496
- <td><p><span class="term"><em class="parameter"><code>green</code></em>&#160;:</span></p></td>
497
- <td> green component of the color
498
- </td>
499
- </tr>
500
- <tr>
501
- <td><p><span class="term"><em class="parameter"><code>blue</code></em>&#160;:</span></p></td>
502
- <td> blue component of the color
503
- </td>
504
- </tr>
505
- <tr>
506
- <td><p><span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></p></td>
507
- <td> alpha component of the color
508
- </td>
509
- </tr>
510
- <tr>
511
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
512
- <td> the newly created <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> if successful, or
513
- an error pattern in case of no memory. The caller owns the
514
- returned object and should call <a class="link" href="cairo-Patterns.html#cairo-pattern-destroy"><code class="function">cairo_pattern_destroy()</code></a> when
515
- finished with it.
516
-
517
- This function will always return a valid pointer, but if an error
518
- occurred the pattern status will be set to an error. To inspect
519
- the status of a pattern use <a class="link" href="cairo-Patterns.html#cairo-pattern-status"><code class="function">cairo_pattern_status()</code></a>.
520
- </td>
521
- </tr>
522
- </tbody>
523
- </table></div>
524
- </div>
525
- <hr>
526
- <div class="refsect2" lang="en">
527
- <a name="id2643733"></a><h3>
528
- <a name="cairo-pattern-get-rgba"></a>cairo_pattern_get_rgba ()</h3>
529
- <a class="indexterm" name="id2643746"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_rgba (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
530
- double *red,
531
- double *green,
532
- double *blue,
533
- double *alpha);</pre>
534
- <p>
535
- Gets the solid color for a solid color pattern.</p>
536
- <p>
537
-
538
- </p>
539
- <div class="variablelist"><table border="0">
540
- <col align="left" valign="top">
541
- <tbody>
542
- <tr>
543
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
544
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
545
- </td>
546
- </tr>
547
- <tr>
548
- <td><p><span class="term"><em class="parameter"><code>red</code></em>&#160;:</span></p></td>
549
- <td> return value for red component of color, or <code class="literal">NULL</code>
550
- </td>
551
- </tr>
552
- <tr>
553
- <td><p><span class="term"><em class="parameter"><code>green</code></em>&#160;:</span></p></td>
554
- <td> return value for green component of color, or <code class="literal">NULL</code>
555
- </td>
556
- </tr>
557
- <tr>
558
- <td><p><span class="term"><em class="parameter"><code>blue</code></em>&#160;:</span></p></td>
559
- <td> return value for blue component of color, or <code class="literal">NULL</code>
560
- </td>
561
- </tr>
562
- <tr>
563
- <td><p><span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></p></td>
564
- <td> return value for alpha component of color, or <code class="literal">NULL</code>
565
- </td>
566
- </tr>
567
- <tr>
568
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
569
- <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or
570
- <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if the pattern is not a solid
571
- color pattern.
572
-
573
- </td>
574
- </tr>
575
- </tbody>
576
- </table></div>
577
- <p class="since">Since 1.4
578
- </p>
579
- </div>
580
- <hr>
581
- <div class="refsect2" lang="en">
582
- <a name="id2643944"></a><h3>
583
- <a name="cairo-pattern-create-for-surface"></a>cairo_pattern_create_for_surface ()</h3>
584
- <a class="indexterm" name="id2643957"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_for_surface (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre>
585
- <p>
586
- Create a new <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> for the given surface.</p>
587
- <p>
588
-
589
- </p>
590
- <div class="variablelist"><table border="0">
591
- <col align="left" valign="top">
592
- <tbody>
593
- <tr>
594
- <td><p><span class="term"><em class="parameter"><code>surface</code></em>&#160;:</span></p></td>
595
- <td> the surface
596
- </td>
597
- </tr>
598
- <tr>
599
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
600
- <td> the newly created <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> if successful, or
601
- an error pattern in case of no memory. The caller owns the
602
- returned object and should call <a class="link" href="cairo-Patterns.html#cairo-pattern-destroy"><code class="function">cairo_pattern_destroy()</code></a> when
603
- finished with it.
604
-
605
- This function will always return a valid pointer, but if an error
606
- occurred the pattern status will be set to an error. To inspect
607
- the status of a pattern use <a class="link" href="cairo-Patterns.html#cairo-pattern-status"><code class="function">cairo_pattern_status()</code></a>.
608
- </td>
609
- </tr>
610
- </tbody>
611
- </table></div>
612
- </div>
613
- <hr>
614
- <div class="refsect2" lang="en">
615
- <a name="id2644045"></a><h3>
616
- <a name="cairo-pattern-get-surface"></a>cairo_pattern_get_surface ()</h3>
617
- <a class="indexterm" name="id2644058"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_surface (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
618
- <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> **surface);</pre>
619
- <p>
620
- Gets the surface of a surface pattern. The reference returned in
621
- <em class="parameter"><code>surface</code></em> is owned by the pattern; the caller should call
622
- <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference"><code class="function">cairo_surface_reference()</code></a> if the surface is to be retained.</p>
623
- <p>
624
-
625
- </p>
626
- <div class="variablelist"><table border="0">
627
- <col align="left" valign="top">
628
- <tbody>
629
- <tr>
630
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
631
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
632
- </td>
633
- </tr>
634
- <tr>
635
- <td><p><span class="term"><em class="parameter"><code>surface</code></em>&#160;:</span></p></td>
636
- <td> return value for surface of pattern, or <code class="literal">NULL</code>
637
- </td>
638
- </tr>
639
- <tr>
640
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
641
- <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or
642
- <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if the pattern is not a surface
643
- pattern.
644
-
645
- </td>
646
- </tr>
647
- </tbody>
648
- </table></div>
649
- <p class="since">Since 1.4
650
- </p>
651
- </div>
652
- <hr>
653
- <div class="refsect2" lang="en">
654
- <a name="id2644187"></a><h3>
655
- <a name="cairo-pattern-create-linear"></a>cairo_pattern_create_linear ()</h3>
656
- <a class="indexterm" name="id2644198"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_linear (double x0,
657
- double y0,
658
- double x1,
659
- double y1);</pre>
660
- <p>
661
- Create a new linear gradient <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> along the line defined
662
- by (x0, y0) and (x1, y1). Before using the gradient pattern, a
663
- number of color stops should be defined using
664
- <a class="link" href="cairo-Patterns.html#cairo-pattern-add-color-stop-rgb"><code class="function">cairo_pattern_add_color_stop_rgb()</code></a> or
665
- <a class="link" href="cairo-Patterns.html#cairo-pattern-add-color-stop-rgba"><code class="function">cairo_pattern_add_color_stop_rgba()</code></a>.
666
- </p>
667
- <p>
668
- Note: The coordinates here are in pattern space. For a new pattern,
669
- pattern space is identical to user space, but the relationship
670
- between the spaces can be changed with <a class="link" href="cairo-Patterns.html#cairo-pattern-set-matrix"><code class="function">cairo_pattern_set_matrix()</code></a>.</p>
671
- <p>
672
-
673
- </p>
674
- <div class="variablelist"><table border="0">
675
- <col align="left" valign="top">
676
- <tbody>
677
- <tr>
678
- <td><p><span class="term"><em class="parameter"><code>x0</code></em>&#160;:</span></p></td>
679
- <td> x coordinate of the start point
680
- </td>
681
- </tr>
682
- <tr>
683
- <td><p><span class="term"><em class="parameter"><code>y0</code></em>&#160;:</span></p></td>
684
- <td> y coordinate of the start point
685
- </td>
686
- </tr>
687
- <tr>
688
- <td><p><span class="term"><em class="parameter"><code>x1</code></em>&#160;:</span></p></td>
689
- <td> x coordinate of the end point
690
- </td>
691
- </tr>
692
- <tr>
693
- <td><p><span class="term"><em class="parameter"><code>y1</code></em>&#160;:</span></p></td>
694
- <td> y coordinate of the end point
695
- </td>
696
- </tr>
697
- <tr>
698
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
699
- <td> the newly created <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> if successful, or
700
- an error pattern in case of no memory. The caller owns the
701
- returned object and should call <a class="link" href="cairo-Patterns.html#cairo-pattern-destroy"><code class="function">cairo_pattern_destroy()</code></a> when
702
- finished with it.
703
-
704
- This function will always return a valid pointer, but if an error
705
- occurred the pattern status will be set to an error. To inspect
706
- the status of a pattern use <a class="link" href="cairo-Patterns.html#cairo-pattern-status"><code class="function">cairo_pattern_status()</code></a>.
707
- </td>
708
- </tr>
709
- </tbody>
710
- </table></div>
711
- </div>
712
- <hr>
713
- <div class="refsect2" lang="en">
714
- <a name="id2644382"></a><h3>
715
- <a name="cairo-pattern-get-linear-points"></a>cairo_pattern_get_linear_points ()</h3>
716
- <a class="indexterm" name="id2644397"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_linear_points (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
717
- double *x0,
718
- double *y0,
719
- double *x1,
720
- double *y1);</pre>
721
- <p>
722
- Gets the gradient endpoints for a linear gradient.</p>
723
- <p>
724
-
725
- </p>
726
- <div class="variablelist"><table border="0">
727
- <col align="left" valign="top">
728
- <tbody>
729
- <tr>
730
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
731
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
732
- </td>
733
- </tr>
734
- <tr>
735
- <td><p><span class="term"><em class="parameter"><code>x0</code></em>&#160;:</span></p></td>
736
- <td> return value for the x coordinate of the first point, or <code class="literal">NULL</code>
737
- </td>
738
- </tr>
739
- <tr>
740
- <td><p><span class="term"><em class="parameter"><code>y0</code></em>&#160;:</span></p></td>
741
- <td> return value for the y coordinate of the first point, or <code class="literal">NULL</code>
742
- </td>
743
- </tr>
744
- <tr>
745
- <td><p><span class="term"><em class="parameter"><code>x1</code></em>&#160;:</span></p></td>
746
- <td> return value for the x coordinate of the second point, or <code class="literal">NULL</code>
747
- </td>
748
- </tr>
749
- <tr>
750
- <td><p><span class="term"><em class="parameter"><code>y1</code></em>&#160;:</span></p></td>
751
- <td> return value for the y coordinate of the second point, or <code class="literal">NULL</code>
752
- </td>
753
- </tr>
754
- <tr>
755
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
756
- <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or
757
- <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if <em class="parameter"><code>pattern</code></em> is not a linear
758
- gradient pattern.
759
-
760
- </td>
761
- </tr>
762
- </tbody>
763
- </table></div>
764
- <p class="since">Since 1.4
765
- </p>
766
- </div>
767
- <hr>
768
- <div class="refsect2" lang="en">
769
- <a name="id2644602"></a><h3>
770
- <a name="cairo-pattern-create-radial"></a>cairo_pattern_create_radial ()</h3>
771
- <a class="indexterm" name="id2644613"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_radial (double cx0,
772
- double cy0,
773
- double radius0,
774
- double cx1,
775
- double cy1,
776
- double radius1);</pre>
777
- <p>
778
- Creates a new radial gradient <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> between the two
779
- circles defined by (cx0, cy0, radius0) and (cx1, cy1, radius1). Before using the
780
- gradient pattern, a number of color stops should be defined using
781
- <a class="link" href="cairo-Patterns.html#cairo-pattern-add-color-stop-rgb"><code class="function">cairo_pattern_add_color_stop_rgb()</code></a> or
782
- <a class="link" href="cairo-Patterns.html#cairo-pattern-add-color-stop-rgba"><code class="function">cairo_pattern_add_color_stop_rgba()</code></a>.
783
- </p>
784
- <p>
785
- Note: The coordinates here are in pattern space. For a new pattern,
786
- pattern space is identical to user space, but the relationship
787
- between the spaces can be changed with <a class="link" href="cairo-Patterns.html#cairo-pattern-set-matrix"><code class="function">cairo_pattern_set_matrix()</code></a>.</p>
788
- <p>
789
-
790
- </p>
791
- <div class="variablelist"><table border="0">
792
- <col align="left" valign="top">
793
- <tbody>
794
- <tr>
795
- <td><p><span class="term"><em class="parameter"><code>cx0</code></em>&#160;:</span></p></td>
796
- <td> x coordinate for the center of the start circle
797
- </td>
798
- </tr>
799
- <tr>
800
- <td><p><span class="term"><em class="parameter"><code>cy0</code></em>&#160;:</span></p></td>
801
- <td> y coordinate for the center of the start circle
802
- </td>
803
- </tr>
804
- <tr>
805
- <td><p><span class="term"><em class="parameter"><code>radius0</code></em>&#160;:</span></p></td>
806
- <td> radius of the start circle
807
- </td>
808
- </tr>
809
- <tr>
810
- <td><p><span class="term"><em class="parameter"><code>cx1</code></em>&#160;:</span></p></td>
811
- <td> x coordinate for the center of the end circle
812
- </td>
813
- </tr>
814
- <tr>
815
- <td><p><span class="term"><em class="parameter"><code>cy1</code></em>&#160;:</span></p></td>
816
- <td> y coordinate for the center of the end circle
817
- </td>
818
- </tr>
819
- <tr>
820
- <td><p><span class="term"><em class="parameter"><code>radius1</code></em>&#160;:</span></p></td>
821
- <td> radius of the end circle
822
- </td>
823
- </tr>
824
- <tr>
825
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
826
- <td> the newly created <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> if successful, or
827
- an error pattern in case of no memory. The caller owns the
828
- returned object and should call <a class="link" href="cairo-Patterns.html#cairo-pattern-destroy"><code class="function">cairo_pattern_destroy()</code></a> when
829
- finished with it.
830
-
831
- This function will always return a valid pointer, but if an error
832
- occurred the pattern status will be set to an error. To inspect
833
- the status of a pattern use <a class="link" href="cairo-Patterns.html#cairo-pattern-status"><code class="function">cairo_pattern_status()</code></a>.
834
- </td>
835
- </tr>
836
- </tbody>
837
- </table></div>
838
- </div>
839
- <hr>
840
- <div class="refsect2" lang="en">
841
- <a name="id2644838"></a><h3>
842
- <a name="cairo-pattern-get-radial-circles"></a>cairo_pattern_get_radial_circles ()</h3>
843
- <a class="indexterm" name="id2644852"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_radial_circles (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
844
- double *x0,
845
- double *y0,
846
- double *r0,
847
- double *x1,
848
- double *y1,
849
- double *r1);</pre>
850
- <p>
851
- Gets the gradient endpoint circles for a radial gradient, each
852
- specified as a center coordinate and a radius.</p>
853
- <p>
854
-
855
- </p>
856
- <div class="variablelist"><table border="0">
857
- <col align="left" valign="top">
858
- <tbody>
859
- <tr>
860
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
861
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
862
- </td>
863
- </tr>
864
- <tr>
865
- <td><p><span class="term"><em class="parameter"><code>x0</code></em>&#160;:</span></p></td>
866
- <td> return value for the x coordinate of the center of the first circle, or <code class="literal">NULL</code>
867
- </td>
868
- </tr>
869
- <tr>
870
- <td><p><span class="term"><em class="parameter"><code>y0</code></em>&#160;:</span></p></td>
871
- <td> return value for the y coordinate of the center of the first circle, or <code class="literal">NULL</code>
872
- </td>
873
- </tr>
874
- <tr>
875
- <td><p><span class="term"><em class="parameter"><code>r0</code></em>&#160;:</span></p></td>
876
- <td> return value for the radius of the first circle, or <code class="literal">NULL</code>
877
- </td>
878
- </tr>
879
- <tr>
880
- <td><p><span class="term"><em class="parameter"><code>x1</code></em>&#160;:</span></p></td>
881
- <td> return value for the x coordinate of the center of the second circle, or <code class="literal">NULL</code>
882
- </td>
883
- </tr>
884
- <tr>
885
- <td><p><span class="term"><em class="parameter"><code>y1</code></em>&#160;:</span></p></td>
886
- <td> return value for the y coordinate of the center of the second circle, or <code class="literal">NULL</code>
887
- </td>
888
- </tr>
889
- <tr>
890
- <td><p><span class="term"><em class="parameter"><code>r1</code></em>&#160;:</span></p></td>
891
- <td> return value for the radius of the second circle, or <code class="literal">NULL</code>
892
- </td>
893
- </tr>
894
- <tr>
895
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
896
- <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or
897
- <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if <em class="parameter"><code>pattern</code></em> is not a radial
898
- gradient pattern.
899
-
900
- </td>
901
- </tr>
902
- </tbody>
903
- </table></div>
904
- <p class="since">Since 1.4
905
- </p>
906
- </div>
907
- <hr>
908
- <div class="refsect2" lang="en">
909
- <a name="id2645116"></a><h3>
910
- <a name="cairo-pattern-reference"></a>cairo_pattern_reference ()</h3>
911
- <a class="indexterm" name="id2645126"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_reference (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre>
912
- <p>
913
- Increases the reference count on <em class="parameter"><code>pattern</code></em> by one. This prevents
914
- <em class="parameter"><code>pattern</code></em> from being destroyed until a matching call to
915
- <a class="link" href="cairo-Patterns.html#cairo-pattern-destroy"><code class="function">cairo_pattern_destroy()</code></a> is made.
916
- </p>
917
- <p>
918
- The number of references to a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> can be get using
919
- <a class="link" href="cairo-Patterns.html#cairo-pattern-get-reference-count"><code class="function">cairo_pattern_get_reference_count()</code></a>.</p>
920
- <p>
921
-
922
- </p>
923
- <div class="variablelist"><table border="0">
924
- <col align="left" valign="top">
925
- <tbody>
926
- <tr>
927
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
928
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
929
- </td>
930
- </tr>
931
- <tr>
932
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
933
- <td> the referenced <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>.
934
- </td>
935
- </tr>
936
- </tbody>
937
- </table></div>
938
- </div>
939
- <hr>
940
- <div class="refsect2" lang="en">
941
- <a name="id2645232"></a><h3>
942
- <a name="cairo-pattern-destroy"></a>cairo_pattern_destroy ()</h3>
943
- <a class="indexterm" name="id2645243"></a><pre class="programlisting">void cairo_pattern_destroy (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre>
944
- <p>
945
- Decreases the reference count on <em class="parameter"><code>pattern</code></em> by one. If the result is
946
- zero, then <em class="parameter"><code>pattern</code></em> and all associated resources are freed. See
947
- <a class="link" href="cairo-Patterns.html#cairo-pattern-reference"><code class="function">cairo_pattern_reference()</code></a>.</p>
948
- <p>
949
-
950
- </p>
951
- <div class="variablelist"><table border="0">
952
- <col align="left" valign="top">
953
- <tbody><tr>
954
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
955
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
956
- </td>
957
- </tr></tbody>
958
- </table></div>
959
- </div>
960
- <hr>
961
- <div class="refsect2" lang="en">
962
- <a name="id2645314"></a><h3>
963
- <a name="cairo-pattern-status"></a>cairo_pattern_status ()</h3>
964
- <a class="indexterm" name="id2645324"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_status (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre>
965
- <p>
966
- Checks whether an error has previously occurred for this
967
- pattern.</p>
968
- <p>
969
-
970
- </p>
971
- <div class="variablelist"><table border="0">
972
- <col align="left" valign="top">
973
- <tbody>
974
- <tr>
975
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
976
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
977
- </td>
978
- </tr>
979
- <tr>
980
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
981
- <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>, or
982
- <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>.
983
- </td>
984
- </tr>
985
- </tbody>
986
- </table></div>
987
- </div>
988
- <hr>
989
- <div class="refsect2" lang="en">
990
- <a name="id2645411"></a><h3>
991
- <a name="cairo-extend-t"></a>enum cairo_extend_t</h3>
992
- <a class="indexterm" name="id2645422"></a><pre class="programlisting">typedef enum _cairo_extend {
993
- CAIRO_EXTEND_NONE,
994
- CAIRO_EXTEND_REPEAT,
995
- CAIRO_EXTEND_REFLECT,
996
- CAIRO_EXTEND_PAD
997
- } cairo_extend_t;
998
- </pre>
999
- <p>
1000
- <a class="link" href="cairo-Patterns.html#cairo-extend-t"><span class="type">cairo_extend_t</span></a> is used to describe how pattern color/alpha will be
1001
- determined for areas "outside" the pattern's natural area, (for
1002
- example, outside the surface bounds or outside the gradient
1003
- geometry).
1004
- </p>
1005
- <p>
1006
- The default extend mode is <a class="link" href="cairo-Patterns.html#CAIRO-EXTEND-NONE:CAPS"><code class="literal">CAIRO_EXTEND_NONE</code></a> for surface patterns
1007
- and <a class="link" href="cairo-Patterns.html#CAIRO-EXTEND-PAD:CAPS"><code class="literal">CAIRO_EXTEND_PAD</code></a> for gradient patterns.
1008
- </p>
1009
- <p>
1010
- New entries may be added in future versions.</p>
1011
- <p>
1012
-
1013
- </p>
1014
- <div class="variablelist"><table border="0">
1015
- <col align="left" valign="top">
1016
- <tbody>
1017
- <tr>
1018
- <td><p><span class="term"><a name="CAIRO-EXTEND-NONE:CAPS"></a><code class="literal">CAIRO_EXTEND_NONE</code></span></p></td>
1019
- <td> pixels outside of the source pattern
1020
- are fully transparent
1021
- </td>
1022
- </tr>
1023
- <tr>
1024
- <td><p><span class="term"><a name="CAIRO-EXTEND-REPEAT:CAPS"></a><code class="literal">CAIRO_EXTEND_REPEAT</code></span></p></td>
1025
- <td> the pattern is tiled by repeating
1026
- </td>
1027
- </tr>
1028
- <tr>
1029
- <td><p><span class="term"><a name="CAIRO-EXTEND-REFLECT:CAPS"></a><code class="literal">CAIRO_EXTEND_REFLECT</code></span></p></td>
1030
- <td> the pattern is tiled by reflecting
1031
- at the edges (Implemented for surface patterns since 1.6)
1032
- </td>
1033
- </tr>
1034
- <tr>
1035
- <td><p><span class="term"><a name="CAIRO-EXTEND-PAD:CAPS"></a><code class="literal">CAIRO_EXTEND_PAD</code></span></p></td>
1036
- <td> pixels outside of the pattern copy
1037
- the closest pixel from the source (Since 1.2; but only
1038
- implemented for surface patterns since 1.6)
1039
- </td>
1040
- </tr>
1041
- </tbody>
1042
- </table></div>
1043
- </div>
1044
- <hr>
1045
- <div class="refsect2" lang="en">
1046
- <a name="id2645561"></a><h3>
1047
- <a name="cairo-pattern-set-extend"></a>cairo_pattern_set_extend ()</h3>
1048
- <a class="indexterm" name="id2645571"></a><pre class="programlisting">void cairo_pattern_set_extend (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
1049
- <a class="link" href="cairo-Patterns.html#cairo-extend-t">cairo_extend_t</a> extend);</pre>
1050
- <p>
1051
- Sets the mode to be used for drawing outside the area of a pattern.
1052
- See <a class="link" href="cairo-Patterns.html#cairo-extend-t"><span class="type">cairo_extend_t</span></a> for details on the semantics of each extend
1053
- strategy.
1054
- </p>
1055
- <p>
1056
- The default extend mode is <a class="link" href="cairo-Patterns.html#CAIRO-EXTEND-NONE:CAPS"><code class="literal">CAIRO_EXTEND_NONE</code></a> for surface patterns
1057
- and <a class="link" href="cairo-Patterns.html#CAIRO-EXTEND-PAD:CAPS"><code class="literal">CAIRO_EXTEND_PAD</code></a> for gradient patterns.</p>
1058
- <p>
1059
-
1060
- </p>
1061
- <div class="variablelist"><table border="0">
1062
- <col align="left" valign="top">
1063
- <tbody>
1064
- <tr>
1065
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
1066
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1067
- </td>
1068
- </tr>
1069
- <tr>
1070
- <td><p><span class="term"><em class="parameter"><code>extend</code></em>&#160;:</span></p></td>
1071
- <td> a <a class="link" href="cairo-Patterns.html#cairo-extend-t"><span class="type">cairo_extend_t</span></a> describing how the area outside of the
1072
- pattern will be drawn
1073
- </td>
1074
- </tr>
1075
- </tbody>
1076
- </table></div>
1077
- </div>
1078
- <hr>
1079
- <div class="refsect2" lang="en">
1080
- <a name="id2645677"></a><h3>
1081
- <a name="cairo-pattern-get-extend"></a>cairo_pattern_get_extend ()</h3>
1082
- <a class="indexterm" name="id2645687"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-extend-t">cairo_extend_t</a> cairo_pattern_get_extend (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre>
1083
- <p>
1084
- Gets the current extend mode for a pattern. See <a class="link" href="cairo-Patterns.html#cairo-extend-t"><span class="type">cairo_extend_t</span></a>
1085
- for details on the semantics of each extend strategy.</p>
1086
- <p>
1087
-
1088
- </p>
1089
- <div class="variablelist"><table border="0">
1090
- <col align="left" valign="top">
1091
- <tbody>
1092
- <tr>
1093
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
1094
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1095
- </td>
1096
- </tr>
1097
- <tr>
1098
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1099
- <td> the current extend strategy used for drawing the
1100
- pattern.
1101
- </td>
1102
- </tr>
1103
- </tbody>
1104
- </table></div>
1105
- </div>
1106
- <hr>
1107
- <div class="refsect2" lang="en">
1108
- <a name="id2645756"></a><h3>
1109
- <a name="cairo-filter-t"></a>enum cairo_filter_t</h3>
1110
- <a class="indexterm" name="id2645767"></a><pre class="programlisting">typedef enum _cairo_filter {
1111
- CAIRO_FILTER_FAST,
1112
- CAIRO_FILTER_GOOD,
1113
- CAIRO_FILTER_BEST,
1114
- CAIRO_FILTER_NEAREST,
1115
- CAIRO_FILTER_BILINEAR,
1116
- CAIRO_FILTER_GAUSSIAN
1117
- } cairo_filter_t;
1118
- </pre>
1119
- <p>
1120
- <a class="link" href="cairo-Patterns.html#cairo-filter-t"><span class="type">cairo_filter_t</span></a> is used to indicate what filtering should be
1121
- applied when reading pixel values from patterns. See
1122
- <code class="function">cairo_pattern_set_source()</code> for indicating the desired filter to be
1123
- used with a particular pattern.</p>
1124
- <p>
1125
-
1126
- </p>
1127
- <div class="variablelist"><table border="0">
1128
- <col align="left" valign="top">
1129
- <tbody>
1130
- <tr>
1131
- <td><p><span class="term"><a name="CAIRO-FILTER-FAST:CAPS"></a><code class="literal">CAIRO_FILTER_FAST</code></span></p></td>
1132
- <td> A high-performance filter, with quality similar
1133
- to <a class="link" href="cairo-Patterns.html#CAIRO-FILTER-NEAREST:CAPS"><code class="literal">CAIRO_FILTER_NEAREST</code></a>
1134
- </td>
1135
- </tr>
1136
- <tr>
1137
- <td><p><span class="term"><a name="CAIRO-FILTER-GOOD:CAPS"></a><code class="literal">CAIRO_FILTER_GOOD</code></span></p></td>
1138
- <td> A reasonable-performance filter, with quality
1139
- similar to <a class="link" href="cairo-Patterns.html#CAIRO-FILTER-BILINEAR:CAPS"><code class="literal">CAIRO_FILTER_BILINEAR</code></a>
1140
- </td>
1141
- </tr>
1142
- <tr>
1143
- <td><p><span class="term"><a name="CAIRO-FILTER-BEST:CAPS"></a><code class="literal">CAIRO_FILTER_BEST</code></span></p></td>
1144
- <td> The highest-quality available, performance may
1145
- not be suitable for interactive use.
1146
- </td>
1147
- </tr>
1148
- <tr>
1149
- <td><p><span class="term"><a name="CAIRO-FILTER-NEAREST:CAPS"></a><code class="literal">CAIRO_FILTER_NEAREST</code></span></p></td>
1150
- <td> Nearest-neighbor filtering
1151
- </td>
1152
- </tr>
1153
- <tr>
1154
- <td><p><span class="term"><a name="CAIRO-FILTER-BILINEAR:CAPS"></a><code class="literal">CAIRO_FILTER_BILINEAR</code></span></p></td>
1155
- <td> Linear interpolation in two dimensions
1156
- </td>
1157
- </tr>
1158
- <tr>
1159
- <td><p><span class="term"><a name="CAIRO-FILTER-GAUSSIAN:CAPS"></a><code class="literal">CAIRO_FILTER_GAUSSIAN</code></span></p></td>
1160
- <td> This filter value is currently
1161
- unimplemented, and should not be used in current code.
1162
- </td>
1163
- </tr>
1164
- </tbody>
1165
- </table></div>
1166
- </div>
1167
- <hr>
1168
- <div class="refsect2" lang="en">
1169
- <a name="id2645945"></a><h3>
1170
- <a name="cairo-pattern-set-filter"></a>cairo_pattern_set_filter ()</h3>
1171
- <a class="indexterm" name="id2645955"></a><pre class="programlisting">void cairo_pattern_set_filter (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
1172
- <a class="link" href="cairo-Patterns.html#cairo-filter-t">cairo_filter_t</a> filter);</pre>
1173
- <p>
1174
- Sets the filter to be used for resizing when using this pattern.
1175
- See <a class="link" href="cairo-Patterns.html#cairo-filter-t"><span class="type">cairo_filter_t</span></a> for details on each filter.
1176
- </p>
1177
- <p>
1178
- * Note that you might want to control filtering even when you do not
1179
- have an explicit <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> object, (for example when using
1180
- <a class="link" href="cairo-cairo-t.html#cairo-set-source-surface"><code class="function">cairo_set_source_surface()</code></a>). In these cases, it is convenient to
1181
- use <a class="link" href="cairo-cairo-t.html#cairo-get-source"><code class="function">cairo_get_source()</code></a> to get access to the pattern that cairo
1182
- creates implicitly. For example:
1183
- </p>
1184
- <p>
1185
- </p>
1186
- <div class="informalexample"><pre class="programlisting">
1187
- cairo_set_source_surface (cr, image, x, y);
1188
- cairo_pattern_set_filter (cairo_get_source (cr), %CAIRO_FILTER_NEAREST);
1189
- </pre></div>
1190
- <p>
1191
-
1192
- </p>
1193
- <div class="variablelist"><table border="0">
1194
- <col align="left" valign="top">
1195
- <tbody>
1196
- <tr>
1197
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
1198
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1199
- </td>
1200
- </tr>
1201
- <tr>
1202
- <td><p><span class="term"><em class="parameter"><code>filter</code></em>&#160;:</span></p></td>
1203
- <td> a <a class="link" href="cairo-Patterns.html#cairo-filter-t"><span class="type">cairo_filter_t</span></a> describing the filter to use for resizing
1204
- the pattern
1205
- </td>
1206
- </tr>
1207
- </tbody>
1208
- </table></div>
1209
- </div>
1210
- <hr>
1211
- <div class="refsect2" lang="en">
1212
- <a name="id2646081"></a><h3>
1213
- <a name="cairo-pattern-get-filter"></a>cairo_pattern_get_filter ()</h3>
1214
- <a class="indexterm" name="id2646092"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-filter-t">cairo_filter_t</a> cairo_pattern_get_filter (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre>
1215
- <p>
1216
- Gets the current filter for a pattern. See <a class="link" href="cairo-Patterns.html#cairo-filter-t"><span class="type">cairo_filter_t</span></a>
1217
- for details on each filter.</p>
1218
- <p>
1219
-
1220
- </p>
1221
- <div class="variablelist"><table border="0">
1222
- <col align="left" valign="top">
1223
- <tbody>
1224
- <tr>
1225
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
1226
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1227
- </td>
1228
- </tr>
1229
- <tr>
1230
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1231
- <td> the current filter used for resizing the pattern.
1232
- </td>
1233
- </tr>
1234
- </tbody>
1235
- </table></div>
1236
- </div>
1237
- <hr>
1238
- <div class="refsect2" lang="en">
1239
- <a name="id2646162"></a><h3>
1240
- <a name="cairo-pattern-set-matrix"></a>cairo_pattern_set_matrix ()</h3>
1241
- <a class="indexterm" name="id2646176"></a><pre class="programlisting">void cairo_pattern_set_matrix (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
1242
- const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre>
1243
- <p>
1244
- Sets the pattern's transformation matrix to <em class="parameter"><code>matrix</code></em>. This matrix is
1245
- a transformation from user space to pattern space.
1246
- </p>
1247
- <p>
1248
- When a pattern is first created it always has the identity matrix
1249
- for its transformation matrix, which means that pattern space is
1250
- initially identical to user space.
1251
- </p>
1252
- <p>
1253
- Important: Please note that the direction of this transformation
1254
- matrix is from user space to pattern space. This means that if you
1255
- imagine the flow from a pattern to user space (and on to device
1256
- space), then coordinates in that flow will be transformed by the
1257
- inverse of the pattern matrix.
1258
- </p>
1259
- <p>
1260
- For example, if you want to make a pattern appear twice as large as
1261
- it does by default the correct code to use is:
1262
- </p>
1263
- <p>
1264
- </p>
1265
- <div class="informalexample"><pre class="programlisting">
1266
- cairo_matrix_init_scale (&amp;matrix, 0.5, 0.5);
1267
- cairo_pattern_set_matrix (pattern, &amp;matrix);
1268
- </pre></div>
1269
- <p>
1270
- </p>
1271
- <p>
1272
- Meanwhile, using values of 2.0 rather than 0.5 in the code above
1273
- would cause the pattern to appear at half of its default size.
1274
- </p>
1275
- <p>
1276
- Also, please note the discussion of the user-space locking
1277
- semantics of <a class="link" href="cairo-cairo-t.html#cairo-set-source"><code class="function">cairo_set_source()</code></a>.</p>
1278
- <p>
1279
-
1280
- </p>
1281
- <div class="variablelist"><table border="0">
1282
- <col align="left" valign="top">
1283
- <tbody>
1284
- <tr>
1285
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
1286
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1287
- </td>
1288
- </tr>
1289
- <tr>
1290
- <td><p><span class="term"><em class="parameter"><code>matrix</code></em>&#160;:</span></p></td>
1291
- <td> a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t"><span class="type">cairo_matrix_t</span></a>
1292
- </td>
1293
- </tr>
1294
- </tbody>
1295
- </table></div>
1296
- </div>
1297
- <hr>
1298
- <div class="refsect2" lang="en">
1299
- <a name="id2646324"></a><h3>
1300
- <a name="cairo-pattern-get-matrix"></a>cairo_pattern_get_matrix ()</h3>
1301
- <a class="indexterm" name="id2646337"></a><pre class="programlisting">void cairo_pattern_get_matrix (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
1302
- <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre>
1303
- <p>
1304
- Stores the pattern's transformation matrix into <em class="parameter"><code>matrix</code></em>.</p>
1305
- <p>
1306
-
1307
- </p>
1308
- <div class="variablelist"><table border="0">
1309
- <col align="left" valign="top">
1310
- <tbody>
1311
- <tr>
1312
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
1313
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1314
- </td>
1315
- </tr>
1316
- <tr>
1317
- <td><p><span class="term"><em class="parameter"><code>matrix</code></em>&#160;:</span></p></td>
1318
- <td> return value for the matrix
1319
- </td>
1320
- </tr>
1321
- </tbody>
1322
- </table></div>
1323
- </div>
1324
- <hr>
1325
- <div class="refsect2" lang="en">
1326
- <a name="id2646424"></a><h3>
1327
- <a name="cairo-pattern-type-t"></a>enum cairo_pattern_type_t</h3>
1328
- <a class="indexterm" name="id2646439"></a><pre class="programlisting">typedef enum _cairo_pattern_type {
1329
- CAIRO_PATTERN_TYPE_SOLID,
1330
- CAIRO_PATTERN_TYPE_SURFACE,
1331
- CAIRO_PATTERN_TYPE_LINEAR,
1332
- CAIRO_PATTERN_TYPE_RADIAL
1333
- } cairo_pattern_type_t;
1334
- </pre>
1335
- <p>
1336
- <a class="link" href="cairo-Patterns.html#cairo-pattern-type-t"><span class="type">cairo_pattern_type_t</span></a> is used to describe the type of a given pattern.
1337
- </p>
1338
- <p>
1339
- The type of a pattern is determined by the function used to create
1340
- it. The <a class="link" href="cairo-Patterns.html#cairo-pattern-create-rgb"><code class="function">cairo_pattern_create_rgb()</code></a> and <a class="link" href="cairo-Patterns.html#cairo-pattern-create-rgba"><code class="function">cairo_pattern_create_rgba()</code></a>
1341
- functions create SOLID patterns. The remaining
1342
- cairo_pattern_create functions map to pattern types in obvious
1343
- ways.
1344
- </p>
1345
- <p>
1346
- The pattern type can be queried with <a class="link" href="cairo-Patterns.html#cairo-pattern-get-type"><code class="function">cairo_pattern_get_type()</code></a>
1347
- </p>
1348
- <p>
1349
- Most <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> functions can be called with a pattern of any
1350
- type, (though trying to change the extend or filter for a solid
1351
- pattern will have no effect). A notable exception is
1352
- <a class="link" href="cairo-Patterns.html#cairo-pattern-add-color-stop-rgb"><code class="function">cairo_pattern_add_color_stop_rgb()</code></a> and
1353
- <a class="link" href="cairo-Patterns.html#cairo-pattern-add-color-stop-rgba"><code class="function">cairo_pattern_add_color_stop_rgba()</code></a> which must only be called with
1354
- gradient patterns (either LINEAR or RADIAL). Otherwise the pattern
1355
- will be shutdown and put into an error state.
1356
- </p>
1357
- <p>
1358
- New entries may be added in future versions.</p>
1359
- <p>
1360
-
1361
- </p>
1362
- <div class="variablelist"><table border="0">
1363
- <col align="left" valign="top">
1364
- <tbody>
1365
- <tr>
1366
- <td><p><span class="term"><a name="CAIRO-PATTERN-TYPE-SOLID:CAPS"></a><code class="literal">CAIRO_PATTERN_TYPE_SOLID</code></span></p></td>
1367
- <td> The pattern is a solid (uniform)
1368
- color. It may be opaque or translucent.
1369
- </td>
1370
- </tr>
1371
- <tr>
1372
- <td><p><span class="term"><a name="CAIRO-PATTERN-TYPE-SURFACE:CAPS"></a><code class="literal">CAIRO_PATTERN_TYPE_SURFACE</code></span></p></td>
1373
- <td> The pattern is a based on a surface (an image).
1374
- </td>
1375
- </tr>
1376
- <tr>
1377
- <td><p><span class="term"><a name="CAIRO-PATTERN-TYPE-LINEAR:CAPS"></a><code class="literal">CAIRO_PATTERN_TYPE_LINEAR</code></span></p></td>
1378
- <td> The pattern is a linear gradient.
1379
- </td>
1380
- </tr>
1381
- <tr>
1382
- <td><p><span class="term"><a name="CAIRO-PATTERN-TYPE-RADIAL:CAPS"></a><code class="literal">CAIRO_PATTERN_TYPE_RADIAL</code></span></p></td>
1383
- <td> The pattern is a radial gradient.
1384
- </td>
1385
- </tr>
1386
- </tbody>
1387
- </table></div>
1388
- <p class="since">Since 1.2
1389
- </p>
1390
- </div>
1391
- <hr>
1392
- <div class="refsect2" lang="en">
1393
- <a name="id2646658"></a><h3>
1394
- <a name="cairo-pattern-get-type"></a>cairo_pattern_get_type ()</h3>
1395
- <a class="indexterm" name="id2646674"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-type-t">cairo_pattern_type_t</a> cairo_pattern_get_type (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre>
1396
- <p>
1397
- This function returns the type a pattern.
1398
- See <a class="link" href="cairo-Patterns.html#cairo-pattern-type-t"><span class="type">cairo_pattern_type_t</span></a> for available types.</p>
1399
- <p>
1400
-
1401
- </p>
1402
- <div class="variablelist"><table border="0">
1403
- <col align="left" valign="top">
1404
- <tbody>
1405
- <tr>
1406
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
1407
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1408
- </td>
1409
- </tr>
1410
- <tr>
1411
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1412
- <td> The type of <em class="parameter"><code>pattern</code></em>.
1413
-
1414
- </td>
1415
- </tr>
1416
- </tbody>
1417
- </table></div>
1418
- <p class="since">Since 1.2
1419
- </p>
1420
- </div>
1421
- <hr>
1422
- <div class="refsect2" lang="en">
1423
- <a name="id2646765"></a><h3>
1424
- <a name="cairo-pattern-get-reference-count"></a>cairo_pattern_get_reference_count ()</h3>
1425
- <a class="indexterm" name="id2646781"></a><pre class="programlisting">unsigned int cairo_pattern_get_reference_count (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre>
1426
- <p>
1427
- Returns the current reference count of <em class="parameter"><code>pattern</code></em>.</p>
1428
- <p>
1429
-
1430
- </p>
1431
- <div class="variablelist"><table border="0">
1432
- <col align="left" valign="top">
1433
- <tbody>
1434
- <tr>
1435
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
1436
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1437
- </td>
1438
- </tr>
1439
- <tr>
1440
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1441
- <td> the current reference count of <em class="parameter"><code>pattern</code></em>. If the
1442
- object is a nil object, 0 will be returned.
1443
-
1444
- </td>
1445
- </tr>
1446
- </tbody>
1447
- </table></div>
1448
- <p class="since">Since 1.4
1449
- </p>
1450
- </div>
1451
- <hr>
1452
- <div class="refsect2" lang="en">
1453
- <a name="id2646871"></a><h3>
1454
- <a name="cairo-pattern-set-user-data"></a>cairo_pattern_set_user_data ()</h3>
1455
- <a class="indexterm" name="id2646887"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_set_user_data (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
1456
- const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key,
1457
- void *user_data,
1458
- <a class="link" href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);</pre>
1459
- <p>
1460
- Attach user data to <em class="parameter"><code>pattern</code></em>. To remove user data from a surface,
1461
- call this function with the key that was used to set it and <code class="literal">NULL</code>
1462
- for <em class="parameter"><code>data</code></em>.</p>
1463
- <p>
1464
-
1465
- </p>
1466
- <div class="variablelist"><table border="0">
1467
- <col align="left" valign="top">
1468
- <tbody>
1469
- <tr>
1470
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
1471
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1472
- </td>
1473
- </tr>
1474
- <tr>
1475
- <td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
1476
- <td> the address of a <a class="link" href="cairo-Types.html#cairo-user-data-key-t"><span class="type">cairo_user_data_key_t</span></a> to attach the user data to
1477
- </td>
1478
- </tr>
1479
- <tr>
1480
- <td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
1481
- <td> the user data to attach to the <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1482
- </td>
1483
- </tr>
1484
- <tr>
1485
- <td><p><span class="term"><em class="parameter"><code>destroy</code></em>&#160;:</span></p></td>
1486
- <td> a <a class="link" href="cairo-Types.html#cairo-destroy-func-t"><span class="type">cairo_destroy_func_t</span></a> which will be called when the
1487
- <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> is destroyed or when new user data is attached using the
1488
- same key.
1489
- </td>
1490
- </tr>
1491
- <tr>
1492
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1493
- <td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a
1494
- slot could not be allocated for the user data.
1495
-
1496
- </td>
1497
- </tr>
1498
- </tbody>
1499
- </table></div>
1500
- <p class="since">Since 1.4
1501
- </p>
1502
- </div>
1503
- <hr>
1504
- <div class="refsect2" lang="en">
1505
- <a name="id2647102"></a><h3>
1506
- <a name="cairo-pattern-get-user-data"></a>cairo_pattern_get_user_data ()</h3>
1507
- <a class="indexterm" name="id2647119"></a><pre class="programlisting">void* cairo_pattern_get_user_data (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern,
1508
- const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);</pre>
1509
- <p>
1510
- Return user data previously attached to <em class="parameter"><code>pattern</code></em> using the
1511
- specified key. If no user data has been attached with the given
1512
- key this function returns <code class="literal">NULL</code>.</p>
1513
- <p>
1514
-
1515
- </p>
1516
- <div class="variablelist"><table border="0">
1517
- <col align="left" valign="top">
1518
- <tbody>
1519
- <tr>
1520
- <td><p><span class="term"><em class="parameter"><code>pattern</code></em>&#160;:</span></p></td>
1521
- <td> a <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a>
1522
- </td>
1523
- </tr>
1524
- <tr>
1525
- <td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
1526
- <td> the address of the <a class="link" href="cairo-Types.html#cairo-user-data-key-t"><span class="type">cairo_user_data_key_t</span></a> the user data was
1527
- attached to
1528
- </td>
1529
- </tr>
1530
- <tr>
1531
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1532
- <td> the user data previously attached or <code class="literal">NULL</code>.
1533
-
1534
- </td>
1535
- </tr>
1536
- </tbody>
1537
- </table></div>
1538
- <p class="since">Since 1.4
1539
- </p>
1540
- </div>
1541
- </div>
1542
- <div class="refsect1" lang="en">
1543
- <a name="id2647253"></a><h2>See Also</h2>
1544
- <p>
1545
- </p>
1546
- <div class="itemizedlist"><ul type="disc">
1547
- <li><a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a></li>
1548
- <li><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a></li>
1549
- </ul></div>
1550
- <p>
1551
- </p>
1552
- </div>
1553
- <div class="refsect1" lang="en">
1554
- <a name="id2647284"></a><div class="refsect2" lang="en"><a name="id2647285"></a></div>
1555
- <hr>
1556
- <div class="refsect2" lang="en"><a name="id2647286"></a></div>
1557
- </div>
1558
- </div>
1559
- </body>
1560
- </html>