Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
2 <html> | |
3 <head> | |
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
5 <title>cairo_pattern_t: Cairo: A Vector Graphics Library</title> | |
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> | |
7 <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library"> | |
8 <link rel="up" href="cairo-drawing.html" title="Drawing"> | |
9 <link rel="prev" href="cairo-Paths.html" title="Paths"> | |
10 <link rel="next" href="cairo-Regions.html" title="Regions"> | |
11 <meta name="generator" content="GTK-Doc V1.27 (XML mode)"> | |
12 <link rel="stylesheet" href="style.css" type="text/css"> | |
13 </head> | |
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> | |
16 <td width="100%" align="left" class="shortcuts"> | |
17 <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
18 <a href="#cairo-cairo-pattern-t.description" class="shortcut">Description</a></span> | |
19 </td> | |
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
21 <td><a accesskey="u" href="cairo-drawing.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
22 <td><a accesskey="p" href="cairo-Paths.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
23 <td><a accesskey="n" href="cairo-Regions.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
24 </tr></table> | |
25 <div class="refentry"> | |
26 <a name="cairo-cairo-pattern-t"></a><div class="titlepage"></div> | |
27 <div class="refnamediv"><table width="100%"><tr> | |
28 <td valign="top"> | |
29 <h2><span class="refentrytitle"><a name="cairo-cairo-pattern-t.top_of_page"></a>cairo_pattern_t</span></h2> | |
30 <p>cairo_pattern_t — Sources for drawing</p> | |
31 </td> | |
32 <td class="gallery_image" valign="top" align="right"></td> | |
33 </tr></table></div> | |
34 <div class="refsect1"> | |
35 <a name="cairo-cairo-pattern-t.functions"></a><h2>Functions</h2> | |
36 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
37 <colgroup> | |
38 <col width="150px" class="functions_return"> | |
39 <col class="functions_name"> | |
40 </colgroup> | |
41 <tbody> | |
42 <tr> | |
43 <td class="function_type"> | |
44 <span class="returnvalue">void</span> | |
45 </td> | |
46 <td class="function_name"> | |
47 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-add-color-stop-rgb" title="cairo_pattern_add_color_stop_rgb ()">cairo_pattern_add_color_stop_rgb</a> <span class="c_punctuation">()</span> | |
48 </td> | |
49 </tr> | |
50 <tr> | |
51 <td class="function_type"> | |
52 <span class="returnvalue">void</span> | |
53 </td> | |
54 <td class="function_name"> | |
55 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-add-color-stop-rgba" title="cairo_pattern_add_color_stop_rgba ()">cairo_pattern_add_color_stop_rgba</a> <span class="c_punctuation">()</span> | |
56 </td> | |
57 </tr> | |
58 <tr> | |
59 <td class="function_type"> | |
60 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
61 </td> | |
62 <td class="function_name"> | |
63 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-color-stop-count" title="cairo_pattern_get_color_stop_count ()">cairo_pattern_get_color_stop_count</a> <span class="c_punctuation">()</span> | |
64 </td> | |
65 </tr> | |
66 <tr> | |
67 <td class="function_type"> | |
68 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
69 </td> | |
70 <td class="function_name"> | |
71 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-color-stop-rgba" title="cairo_pattern_get_color_stop_rgba ()">cairo_pattern_get_color_stop_rgba</a> <span class="c_punctuation">()</span> | |
72 </td> | |
73 </tr> | |
74 <tr> | |
75 <td class="function_type"> | |
76 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
77 </td> | |
78 <td class="function_name"> | |
79 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-rgb" title="cairo_pattern_create_rgb ()">cairo_pattern_create_rgb</a> <span class="c_punctuation">()</span> | |
80 </td> | |
81 </tr> | |
82 <tr> | |
83 <td class="function_type"> | |
84 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
85 </td> | |
86 <td class="function_name"> | |
87 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-rgba" title="cairo_pattern_create_rgba ()">cairo_pattern_create_rgba</a> <span class="c_punctuation">()</span> | |
88 </td> | |
89 </tr> | |
90 <tr> | |
91 <td class="function_type"> | |
92 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
93 </td> | |
94 <td class="function_name"> | |
95 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-rgba" title="cairo_pattern_get_rgba ()">cairo_pattern_get_rgba</a> <span class="c_punctuation">()</span> | |
96 </td> | |
97 </tr> | |
98 <tr> | |
99 <td class="function_type"> | |
100 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
101 </td> | |
102 <td class="function_name"> | |
103 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-for-surface" title="cairo_pattern_create_for_surface ()">cairo_pattern_create_for_surface</a> <span class="c_punctuation">()</span> | |
104 </td> | |
105 </tr> | |
106 <tr> | |
107 <td class="function_type"> | |
108 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
109 </td> | |
110 <td class="function_name"> | |
111 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-surface" title="cairo_pattern_get_surface ()">cairo_pattern_get_surface</a> <span class="c_punctuation">()</span> | |
112 </td> | |
113 </tr> | |
114 <tr> | |
115 <td class="function_type"> | |
116 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
117 </td> | |
118 <td class="function_name"> | |
119 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-linear" title="cairo_pattern_create_linear ()">cairo_pattern_create_linear</a> <span class="c_punctuation">()</span> | |
120 </td> | |
121 </tr> | |
122 <tr> | |
123 <td class="function_type"> | |
124 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
125 </td> | |
126 <td class="function_name"> | |
127 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-linear-points" title="cairo_pattern_get_linear_points ()">cairo_pattern_get_linear_points</a> <span class="c_punctuation">()</span> | |
128 </td> | |
129 </tr> | |
130 <tr> | |
131 <td class="function_type"> | |
132 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
133 </td> | |
134 <td class="function_name"> | |
135 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-radial" title="cairo_pattern_create_radial ()">cairo_pattern_create_radial</a> <span class="c_punctuation">()</span> | |
136 </td> | |
137 </tr> | |
138 <tr> | |
139 <td class="function_type"> | |
140 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
141 </td> | |
142 <td class="function_name"> | |
143 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-radial-circles" title="cairo_pattern_get_radial_circles ()">cairo_pattern_get_radial_circles</a> <span class="c_punctuation">()</span> | |
144 </td> | |
145 </tr> | |
146 <tr> | |
147 <td class="function_type"> | |
148 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
149 </td> | |
150 <td class="function_name"> | |
151 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()">cairo_pattern_create_mesh</a> <span class="c_punctuation">()</span> | |
152 </td> | |
153 </tr> | |
154 <tr> | |
155 <td class="function_type"> | |
156 <span class="returnvalue">void</span> | |
157 </td> | |
158 <td class="function_name"> | |
159 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-begin-patch" title="cairo_mesh_pattern_begin_patch ()">cairo_mesh_pattern_begin_patch</a> <span class="c_punctuation">()</span> | |
160 </td> | |
161 </tr> | |
162 <tr> | |
163 <td class="function_type"> | |
164 <span class="returnvalue">void</span> | |
165 </td> | |
166 <td class="function_name"> | |
167 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-end-patch" title="cairo_mesh_pattern_end_patch ()">cairo_mesh_pattern_end_patch</a> <span class="c_punctuation">()</span> | |
168 </td> | |
169 </tr> | |
170 <tr> | |
171 <td class="function_type"> | |
172 <span class="returnvalue">void</span> | |
173 </td> | |
174 <td class="function_name"> | |
175 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-move-to" title="cairo_mesh_pattern_move_to ()">cairo_mesh_pattern_move_to</a> <span class="c_punctuation">()</span> | |
176 </td> | |
177 </tr> | |
178 <tr> | |
179 <td class="function_type"> | |
180 <span class="returnvalue">void</span> | |
181 </td> | |
182 <td class="function_name"> | |
183 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-line-to" title="cairo_mesh_pattern_line_to ()">cairo_mesh_pattern_line_to</a> <span class="c_punctuation">()</span> | |
184 </td> | |
185 </tr> | |
186 <tr> | |
187 <td class="function_type"> | |
188 <span class="returnvalue">void</span> | |
189 </td> | |
190 <td class="function_name"> | |
191 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-curve-to" title="cairo_mesh_pattern_curve_to ()">cairo_mesh_pattern_curve_to</a> <span class="c_punctuation">()</span> | |
192 </td> | |
193 </tr> | |
194 <tr> | |
195 <td class="function_type"> | |
196 <span class="returnvalue">void</span> | |
197 </td> | |
198 <td class="function_name"> | |
199 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-control-point" title="cairo_mesh_pattern_set_control_point ()">cairo_mesh_pattern_set_control_point</a> <span class="c_punctuation">()</span> | |
200 </td> | |
201 </tr> | |
202 <tr> | |
203 <td class="function_type"> | |
204 <span class="returnvalue">void</span> | |
205 </td> | |
206 <td class="function_name"> | |
207 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgb" title="cairo_mesh_pattern_set_corner_color_rgb ()">cairo_mesh_pattern_set_corner_color_rgb</a> <span class="c_punctuation">()</span> | |
208 </td> | |
209 </tr> | |
210 <tr> | |
211 <td class="function_type"> | |
212 <span class="returnvalue">void</span> | |
213 </td> | |
214 <td class="function_name"> | |
215 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgba" title="cairo_mesh_pattern_set_corner_color_rgba ()">cairo_mesh_pattern_set_corner_color_rgba</a> <span class="c_punctuation">()</span> | |
216 </td> | |
217 </tr> | |
218 <tr> | |
219 <td class="function_type"> | |
220 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
221 </td> | |
222 <td class="function_name"> | |
223 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-get-patch-count" title="cairo_mesh_pattern_get_patch_count ()">cairo_mesh_pattern_get_patch_count</a> <span class="c_punctuation">()</span> | |
224 </td> | |
225 </tr> | |
226 <tr> | |
227 <td class="function_type"> | |
228 <a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="returnvalue">cairo_path_t</span></a> * | |
229 </td> | |
230 <td class="function_name"> | |
231 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-get-path" title="cairo_mesh_pattern_get_path ()">cairo_mesh_pattern_get_path</a> <span class="c_punctuation">()</span> | |
232 </td> | |
233 </tr> | |
234 <tr> | |
235 <td class="function_type"> | |
236 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
237 </td> | |
238 <td class="function_name"> | |
239 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-get-control-point" title="cairo_mesh_pattern_get_control_point ()">cairo_mesh_pattern_get_control_point</a> <span class="c_punctuation">()</span> | |
240 </td> | |
241 </tr> | |
242 <tr> | |
243 <td class="function_type"> | |
244 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
245 </td> | |
246 <td class="function_name"> | |
247 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-get-corner-color-rgba" title="cairo_mesh_pattern_get_corner_color_rgba ()">cairo_mesh_pattern_get_corner_color_rgba</a> <span class="c_punctuation">()</span> | |
248 </td> | |
249 </tr> | |
250 <tr> | |
251 <td class="function_type"> | |
252 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
253 </td> | |
254 <td class="function_name"> | |
255 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-reference" title="cairo_pattern_reference ()">cairo_pattern_reference</a> <span class="c_punctuation">()</span> | |
256 </td> | |
257 </tr> | |
258 <tr> | |
259 <td class="function_type"> | |
260 <span class="returnvalue">void</span> | |
261 </td> | |
262 <td class="function_name"> | |
263 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()">cairo_pattern_destroy</a> <span class="c_punctuation">()</span> | |
264 </td> | |
265 </tr> | |
266 <tr> | |
267 <td class="function_type"> | |
268 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
269 </td> | |
270 <td class="function_name"> | |
271 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-status" title="cairo_pattern_status ()">cairo_pattern_status</a> <span class="c_punctuation">()</span> | |
272 </td> | |
273 </tr> | |
274 <tr> | |
275 <td class="function_type"> | |
276 <span class="returnvalue">void</span> | |
277 </td> | |
278 <td class="function_name"> | |
279 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-extend" title="cairo_pattern_set_extend ()">cairo_pattern_set_extend</a> <span class="c_punctuation">()</span> | |
280 </td> | |
281 </tr> | |
282 <tr> | |
283 <td class="function_type"> | |
284 <a class="link" href="cairo-cairo-pattern-t.html#cairo-extend-t" title="enum cairo_extend_t"><span class="returnvalue">cairo_extend_t</span></a> | |
285 </td> | |
286 <td class="function_name"> | |
287 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-extend" title="cairo_pattern_get_extend ()">cairo_pattern_get_extend</a> <span class="c_punctuation">()</span> | |
288 </td> | |
289 </tr> | |
290 <tr> | |
291 <td class="function_type"> | |
292 <span class="returnvalue">void</span> | |
293 </td> | |
294 <td class="function_name"> | |
295 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-filter" title="cairo_pattern_set_filter ()">cairo_pattern_set_filter</a> <span class="c_punctuation">()</span> | |
296 </td> | |
297 </tr> | |
298 <tr> | |
299 <td class="function_type"> | |
300 <a class="link" href="cairo-cairo-pattern-t.html#cairo-filter-t" title="enum cairo_filter_t"><span class="returnvalue">cairo_filter_t</span></a> | |
301 </td> | |
302 <td class="function_name"> | |
303 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-filter" title="cairo_pattern_get_filter ()">cairo_pattern_get_filter</a> <span class="c_punctuation">()</span> | |
304 </td> | |
305 </tr> | |
306 <tr> | |
307 <td class="function_type"> | |
308 <span class="returnvalue">void</span> | |
309 </td> | |
310 <td class="function_name"> | |
311 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-matrix" title="cairo_pattern_set_matrix ()">cairo_pattern_set_matrix</a> <span class="c_punctuation">()</span> | |
312 </td> | |
313 </tr> | |
314 <tr> | |
315 <td class="function_type"> | |
316 <span class="returnvalue">void</span> | |
317 </td> | |
318 <td class="function_name"> | |
319 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-matrix" title="cairo_pattern_get_matrix ()">cairo_pattern_get_matrix</a> <span class="c_punctuation">()</span> | |
320 </td> | |
321 </tr> | |
322 <tr> | |
323 <td class="function_type"> | |
324 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-type-t" title="enum cairo_pattern_type_t"><span class="returnvalue">cairo_pattern_type_t</span></a> | |
325 </td> | |
326 <td class="function_name"> | |
327 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-type" title="cairo_pattern_get_type ()">cairo_pattern_get_type</a> <span class="c_punctuation">()</span> | |
328 </td> | |
329 </tr> | |
330 <tr> | |
331 <td class="function_type">unsigned <span class="returnvalue">int</span> | |
332 </td> | |
333 <td class="function_name"> | |
334 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-reference-count" title="cairo_pattern_get_reference_count ()">cairo_pattern_get_reference_count</a> <span class="c_punctuation">()</span> | |
335 </td> | |
336 </tr> | |
337 <tr> | |
338 <td class="function_type"> | |
339 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
340 </td> | |
341 <td class="function_name"> | |
342 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-user-data" title="cairo_pattern_set_user_data ()">cairo_pattern_set_user_data</a> <span class="c_punctuation">()</span> | |
343 </td> | |
344 </tr> | |
345 <tr> | |
346 <td class="function_type"> | |
347 <span class="returnvalue">void</span> * | |
348 </td> | |
349 <td class="function_name"> | |
350 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-user-data" title="cairo_pattern_get_user_data ()">cairo_pattern_get_user_data</a> <span class="c_punctuation">()</span> | |
351 </td> | |
352 </tr> | |
353 </tbody> | |
354 </table></div> | |
355 </div> | |
356 <div class="refsect1"> | |
357 <a name="cairo-cairo-pattern-t.other"></a><h2>Types and Values</h2> | |
358 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
359 <colgroup> | |
360 <col width="150px" class="name"> | |
361 <col class="description"> | |
362 </colgroup> | |
363 <tbody> | |
364 <tr> | |
365 <td class="typedef_keyword">typedef</td> | |
366 <td class="function_name"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a></td> | |
367 </tr> | |
368 <tr> | |
369 <td class="datatype_keyword">enum</td> | |
370 <td class="function_name"><a class="link" href="cairo-cairo-pattern-t.html#cairo-extend-t" title="enum cairo_extend_t">cairo_extend_t</a></td> | |
371 </tr> | |
372 <tr> | |
373 <td class="datatype_keyword">enum</td> | |
374 <td class="function_name"><a class="link" href="cairo-cairo-pattern-t.html#cairo-filter-t" title="enum cairo_filter_t">cairo_filter_t</a></td> | |
375 </tr> | |
376 <tr> | |
377 <td class="datatype_keyword">enum</td> | |
378 <td class="function_name"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-type-t" title="enum cairo_pattern_type_t">cairo_pattern_type_t</a></td> | |
379 </tr> | |
380 </tbody> | |
381 </table></div> | |
382 </div> | |
383 <div class="refsect1"> | |
384 <a name="cairo-cairo-pattern-t.description"></a><h2>Description</h2> | |
385 <p><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> is the paint with which cairo draws. | |
386 The primary use of patterns is as the source for all cairo drawing | |
387 operations, although they can also be used as masks, that is, as the | |
388 brush too.</p> | |
389 <p>A cairo pattern is created by using one of the many constructors, | |
390 of the form | |
391 <code class="function">cairo_pattern_create_<span class="emphasis"><em>type</em></span>()</code> | |
392 or implicitly through | |
393 <code class="function">cairo_set_source_<span class="emphasis"><em>type</em></span>()</code> | |
394 functions.</p> | |
395 </div> | |
396 <div class="refsect1"> | |
397 <a name="cairo-cairo-pattern-t.functions_details"></a><h2>Functions</h2> | |
398 <div class="refsect2"> | |
399 <a name="cairo-pattern-add-color-stop-rgb"></a><h3>cairo_pattern_add_color_stop_rgb ()</h3> | |
400 <pre class="programlisting"><span class="returnvalue">void</span> | |
401 cairo_pattern_add_color_stop_rgb (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
402 <em class="parameter"><code><span class="type">double</span> offset</code></em>, | |
403 <em class="parameter"><code><span class="type">double</span> red</code></em>, | |
404 <em class="parameter"><code><span class="type">double</span> green</code></em>, | |
405 <em class="parameter"><code><span class="type">double</span> blue</code></em>);</pre> | |
406 <p>Adds an opaque color stop to a gradient pattern. The offset | |
407 specifies the location along the gradient's control vector. For | |
408 example, a linear gradient's control vector is from (x0,y0) to | |
409 (x1,y1) while a radial gradient's control vector is from any point | |
410 on the start circle to the corresponding point on the end circle.</p> | |
411 <p>The color is specified in the same way as in <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgb" title="cairo_set_source_rgb ()"><code class="function">cairo_set_source_rgb()</code></a>.</p> | |
412 <p>If two (or more) stops are specified with identical offset values, | |
413 they will be sorted according to the order in which the stops are | |
414 added, (stops added earlier will compare less than stops added | |
415 later). This can be useful for reliably making sharp color | |
416 transitions instead of the typical blend.</p> | |
417 <p>Note: If the pattern is not a gradient pattern, (eg. a linear or | |
418 radial pattern), then the pattern will be put into an error status | |
419 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> | |
420 <div class="refsect3"> | |
421 <a name="cairo-pattern-add-color-stop-rgb.parameters"></a><h4>Parameters</h4> | |
422 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
423 <colgroup> | |
424 <col width="150px" class="parameters_name"> | |
425 <col class="parameters_description"> | |
426 <col width="200px" class="parameters_annotations"> | |
427 </colgroup> | |
428 <tbody> | |
429 <tr> | |
430 <td class="parameter_name"><p>pattern</p></td> | |
431 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
432 <td class="parameter_annotations"> </td> | |
433 </tr> | |
434 <tr> | |
435 <td class="parameter_name"><p>offset</p></td> | |
436 <td class="parameter_description"><p>an offset in the range [0.0 .. 1.0]</p></td> | |
437 <td class="parameter_annotations"> </td> | |
438 </tr> | |
439 <tr> | |
440 <td class="parameter_name"><p>red</p></td> | |
441 <td class="parameter_description"><p>red component of color</p></td> | |
442 <td class="parameter_annotations"> </td> | |
443 </tr> | |
444 <tr> | |
445 <td class="parameter_name"><p>green</p></td> | |
446 <td class="parameter_description"><p>green component of color</p></td> | |
447 <td class="parameter_annotations"> </td> | |
448 </tr> | |
449 <tr> | |
450 <td class="parameter_name"><p>blue</p></td> | |
451 <td class="parameter_description"><p>blue component of color</p></td> | |
452 <td class="parameter_annotations"> </td> | |
453 </tr> | |
454 </tbody> | |
455 </table></div> | |
456 </div> | |
457 <p class="since">Since: 1.0</p> | |
458 </div> | |
459 <hr> | |
460 <div class="refsect2"> | |
461 <a name="cairo-pattern-add-color-stop-rgba"></a><h3>cairo_pattern_add_color_stop_rgba ()</h3> | |
462 <pre class="programlisting"><span class="returnvalue">void</span> | |
463 cairo_pattern_add_color_stop_rgba (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
464 <em class="parameter"><code><span class="type">double</span> offset</code></em>, | |
465 <em class="parameter"><code><span class="type">double</span> red</code></em>, | |
466 <em class="parameter"><code><span class="type">double</span> green</code></em>, | |
467 <em class="parameter"><code><span class="type">double</span> blue</code></em>, | |
468 <em class="parameter"><code><span class="type">double</span> alpha</code></em>);</pre> | |
469 <p>Adds a translucent color stop to a gradient pattern. The offset | |
470 specifies the location along the gradient's control vector. For | |
471 example, a linear gradient's control vector is from (x0,y0) to | |
472 (x1,y1) while a radial gradient's control vector is from any point | |
473 on the start circle to the corresponding point on the end circle.</p> | |
474 <p>The color is specified in the same way as in <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgba" title="cairo_set_source_rgba ()"><code class="function">cairo_set_source_rgba()</code></a>.</p> | |
475 <p>If two (or more) stops are specified with identical offset values, | |
476 they will be sorted according to the order in which the stops are | |
477 added, (stops added earlier will compare less than stops added | |
478 later). This can be useful for reliably making sharp color | |
479 transitions instead of the typical blend.</p> | |
480 <p>Note: If the pattern is not a gradient pattern, (eg. a linear or | |
481 radial pattern), then the pattern will be put into an error status | |
482 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> | |
483 <div class="refsect3"> | |
484 <a name="cairo-pattern-add-color-stop-rgba.parameters"></a><h4>Parameters</h4> | |
485 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
486 <colgroup> | |
487 <col width="150px" class="parameters_name"> | |
488 <col class="parameters_description"> | |
489 <col width="200px" class="parameters_annotations"> | |
490 </colgroup> | |
491 <tbody> | |
492 <tr> | |
493 <td class="parameter_name"><p>pattern</p></td> | |
494 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
495 <td class="parameter_annotations"> </td> | |
496 </tr> | |
497 <tr> | |
498 <td class="parameter_name"><p>offset</p></td> | |
499 <td class="parameter_description"><p>an offset in the range [0.0 .. 1.0]</p></td> | |
500 <td class="parameter_annotations"> </td> | |
501 </tr> | |
502 <tr> | |
503 <td class="parameter_name"><p>red</p></td> | |
504 <td class="parameter_description"><p>red component of color</p></td> | |
505 <td class="parameter_annotations"> </td> | |
506 </tr> | |
507 <tr> | |
508 <td class="parameter_name"><p>green</p></td> | |
509 <td class="parameter_description"><p>green component of color</p></td> | |
510 <td class="parameter_annotations"> </td> | |
511 </tr> | |
512 <tr> | |
513 <td class="parameter_name"><p>blue</p></td> | |
514 <td class="parameter_description"><p>blue component of color</p></td> | |
515 <td class="parameter_annotations"> </td> | |
516 </tr> | |
517 <tr> | |
518 <td class="parameter_name"><p>alpha</p></td> | |
519 <td class="parameter_description"><p>alpha component of color</p></td> | |
520 <td class="parameter_annotations"> </td> | |
521 </tr> | |
522 </tbody> | |
523 </table></div> | |
524 </div> | |
525 <p class="since">Since: 1.0</p> | |
526 </div> | |
527 <hr> | |
528 <div class="refsect2"> | |
529 <a name="cairo-pattern-get-color-stop-count"></a><h3>cairo_pattern_get_color_stop_count ()</h3> | |
530 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
531 cairo_pattern_get_color_stop_count (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
532 <em class="parameter"><code><span class="type">int</span> *count</code></em>);</pre> | |
533 <p>Gets the number of color stops specified in the given gradient | |
534 pattern.</p> | |
535 <div class="refsect3"> | |
536 <a name="cairo-pattern-get-color-stop-count.parameters"></a><h4>Parameters</h4> | |
537 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
538 <colgroup> | |
539 <col width="150px" class="parameters_name"> | |
540 <col class="parameters_description"> | |
541 <col width="200px" class="parameters_annotations"> | |
542 </colgroup> | |
543 <tbody> | |
544 <tr> | |
545 <td class="parameter_name"><p>pattern</p></td> | |
546 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
547 <td class="parameter_annotations"> </td> | |
548 </tr> | |
549 <tr> | |
550 <td class="parameter_name"><p>count</p></td> | |
551 <td class="parameter_description"><p>return value for the number of color stops, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
552 <td class="parameter_annotations"> </td> | |
553 </tr> | |
554 </tbody> | |
555 </table></div> | |
556 </div> | |
557 <div class="refsect3"> | |
558 <a name="cairo-pattern-get-color-stop-count.returns"></a><h4>Returns</h4> | |
559 <p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or | |
560 <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> | |
561 is not a gradient | |
562 pattern.</p> | |
563 </div> | |
564 <p class="since">Since: 1.4</p> | |
565 </div> | |
566 <hr> | |
567 <div class="refsect2"> | |
568 <a name="cairo-pattern-get-color-stop-rgba"></a><h3>cairo_pattern_get_color_stop_rgba ()</h3> | |
569 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
570 cairo_pattern_get_color_stop_rgba (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
571 <em class="parameter"><code><span class="type">int</span> index</code></em>, | |
572 <em class="parameter"><code><span class="type">double</span> *offset</code></em>, | |
573 <em class="parameter"><code><span class="type">double</span> *red</code></em>, | |
574 <em class="parameter"><code><span class="type">double</span> *green</code></em>, | |
575 <em class="parameter"><code><span class="type">double</span> *blue</code></em>, | |
576 <em class="parameter"><code><span class="type">double</span> *alpha</code></em>);</pre> | |
577 <p>Gets the color and offset information at the given <em class="parameter"><code>index</code></em> | |
578 for a | |
579 gradient pattern. Values of <em class="parameter"><code>index</code></em> | |
580 range from 0 to n-1 | |
581 where n is the number returned | |
582 by <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-color-stop-count" title="cairo_pattern_get_color_stop_count ()"><code class="function">cairo_pattern_get_color_stop_count()</code></a>.</p> | |
583 <div class="refsect3"> | |
584 <a name="cairo-pattern-get-color-stop-rgba.parameters"></a><h4>Parameters</h4> | |
585 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
586 <colgroup> | |
587 <col width="150px" class="parameters_name"> | |
588 <col class="parameters_description"> | |
589 <col width="200px" class="parameters_annotations"> | |
590 </colgroup> | |
591 <tbody> | |
592 <tr> | |
593 <td class="parameter_name"><p>pattern</p></td> | |
594 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
595 <td class="parameter_annotations"> </td> | |
596 </tr> | |
597 <tr> | |
598 <td class="parameter_name"><p>index</p></td> | |
599 <td class="parameter_description"><p>index of the stop to return data for</p></td> | |
600 <td class="parameter_annotations"> </td> | |
601 </tr> | |
602 <tr> | |
603 <td class="parameter_name"><p>offset</p></td> | |
604 <td class="parameter_description"><p>return value for the offset of the stop, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
605 <td class="parameter_annotations"> </td> | |
606 </tr> | |
607 <tr> | |
608 <td class="parameter_name"><p>red</p></td> | |
609 <td class="parameter_description"><p>return value for red component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
610 <td class="parameter_annotations"> </td> | |
611 </tr> | |
612 <tr> | |
613 <td class="parameter_name"><p>green</p></td> | |
614 <td class="parameter_description"><p>return value for green component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
615 <td class="parameter_annotations"> </td> | |
616 </tr> | |
617 <tr> | |
618 <td class="parameter_name"><p>blue</p></td> | |
619 <td class="parameter_description"><p>return value for blue component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
620 <td class="parameter_annotations"> </td> | |
621 </tr> | |
622 <tr> | |
623 <td class="parameter_name"><p>alpha</p></td> | |
624 <td class="parameter_description"><p>return value for alpha component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
625 <td class="parameter_annotations"> </td> | |
626 </tr> | |
627 </tbody> | |
628 </table></div> | |
629 </div> | |
630 <div class="refsect3"> | |
631 <a name="cairo-pattern-get-color-stop-rgba.returns"></a><h4>Returns</h4> | |
632 <p> <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> | |
633 if <em class="parameter"><code>index</code></em> | |
634 is not valid for the given pattern. If the pattern is | |
635 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 | |
636 returned.</p> | |
637 </div> | |
638 <p class="since">Since: 1.4</p> | |
639 </div> | |
640 <hr> | |
641 <div class="refsect2"> | |
642 <a name="cairo-pattern-create-rgb"></a><h3>cairo_pattern_create_rgb ()</h3> | |
643 <pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
644 cairo_pattern_create_rgb (<em class="parameter"><code><span class="type">double</span> red</code></em>, | |
645 <em class="parameter"><code><span class="type">double</span> green</code></em>, | |
646 <em class="parameter"><code><span class="type">double</span> blue</code></em>);</pre> | |
647 <p>Creates a new <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> corresponding to an opaque color. The | |
648 color components are floating point numbers in the range 0 to 1. | |
649 If the values passed in are outside that range, they will be | |
650 clamped.</p> | |
651 <div class="refsect3"> | |
652 <a name="cairo-pattern-create-rgb.parameters"></a><h4>Parameters</h4> | |
653 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
654 <colgroup> | |
655 <col width="150px" class="parameters_name"> | |
656 <col class="parameters_description"> | |
657 <col width="200px" class="parameters_annotations"> | |
658 </colgroup> | |
659 <tbody> | |
660 <tr> | |
661 <td class="parameter_name"><p>red</p></td> | |
662 <td class="parameter_description"><p>red component of the color</p></td> | |
663 <td class="parameter_annotations"> </td> | |
664 </tr> | |
665 <tr> | |
666 <td class="parameter_name"><p>green</p></td> | |
667 <td class="parameter_description"><p>green component of the color</p></td> | |
668 <td class="parameter_annotations"> </td> | |
669 </tr> | |
670 <tr> | |
671 <td class="parameter_name"><p>blue</p></td> | |
672 <td class="parameter_description"><p>blue component of the color</p></td> | |
673 <td class="parameter_annotations"> </td> | |
674 </tr> | |
675 </tbody> | |
676 </table></div> | |
677 </div> | |
678 <div class="refsect3"> | |
679 <a name="cairo-pattern-create-rgb.returns"></a><h4>Returns</h4> | |
680 <p> the newly created <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> if successful, or | |
681 an error pattern in case of no memory. The caller owns the | |
682 returned object and should call <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> when | |
683 finished with it.</p> | |
684 <p>This function will always return a valid pointer, but if an error | |
685 occurred the pattern status will be set to an error. To inspect | |
686 the status of a pattern use <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-status" title="cairo_pattern_status ()"><code class="function">cairo_pattern_status()</code></a>.</p> | |
687 </div> | |
688 <p class="since">Since: 1.0</p> | |
689 </div> | |
690 <hr> | |
691 <div class="refsect2"> | |
692 <a name="cairo-pattern-create-rgba"></a><h3>cairo_pattern_create_rgba ()</h3> | |
693 <pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
694 cairo_pattern_create_rgba (<em class="parameter"><code><span class="type">double</span> red</code></em>, | |
695 <em class="parameter"><code><span class="type">double</span> green</code></em>, | |
696 <em class="parameter"><code><span class="type">double</span> blue</code></em>, | |
697 <em class="parameter"><code><span class="type">double</span> alpha</code></em>);</pre> | |
698 <p>Creates a new <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> corresponding to a translucent color. | |
699 The color components are floating point numbers in the range 0 to</p> | |
700 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>If the values passed in are outside that range, they will be | |
701 clamped.</p></li></ol></div> | |
702 <div class="refsect3"> | |
703 <a name="cairo-pattern-create-rgba.parameters"></a><h4>Parameters</h4> | |
704 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
705 <colgroup> | |
706 <col width="150px" class="parameters_name"> | |
707 <col class="parameters_description"> | |
708 <col width="200px" class="parameters_annotations"> | |
709 </colgroup> | |
710 <tbody> | |
711 <tr> | |
712 <td class="parameter_name"><p>red</p></td> | |
713 <td class="parameter_description"><p>red component of the color</p></td> | |
714 <td class="parameter_annotations"> </td> | |
715 </tr> | |
716 <tr> | |
717 <td class="parameter_name"><p>green</p></td> | |
718 <td class="parameter_description"><p>green component of the color</p></td> | |
719 <td class="parameter_annotations"> </td> | |
720 </tr> | |
721 <tr> | |
722 <td class="parameter_name"><p>blue</p></td> | |
723 <td class="parameter_description"><p>blue component of the color</p></td> | |
724 <td class="parameter_annotations"> </td> | |
725 </tr> | |
726 <tr> | |
727 <td class="parameter_name"><p>alpha</p></td> | |
728 <td class="parameter_description"><p>alpha component of the color</p></td> | |
729 <td class="parameter_annotations"> </td> | |
730 </tr> | |
731 </tbody> | |
732 </table></div> | |
733 </div> | |
734 <div class="refsect3"> | |
735 <a name="cairo-pattern-create-rgba.returns"></a><h4>Returns</h4> | |
736 <p> the newly created <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> if successful, or | |
737 an error pattern in case of no memory. The caller owns the | |
738 returned object and should call <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> when | |
739 finished with it.</p> | |
740 <p>This function will always return a valid pointer, but if an error | |
741 occurred the pattern status will be set to an error. To inspect | |
742 the status of a pattern use <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-status" title="cairo_pattern_status ()"><code class="function">cairo_pattern_status()</code></a>.</p> | |
743 </div> | |
744 <p class="since">Since: 1.0</p> | |
745 </div> | |
746 <hr> | |
747 <div class="refsect2"> | |
748 <a name="cairo-pattern-get-rgba"></a><h3>cairo_pattern_get_rgba ()</h3> | |
749 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
750 cairo_pattern_get_rgba (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
751 <em class="parameter"><code><span class="type">double</span> *red</code></em>, | |
752 <em class="parameter"><code><span class="type">double</span> *green</code></em>, | |
753 <em class="parameter"><code><span class="type">double</span> *blue</code></em>, | |
754 <em class="parameter"><code><span class="type">double</span> *alpha</code></em>);</pre> | |
755 <p>Gets the solid color for a solid color pattern.</p> | |
756 <div class="refsect3"> | |
757 <a name="cairo-pattern-get-rgba.parameters"></a><h4>Parameters</h4> | |
758 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
759 <colgroup> | |
760 <col width="150px" class="parameters_name"> | |
761 <col class="parameters_description"> | |
762 <col width="200px" class="parameters_annotations"> | |
763 </colgroup> | |
764 <tbody> | |
765 <tr> | |
766 <td class="parameter_name"><p>pattern</p></td> | |
767 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
768 <td class="parameter_annotations"> </td> | |
769 </tr> | |
770 <tr> | |
771 <td class="parameter_name"><p>red</p></td> | |
772 <td class="parameter_description"><p>return value for red component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
773 <td class="parameter_annotations"> </td> | |
774 </tr> | |
775 <tr> | |
776 <td class="parameter_name"><p>green</p></td> | |
777 <td class="parameter_description"><p>return value for green component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
778 <td class="parameter_annotations"> </td> | |
779 </tr> | |
780 <tr> | |
781 <td class="parameter_name"><p>blue</p></td> | |
782 <td class="parameter_description"><p>return value for blue component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
783 <td class="parameter_annotations"> </td> | |
784 </tr> | |
785 <tr> | |
786 <td class="parameter_name"><p>alpha</p></td> | |
787 <td class="parameter_description"><p>return value for alpha component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
788 <td class="parameter_annotations"> </td> | |
789 </tr> | |
790 </tbody> | |
791 </table></div> | |
792 </div> | |
793 <div class="refsect3"> | |
794 <a name="cairo-pattern-get-rgba.returns"></a><h4>Returns</h4> | |
795 <p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or | |
796 <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 | |
797 color pattern.</p> | |
798 </div> | |
799 <p class="since">Since: 1.4</p> | |
800 </div> | |
801 <hr> | |
802 <div class="refsect2"> | |
803 <a name="cairo-pattern-create-for-surface"></a><h3>cairo_pattern_create_for_surface ()</h3> | |
804 <pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
805 cairo_pattern_create_for_surface (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre> | |
806 <p>Create a new <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> for the given surface.</p> | |
807 <div class="refsect3"> | |
808 <a name="cairo-pattern-create-for-surface.parameters"></a><h4>Parameters</h4> | |
809 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
810 <colgroup> | |
811 <col width="150px" class="parameters_name"> | |
812 <col class="parameters_description"> | |
813 <col width="200px" class="parameters_annotations"> | |
814 </colgroup> | |
815 <tbody><tr> | |
816 <td class="parameter_name"><p>surface</p></td> | |
817 <td class="parameter_description"><p>the surface</p></td> | |
818 <td class="parameter_annotations"> </td> | |
819 </tr></tbody> | |
820 </table></div> | |
821 </div> | |
822 <div class="refsect3"> | |
823 <a name="cairo-pattern-create-for-surface.returns"></a><h4>Returns</h4> | |
824 <p> the newly created <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> if successful, or | |
825 an error pattern in case of no memory. The caller owns the | |
826 returned object and should call <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> when | |
827 finished with it.</p> | |
828 <p>This function will always return a valid pointer, but if an error | |
829 occurred the pattern status will be set to an error. To inspect | |
830 the status of a pattern use <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-status" title="cairo_pattern_status ()"><code class="function">cairo_pattern_status()</code></a>.</p> | |
831 </div> | |
832 <p class="since">Since: 1.0</p> | |
833 </div> | |
834 <hr> | |
835 <div class="refsect2"> | |
836 <a name="cairo-pattern-get-surface"></a><h3>cairo_pattern_get_surface ()</h3> | |
837 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
838 cairo_pattern_get_surface (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
839 <em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> **surface</code></em>);</pre> | |
840 <p>Gets the surface of a surface pattern. The reference returned in | |
841 <em class="parameter"><code>surface</code></em> | |
842 is owned by the pattern; the caller should call | |
843 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference" title="cairo_surface_reference ()"><code class="function">cairo_surface_reference()</code></a> if the surface is to be retained.</p> | |
844 <div class="refsect3"> | |
845 <a name="cairo-pattern-get-surface.parameters"></a><h4>Parameters</h4> | |
846 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
847 <colgroup> | |
848 <col width="150px" class="parameters_name"> | |
849 <col class="parameters_description"> | |
850 <col width="200px" class="parameters_annotations"> | |
851 </colgroup> | |
852 <tbody> | |
853 <tr> | |
854 <td class="parameter_name"><p>pattern</p></td> | |
855 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
856 <td class="parameter_annotations"> </td> | |
857 </tr> | |
858 <tr> | |
859 <td class="parameter_name"><p>surface</p></td> | |
860 <td class="parameter_description"><p>return value for surface of pattern, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
861 <td class="parameter_annotations"> </td> | |
862 </tr> | |
863 </tbody> | |
864 </table></div> | |
865 </div> | |
866 <div class="refsect3"> | |
867 <a name="cairo-pattern-get-surface.returns"></a><h4>Returns</h4> | |
868 <p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or | |
869 <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 | |
870 pattern.</p> | |
871 </div> | |
872 <p class="since">Since: 1.4</p> | |
873 </div> | |
874 <hr> | |
875 <div class="refsect2"> | |
876 <a name="cairo-pattern-create-linear"></a><h3>cairo_pattern_create_linear ()</h3> | |
877 <pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
878 cairo_pattern_create_linear (<em class="parameter"><code><span class="type">double</span> x0</code></em>, | |
879 <em class="parameter"><code><span class="type">double</span> y0</code></em>, | |
880 <em class="parameter"><code><span class="type">double</span> x1</code></em>, | |
881 <em class="parameter"><code><span class="type">double</span> y1</code></em>);</pre> | |
882 <p>Create a new linear gradient <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> along the line defined | |
883 by (x0, y0) and (x1, y1). Before using the gradient pattern, a | |
884 number of color stops should be defined using | |
885 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-add-color-stop-rgb" title="cairo_pattern_add_color_stop_rgb ()"><code class="function">cairo_pattern_add_color_stop_rgb()</code></a> or | |
886 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-add-color-stop-rgba" title="cairo_pattern_add_color_stop_rgba ()"><code class="function">cairo_pattern_add_color_stop_rgba()</code></a>.</p> | |
887 <p>Note: The coordinates here are in pattern space. For a new pattern, | |
888 pattern space is identical to user space, but the relationship | |
889 between the spaces can be changed with <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-matrix" title="cairo_pattern_set_matrix ()"><code class="function">cairo_pattern_set_matrix()</code></a>.</p> | |
890 <div class="refsect3"> | |
891 <a name="cairo-pattern-create-linear.parameters"></a><h4>Parameters</h4> | |
892 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
893 <colgroup> | |
894 <col width="150px" class="parameters_name"> | |
895 <col class="parameters_description"> | |
896 <col width="200px" class="parameters_annotations"> | |
897 </colgroup> | |
898 <tbody> | |
899 <tr> | |
900 <td class="parameter_name"><p>x0</p></td> | |
901 <td class="parameter_description"><p>x coordinate of the start point</p></td> | |
902 <td class="parameter_annotations"> </td> | |
903 </tr> | |
904 <tr> | |
905 <td class="parameter_name"><p>y0</p></td> | |
906 <td class="parameter_description"><p>y coordinate of the start point</p></td> | |
907 <td class="parameter_annotations"> </td> | |
908 </tr> | |
909 <tr> | |
910 <td class="parameter_name"><p>x1</p></td> | |
911 <td class="parameter_description"><p>x coordinate of the end point</p></td> | |
912 <td class="parameter_annotations"> </td> | |
913 </tr> | |
914 <tr> | |
915 <td class="parameter_name"><p>y1</p></td> | |
916 <td class="parameter_description"><p>y coordinate of the end point</p></td> | |
917 <td class="parameter_annotations"> </td> | |
918 </tr> | |
919 </tbody> | |
920 </table></div> | |
921 </div> | |
922 <div class="refsect3"> | |
923 <a name="cairo-pattern-create-linear.returns"></a><h4>Returns</h4> | |
924 <p> the newly created <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> if successful, or | |
925 an error pattern in case of no memory. The caller owns the | |
926 returned object and should call <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> when | |
927 finished with it.</p> | |
928 <p>This function will always return a valid pointer, but if an error | |
929 occurred the pattern status will be set to an error. To inspect | |
930 the status of a pattern use <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-status" title="cairo_pattern_status ()"><code class="function">cairo_pattern_status()</code></a>.</p> | |
931 </div> | |
932 <p class="since">Since: 1.0</p> | |
933 </div> | |
934 <hr> | |
935 <div class="refsect2"> | |
936 <a name="cairo-pattern-get-linear-points"></a><h3>cairo_pattern_get_linear_points ()</h3> | |
937 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
938 cairo_pattern_get_linear_points (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
939 <em class="parameter"><code><span class="type">double</span> *x0</code></em>, | |
940 <em class="parameter"><code><span class="type">double</span> *y0</code></em>, | |
941 <em class="parameter"><code><span class="type">double</span> *x1</code></em>, | |
942 <em class="parameter"><code><span class="type">double</span> *y1</code></em>);</pre> | |
943 <p>Gets the gradient endpoints for a linear gradient.</p> | |
944 <div class="refsect3"> | |
945 <a name="cairo-pattern-get-linear-points.parameters"></a><h4>Parameters</h4> | |
946 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
947 <colgroup> | |
948 <col width="150px" class="parameters_name"> | |
949 <col class="parameters_description"> | |
950 <col width="200px" class="parameters_annotations"> | |
951 </colgroup> | |
952 <tbody> | |
953 <tr> | |
954 <td class="parameter_name"><p>pattern</p></td> | |
955 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
956 <td class="parameter_annotations"> </td> | |
957 </tr> | |
958 <tr> | |
959 <td class="parameter_name"><p>x0</p></td> | |
960 <td class="parameter_description"><p>return value for the x coordinate of the first point, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
961 <td class="parameter_annotations"> </td> | |
962 </tr> | |
963 <tr> | |
964 <td class="parameter_name"><p>y0</p></td> | |
965 <td class="parameter_description"><p>return value for the y coordinate of the first point, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
966 <td class="parameter_annotations"> </td> | |
967 </tr> | |
968 <tr> | |
969 <td class="parameter_name"><p>x1</p></td> | |
970 <td class="parameter_description"><p>return value for the x coordinate of the second point, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
971 <td class="parameter_annotations"> </td> | |
972 </tr> | |
973 <tr> | |
974 <td class="parameter_name"><p>y1</p></td> | |
975 <td class="parameter_description"><p>return value for the y coordinate of the second point, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
976 <td class="parameter_annotations"> </td> | |
977 </tr> | |
978 </tbody> | |
979 </table></div> | |
980 </div> | |
981 <div class="refsect3"> | |
982 <a name="cairo-pattern-get-linear-points.returns"></a><h4>Returns</h4> | |
983 <p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or | |
984 <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> | |
985 is not a linear | |
986 gradient pattern.</p> | |
987 </div> | |
988 <p class="since">Since: 1.4</p> | |
989 </div> | |
990 <hr> | |
991 <div class="refsect2"> | |
992 <a name="cairo-pattern-create-radial"></a><h3>cairo_pattern_create_radial ()</h3> | |
993 <pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
994 cairo_pattern_create_radial (<em class="parameter"><code><span class="type">double</span> cx0</code></em>, | |
995 <em class="parameter"><code><span class="type">double</span> cy0</code></em>, | |
996 <em class="parameter"><code><span class="type">double</span> radius0</code></em>, | |
997 <em class="parameter"><code><span class="type">double</span> cx1</code></em>, | |
998 <em class="parameter"><code><span class="type">double</span> cy1</code></em>, | |
999 <em class="parameter"><code><span class="type">double</span> radius1</code></em>);</pre> | |
1000 <p>Creates a new radial gradient <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> between the two | |
1001 circles defined by (cx0, cy0, radius0) and (cx1, cy1, radius1). Before using the | |
1002 gradient pattern, a number of color stops should be defined using | |
1003 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-add-color-stop-rgb" title="cairo_pattern_add_color_stop_rgb ()"><code class="function">cairo_pattern_add_color_stop_rgb()</code></a> or | |
1004 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-add-color-stop-rgba" title="cairo_pattern_add_color_stop_rgba ()"><code class="function">cairo_pattern_add_color_stop_rgba()</code></a>.</p> | |
1005 <p>Note: The coordinates here are in pattern space. For a new pattern, | |
1006 pattern space is identical to user space, but the relationship | |
1007 between the spaces can be changed with <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-matrix" title="cairo_pattern_set_matrix ()"><code class="function">cairo_pattern_set_matrix()</code></a>.</p> | |
1008 <div class="refsect3"> | |
1009 <a name="cairo-pattern-create-radial.parameters"></a><h4>Parameters</h4> | |
1010 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1011 <colgroup> | |
1012 <col width="150px" class="parameters_name"> | |
1013 <col class="parameters_description"> | |
1014 <col width="200px" class="parameters_annotations"> | |
1015 </colgroup> | |
1016 <tbody> | |
1017 <tr> | |
1018 <td class="parameter_name"><p>cx0</p></td> | |
1019 <td class="parameter_description"><p>x coordinate for the center of the start circle</p></td> | |
1020 <td class="parameter_annotations"> </td> | |
1021 </tr> | |
1022 <tr> | |
1023 <td class="parameter_name"><p>cy0</p></td> | |
1024 <td class="parameter_description"><p>y coordinate for the center of the start circle</p></td> | |
1025 <td class="parameter_annotations"> </td> | |
1026 </tr> | |
1027 <tr> | |
1028 <td class="parameter_name"><p>radius0</p></td> | |
1029 <td class="parameter_description"><p>radius of the start circle</p></td> | |
1030 <td class="parameter_annotations"> </td> | |
1031 </tr> | |
1032 <tr> | |
1033 <td class="parameter_name"><p>cx1</p></td> | |
1034 <td class="parameter_description"><p>x coordinate for the center of the end circle</p></td> | |
1035 <td class="parameter_annotations"> </td> | |
1036 </tr> | |
1037 <tr> | |
1038 <td class="parameter_name"><p>cy1</p></td> | |
1039 <td class="parameter_description"><p>y coordinate for the center of the end circle</p></td> | |
1040 <td class="parameter_annotations"> </td> | |
1041 </tr> | |
1042 <tr> | |
1043 <td class="parameter_name"><p>radius1</p></td> | |
1044 <td class="parameter_description"><p>radius of the end circle</p></td> | |
1045 <td class="parameter_annotations"> </td> | |
1046 </tr> | |
1047 </tbody> | |
1048 </table></div> | |
1049 </div> | |
1050 <div class="refsect3"> | |
1051 <a name="cairo-pattern-create-radial.returns"></a><h4>Returns</h4> | |
1052 <p> the newly created <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> if successful, or | |
1053 an error pattern in case of no memory. The caller owns the | |
1054 returned object and should call <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> when | |
1055 finished with it.</p> | |
1056 <p>This function will always return a valid pointer, but if an error | |
1057 occurred the pattern status will be set to an error. To inspect | |
1058 the status of a pattern use <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-status" title="cairo_pattern_status ()"><code class="function">cairo_pattern_status()</code></a>.</p> | |
1059 </div> | |
1060 <p class="since">Since: 1.0</p> | |
1061 </div> | |
1062 <hr> | |
1063 <div class="refsect2"> | |
1064 <a name="cairo-pattern-get-radial-circles"></a><h3>cairo_pattern_get_radial_circles ()</h3> | |
1065 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
1066 cairo_pattern_get_radial_circles (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1067 <em class="parameter"><code><span class="type">double</span> *x0</code></em>, | |
1068 <em class="parameter"><code><span class="type">double</span> *y0</code></em>, | |
1069 <em class="parameter"><code><span class="type">double</span> *r0</code></em>, | |
1070 <em class="parameter"><code><span class="type">double</span> *x1</code></em>, | |
1071 <em class="parameter"><code><span class="type">double</span> *y1</code></em>, | |
1072 <em class="parameter"><code><span class="type">double</span> *r1</code></em>);</pre> | |
1073 <p>Gets the gradient endpoint circles for a radial gradient, each | |
1074 specified as a center coordinate and a radius.</p> | |
1075 <div class="refsect3"> | |
1076 <a name="cairo-pattern-get-radial-circles.parameters"></a><h4>Parameters</h4> | |
1077 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1078 <colgroup> | |
1079 <col width="150px" class="parameters_name"> | |
1080 <col class="parameters_description"> | |
1081 <col width="200px" class="parameters_annotations"> | |
1082 </colgroup> | |
1083 <tbody> | |
1084 <tr> | |
1085 <td class="parameter_name"><p>pattern</p></td> | |
1086 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1087 <td class="parameter_annotations"> </td> | |
1088 </tr> | |
1089 <tr> | |
1090 <td class="parameter_name"><p>x0</p></td> | |
1091 <td class="parameter_description"><p>return value for the x coordinate of the center of the first circle, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1092 <td class="parameter_annotations"> </td> | |
1093 </tr> | |
1094 <tr> | |
1095 <td class="parameter_name"><p>y0</p></td> | |
1096 <td class="parameter_description"><p>return value for the y coordinate of the center of the first circle, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1097 <td class="parameter_annotations"> </td> | |
1098 </tr> | |
1099 <tr> | |
1100 <td class="parameter_name"><p>r0</p></td> | |
1101 <td class="parameter_description"><p>return value for the radius of the first circle, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1102 <td class="parameter_annotations"> </td> | |
1103 </tr> | |
1104 <tr> | |
1105 <td class="parameter_name"><p>x1</p></td> | |
1106 <td class="parameter_description"><p>return value for the x coordinate of the center of the second circle, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1107 <td class="parameter_annotations"> </td> | |
1108 </tr> | |
1109 <tr> | |
1110 <td class="parameter_name"><p>y1</p></td> | |
1111 <td class="parameter_description"><p>return value for the y coordinate of the center of the second circle, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1112 <td class="parameter_annotations"> </td> | |
1113 </tr> | |
1114 <tr> | |
1115 <td class="parameter_name"><p>r1</p></td> | |
1116 <td class="parameter_description"><p>return value for the radius of the second circle, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1117 <td class="parameter_annotations"> </td> | |
1118 </tr> | |
1119 </tbody> | |
1120 </table></div> | |
1121 </div> | |
1122 <div class="refsect3"> | |
1123 <a name="cairo-pattern-get-radial-circles.returns"></a><h4>Returns</h4> | |
1124 <p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or | |
1125 <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> | |
1126 is not a radial | |
1127 gradient pattern.</p> | |
1128 </div> | |
1129 <p class="since">Since: 1.4</p> | |
1130 </div> | |
1131 <hr> | |
1132 <div class="refsect2"> | |
1133 <a name="cairo-pattern-create-mesh"></a><h3>cairo_pattern_create_mesh ()</h3> | |
1134 <pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
1135 cairo_pattern_create_mesh (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> | |
1136 <p>Create a new mesh pattern.</p> | |
1137 <p>Mesh patterns are tensor-product patch meshes (type 7 shadings in | |
1138 PDF). Mesh patterns may also be used to create other types of | |
1139 shadings that are special cases of tensor-product patch meshes such | |
1140 as Coons patch meshes (type 6 shading in PDF) and Gouraud-shaded | |
1141 triangle meshes (type 4 and 5 shadings in PDF).</p> | |
1142 <p>Mesh patterns consist of one or more tensor-product patches, which | |
1143 should be defined before using the mesh pattern. Using a mesh | |
1144 pattern with a partially defined patch as source or mask will put | |
1145 the context in an error status with a status of | |
1146 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.</p> | |
1147 <p>A tensor-product patch is defined by 4 Bézier curves (side 0, 1, 2, | |
1148 3) and by 4 additional control points (P0, P1, P2, P3) that provide | |
1149 further control over the patch and complete the definition of the | |
1150 tensor-product patch. The corner C0 is the first point of the | |
1151 patch.</p> | |
1152 <p>Degenerate sides are permitted so straight lines may be used. A | |
1153 zero length line on one side may be used to create 3 sided patches.</p> | |
1154 <div class="informalexample"><pre class="screen"> | |
1155 C1 Side 1 C2 | |
1156 +---------------+ | |
1157 | | | |
1158 | P1 P2 | | |
1159 | | | |
1160 Side 0 | | Side 2 | |
1161 | | | |
1162 | | | |
1163 | P0 P3 | | |
1164 | | | |
1165 +---------------+ | |
1166 C0 Side 3 C3 | |
1167 </pre></div> | |
1168 <p>Each patch is constructed by first calling | |
1169 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-begin-patch" title="cairo_mesh_pattern_begin_patch ()"><code class="function">cairo_mesh_pattern_begin_patch()</code></a>, then <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-move-to" title="cairo_mesh_pattern_move_to ()"><code class="function">cairo_mesh_pattern_move_to()</code></a> | |
1170 to specify the first point in the patch (C0). Then the sides are | |
1171 specified with calls to <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-curve-to" title="cairo_mesh_pattern_curve_to ()"><code class="function">cairo_mesh_pattern_curve_to()</code></a> and | |
1172 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-line-to" title="cairo_mesh_pattern_line_to ()"><code class="function">cairo_mesh_pattern_line_to()</code></a>.</p> | |
1173 <p>The four additional control points (P0, P1, P2, P3) in a patch can | |
1174 be specified with <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-control-point" title="cairo_mesh_pattern_set_control_point ()"><code class="function">cairo_mesh_pattern_set_control_point()</code></a>.</p> | |
1175 <p>At each corner of the patch (C0, C1, C2, C3) a color may be | |
1176 specified with <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgb" title="cairo_mesh_pattern_set_corner_color_rgb ()"><code class="function">cairo_mesh_pattern_set_corner_color_rgb()</code></a> or | |
1177 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgba" title="cairo_mesh_pattern_set_corner_color_rgba ()"><code class="function">cairo_mesh_pattern_set_corner_color_rgba()</code></a>. Any corner whose color | |
1178 is not explicitly specified defaults to transparent black.</p> | |
1179 <p>A Coons patch is a special case of the tensor-product patch where | |
1180 the control points are implicitly defined by the sides of the | |
1181 patch. The default value for any control point not specified is the | |
1182 implicit value for a Coons patch, i.e. if no control points are | |
1183 specified the patch is a Coons patch.</p> | |
1184 <p>A triangle is a special case of the tensor-product patch where the | |
1185 control points are implicitly defined by the sides of the patch, | |
1186 all the sides are lines and one of them has length 0, i.e. if the | |
1187 patch is specified using just 3 lines, it is a triangle. If the | |
1188 corners connected by the 0-length side have the same color, the | |
1189 patch is a Gouraud-shaded triangle.</p> | |
1190 <p>Patches may be oriented differently to the above diagram. For | |
1191 example the first point could be at the top left. The diagram only | |
1192 shows the relationship between the sides, corners and control | |
1193 points. Regardless of where the first point is located, when | |
1194 specifying colors, corner 0 will always be the first point, corner | |
1195 1 the point between side 0 and side 1 etc.</p> | |
1196 <p>Calling <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-end-patch" title="cairo_mesh_pattern_end_patch ()"><code class="function">cairo_mesh_pattern_end_patch()</code></a> completes the current | |
1197 patch. If less than 4 sides have been defined, the first missing | |
1198 side is defined as a line from the current point to the first point | |
1199 of the patch (C0) and the other sides are degenerate lines from C0 | |
1200 to C0. The corners between the added sides will all be coincident | |
1201 with C0 of the patch and their color will be set to be the same as | |
1202 the color of C0.</p> | |
1203 <p>Additional patches may be added with additional calls to | |
1204 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-begin-patch" title="cairo_mesh_pattern_begin_patch ()"><code class="function">cairo_mesh_pattern_begin_patch()</code></a>/<a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-end-patch" title="cairo_mesh_pattern_end_patch ()"><code class="function">cairo_mesh_pattern_end_patch()</code></a>.</p> | |
1205 <div class="informalexample"> | |
1206 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> | |
1207 <tbody> | |
1208 <tr> | |
1209 <td class="listing_lines" align="right"><pre>1 | |
1210 2 | |
1211 3 | |
1212 4 | |
1213 5 | |
1214 6 | |
1215 7 | |
1216 8 | |
1217 9 | |
1218 10 | |
1219 11 | |
1220 12 | |
1221 13 | |
1222 14 | |
1223 15 | |
1224 16 | |
1225 17 | |
1226 18 | |
1227 19 | |
1228 20 | |
1229 21 | |
1230 22 | |
1231 23 | |
1232 24</pre></td> | |
1233 <td class="listing_code"><pre class="programlisting">cairo_pattern_t <span class="gtkdoc opt">*</span>pattern <span class="gtkdoc opt">=</span> <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh">cairo_pattern_create_mesh</a></span> <span class="gtkdoc opt">();</span> | |
1234 | |
1235 <span class="comment">/* Add a Coons patch */</span> | |
1236 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-begin-patch">cairo_mesh_pattern_begin_patch</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">);</span> | |
1237 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-move-to">cairo_mesh_pattern_move_to</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span> | |
1238 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-curve-to">cairo_mesh_pattern_curve_to</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">30</span><span class="gtkdoc opt">, -</span><span class="number">30</span><span class="gtkdoc opt">,</span> <span class="number">60</span><span class="gtkdoc opt">,</span> <span class="number">30</span><span class="gtkdoc opt">,</span> <span class="number">100</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span> | |
1239 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-curve-to">cairo_mesh_pattern_curve_to</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">60</span><span class="gtkdoc opt">,</span> <span class="number">30</span><span class="gtkdoc opt">,</span> <span class="number">130</span><span class="gtkdoc opt">,</span> <span class="number">60</span><span class="gtkdoc opt">,</span> <span class="number">100</span><span class="gtkdoc opt">,</span> <span class="number">100</span><span class="gtkdoc opt">);</span> | |
1240 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-curve-to">cairo_mesh_pattern_curve_to</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">60</span><span class="gtkdoc opt">,</span> <span class="number">70</span><span class="gtkdoc opt">,</span> <span class="number">30</span><span class="gtkdoc opt">,</span> <span class="number">130</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">100</span><span class="gtkdoc opt">);</span> | |
1241 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-curve-to">cairo_mesh_pattern_curve_to</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">30</span><span class="gtkdoc opt">,</span> <span class="number">70</span><span class="gtkdoc opt">, -</span><span class="number">30</span><span class="gtkdoc opt">,</span> <span class="number">30</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span> | |
1242 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgb">cairo_mesh_pattern_set_corner_color_rgb</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span> | |
1243 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgb">cairo_mesh_pattern_set_corner_color_rgb</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span> | |
1244 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgb">cairo_mesh_pattern_set_corner_color_rgb</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">2</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">);</span> | |
1245 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgb">cairo_mesh_pattern_set_corner_color_rgb</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">3</span><span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span> | |
1246 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-end-patch">cairo_mesh_pattern_end_patch</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">);</span> | |
1247 | |
1248 <span class="comment">/* Add a Gouraud-shaded triangle */</span> | |
1249 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-begin-patch">cairo_mesh_pattern_begin_patch</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">)</span> | |
1250 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-move-to">cairo_mesh_pattern_move_to</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">100</span><span class="gtkdoc opt">,</span> <span class="number">100</span><span class="gtkdoc opt">);</span> | |
1251 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-line-to">cairo_mesh_pattern_line_to</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">130</span><span class="gtkdoc opt">,</span> <span class="number">130</span><span class="gtkdoc opt">);</span> | |
1252 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-line-to">cairo_mesh_pattern_line_to</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">130</span><span class="gtkdoc opt">,</span> <span class="number">70</span><span class="gtkdoc opt">);</span> | |
1253 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgb">cairo_mesh_pattern_set_corner_color_rgb</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span> | |
1254 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgb">cairo_mesh_pattern_set_corner_color_rgb</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span> | |
1255 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgb">cairo_mesh_pattern_set_corner_color_rgb</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">,</span> <span class="number">2</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">);</span> | |
1256 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-end-patch">cairo_mesh_pattern_end_patch</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">)</span></pre></td> | |
1257 </tr> | |
1258 </tbody> | |
1259 </table> | |
1260 </div> | |
1261 | |
1262 <p>When two patches overlap, the last one that has been added is drawn | |
1263 over the first one.</p> | |
1264 <p>When a patch folds over itself, points are sorted depending on | |
1265 their parameter coordinates inside the patch. The v coordinate | |
1266 ranges from 0 to 1 when moving from side 3 to side 1; the u | |
1267 coordinate ranges from 0 to 1 when going from side 0 to side</p> | |
1268 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Points with higher v coordinate hide points with lower v | |
1269 coordinate. When two points have the same v coordinate, the one | |
1270 with higher u coordinate is above. This means that points nearer to | |
1271 side 1 are above points nearer to side 3; when this is not | |
1272 sufficient to decide which point is above (for example when both | |
1273 points belong to side 1 or side 3) points nearer to side 2 are | |
1274 above points nearer to side 0.</p></li></ol></div> | |
1275 <p>For a complete definition of tensor-product patches, see the PDF | |
1276 specification (ISO32000), which describes the parametrization in | |
1277 detail.</p> | |
1278 <p>Note: The coordinates are always in pattern space. For a new | |
1279 pattern, pattern space is identical to user space, but the | |
1280 relationship between the spaces can be changed with | |
1281 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-matrix" title="cairo_pattern_set_matrix ()"><code class="function">cairo_pattern_set_matrix()</code></a>.</p> | |
1282 <div class="refsect3"> | |
1283 <a name="cairo-pattern-create-mesh.returns"></a><h4>Returns</h4> | |
1284 <p> the newly created <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> if successful, or | |
1285 an error pattern in case of no memory. The caller owns the returned | |
1286 object and should call <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> when finished with | |
1287 it.</p> | |
1288 <p>This function will always return a valid pointer, but if an error | |
1289 occurred the pattern status will be set to an error. To inspect the | |
1290 status of a pattern use <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-status" title="cairo_pattern_status ()"><code class="function">cairo_pattern_status()</code></a>.</p> | |
1291 </div> | |
1292 <p class="since">Since: 1.12</p> | |
1293 </div> | |
1294 <hr> | |
1295 <div class="refsect2"> | |
1296 <a name="cairo-mesh-pattern-begin-patch"></a><h3>cairo_mesh_pattern_begin_patch ()</h3> | |
1297 <pre class="programlisting"><span class="returnvalue">void</span> | |
1298 cairo_mesh_pattern_begin_patch (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre> | |
1299 <p>Begin a patch in a mesh pattern.</p> | |
1300 <p>After calling this function, the patch shape should be defined with | |
1301 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-move-to" title="cairo_mesh_pattern_move_to ()"><code class="function">cairo_mesh_pattern_move_to()</code></a>, <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-line-to" title="cairo_mesh_pattern_line_to ()"><code class="function">cairo_mesh_pattern_line_to()</code></a> and | |
1302 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-curve-to" title="cairo_mesh_pattern_curve_to ()"><code class="function">cairo_mesh_pattern_curve_to()</code></a>.</p> | |
1303 <p>After defining the patch, <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-end-patch" title="cairo_mesh_pattern_end_patch ()"><code class="function">cairo_mesh_pattern_end_patch()</code></a> must be | |
1304 called before using <em class="parameter"><code>pattern</code></em> | |
1305 as a source or mask.</p> | |
1306 <p>Note: If <em class="parameter"><code>pattern</code></em> | |
1307 is not a mesh pattern then <em class="parameter"><code>pattern</code></em> | |
1308 will be put | |
1309 into an error status with a status of | |
1310 <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> | |
1311 already has a | |
1312 current patch, it will be put into an error status with a status of | |
1313 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.</p> | |
1314 <div class="refsect3"> | |
1315 <a name="cairo-mesh-pattern-begin-patch.parameters"></a><h4>Parameters</h4> | |
1316 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1317 <colgroup> | |
1318 <col width="150px" class="parameters_name"> | |
1319 <col class="parameters_description"> | |
1320 <col width="200px" class="parameters_annotations"> | |
1321 </colgroup> | |
1322 <tbody><tr> | |
1323 <td class="parameter_name"><p>pattern</p></td> | |
1324 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1325 <td class="parameter_annotations"> </td> | |
1326 </tr></tbody> | |
1327 </table></div> | |
1328 </div> | |
1329 <p class="since">Since: 1.12</p> | |
1330 </div> | |
1331 <hr> | |
1332 <div class="refsect2"> | |
1333 <a name="cairo-mesh-pattern-end-patch"></a><h3>cairo_mesh_pattern_end_patch ()</h3> | |
1334 <pre class="programlisting"><span class="returnvalue">void</span> | |
1335 cairo_mesh_pattern_end_patch (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre> | |
1336 <p>Indicates the end of the current patch in a mesh pattern.</p> | |
1337 <p>If the current patch has less than 4 sides, it is closed with a | |
1338 straight line from the current point to the first point of the | |
1339 patch as if <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-line-to" title="cairo_mesh_pattern_line_to ()"><code class="function">cairo_mesh_pattern_line_to()</code></a> was used.</p> | |
1340 <p>Note: If <em class="parameter"><code>pattern</code></em> | |
1341 is not a mesh pattern then <em class="parameter"><code>pattern</code></em> | |
1342 will be put | |
1343 into an error status with a status of | |
1344 <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> | |
1345 has no current | |
1346 patch or the current patch has no current point, <em class="parameter"><code>pattern</code></em> | |
1347 will be | |
1348 put into an error status with a status of | |
1349 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.</p> | |
1350 <div class="refsect3"> | |
1351 <a name="cairo-mesh-pattern-end-patch.parameters"></a><h4>Parameters</h4> | |
1352 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1353 <colgroup> | |
1354 <col width="150px" class="parameters_name"> | |
1355 <col class="parameters_description"> | |
1356 <col width="200px" class="parameters_annotations"> | |
1357 </colgroup> | |
1358 <tbody><tr> | |
1359 <td class="parameter_name"><p>pattern</p></td> | |
1360 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1361 <td class="parameter_annotations"> </td> | |
1362 </tr></tbody> | |
1363 </table></div> | |
1364 </div> | |
1365 <p class="since">Since: 1.12</p> | |
1366 </div> | |
1367 <hr> | |
1368 <div class="refsect2"> | |
1369 <a name="cairo-mesh-pattern-move-to"></a><h3>cairo_mesh_pattern_move_to ()</h3> | |
1370 <pre class="programlisting"><span class="returnvalue">void</span> | |
1371 cairo_mesh_pattern_move_to (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1372 <em class="parameter"><code><span class="type">double</span> x</code></em>, | |
1373 <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre> | |
1374 <p>Define the first point of the current patch in a mesh pattern.</p> | |
1375 <p>After this call the current point will be (<em class="parameter"><code>x</code></em> | |
1376 , <em class="parameter"><code>y</code></em> | |
1377 ).</p> | |
1378 <p>Note: If <em class="parameter"><code>pattern</code></em> | |
1379 is not a mesh pattern then <em class="parameter"><code>pattern</code></em> | |
1380 will be put | |
1381 into an error status with a status of | |
1382 <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> | |
1383 has no current | |
1384 patch or the current patch already has at least one side, <em class="parameter"><code>pattern</code></em> | |
1385 | |
1386 will be put into an error status with a status of | |
1387 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.</p> | |
1388 <div class="refsect3"> | |
1389 <a name="cairo-mesh-pattern-move-to.parameters"></a><h4>Parameters</h4> | |
1390 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1391 <colgroup> | |
1392 <col width="150px" class="parameters_name"> | |
1393 <col class="parameters_description"> | |
1394 <col width="200px" class="parameters_annotations"> | |
1395 </colgroup> | |
1396 <tbody> | |
1397 <tr> | |
1398 <td class="parameter_name"><p>pattern</p></td> | |
1399 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1400 <td class="parameter_annotations"> </td> | |
1401 </tr> | |
1402 <tr> | |
1403 <td class="parameter_name"><p>x</p></td> | |
1404 <td class="parameter_description"><p>the X coordinate of the new position</p></td> | |
1405 <td class="parameter_annotations"> </td> | |
1406 </tr> | |
1407 <tr> | |
1408 <td class="parameter_name"><p>y</p></td> | |
1409 <td class="parameter_description"><p>the Y coordinate of the new position</p></td> | |
1410 <td class="parameter_annotations"> </td> | |
1411 </tr> | |
1412 </tbody> | |
1413 </table></div> | |
1414 </div> | |
1415 <p class="since">Since: 1.12</p> | |
1416 </div> | |
1417 <hr> | |
1418 <div class="refsect2"> | |
1419 <a name="cairo-mesh-pattern-line-to"></a><h3>cairo_mesh_pattern_line_to ()</h3> | |
1420 <pre class="programlisting"><span class="returnvalue">void</span> | |
1421 cairo_mesh_pattern_line_to (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1422 <em class="parameter"><code><span class="type">double</span> x</code></em>, | |
1423 <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre> | |
1424 <p>Adds a line to the current patch from the current point to position | |
1425 (<em class="parameter"><code>x</code></em> | |
1426 , <em class="parameter"><code>y</code></em> | |
1427 ) in pattern-space coordinates.</p> | |
1428 <p>If there is no current point before the call to | |
1429 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-line-to" title="cairo_mesh_pattern_line_to ()"><code class="function">cairo_mesh_pattern_line_to()</code></a> this function will behave as | |
1430 cairo_mesh_pattern_move_to(<em class="parameter"><code>pattern</code></em> | |
1431 , <em class="parameter"><code>x</code></em> | |
1432 , <em class="parameter"><code>y</code></em> | |
1433 ).</p> | |
1434 <p>After this call the current point will be (<em class="parameter"><code>x</code></em> | |
1435 , <em class="parameter"><code>y</code></em> | |
1436 ).</p> | |
1437 <p>Note: If <em class="parameter"><code>pattern</code></em> | |
1438 is not a mesh pattern then <em class="parameter"><code>pattern</code></em> | |
1439 will be put | |
1440 into an error status with a status of | |
1441 <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> | |
1442 has no current | |
1443 patch or the current patch already has 4 sides, <em class="parameter"><code>pattern</code></em> | |
1444 will be | |
1445 put into an error status with a status of | |
1446 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.</p> | |
1447 <div class="refsect3"> | |
1448 <a name="cairo-mesh-pattern-line-to.parameters"></a><h4>Parameters</h4> | |
1449 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1450 <colgroup> | |
1451 <col width="150px" class="parameters_name"> | |
1452 <col class="parameters_description"> | |
1453 <col width="200px" class="parameters_annotations"> | |
1454 </colgroup> | |
1455 <tbody> | |
1456 <tr> | |
1457 <td class="parameter_name"><p>pattern</p></td> | |
1458 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1459 <td class="parameter_annotations"> </td> | |
1460 </tr> | |
1461 <tr> | |
1462 <td class="parameter_name"><p>x</p></td> | |
1463 <td class="parameter_description"><p>the X coordinate of the end of the new line</p></td> | |
1464 <td class="parameter_annotations"> </td> | |
1465 </tr> | |
1466 <tr> | |
1467 <td class="parameter_name"><p>y</p></td> | |
1468 <td class="parameter_description"><p>the Y coordinate of the end of the new line</p></td> | |
1469 <td class="parameter_annotations"> </td> | |
1470 </tr> | |
1471 </tbody> | |
1472 </table></div> | |
1473 </div> | |
1474 <p class="since">Since: 1.12</p> | |
1475 </div> | |
1476 <hr> | |
1477 <div class="refsect2"> | |
1478 <a name="cairo-mesh-pattern-curve-to"></a><h3>cairo_mesh_pattern_curve_to ()</h3> | |
1479 <pre class="programlisting"><span class="returnvalue">void</span> | |
1480 cairo_mesh_pattern_curve_to (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1481 <em class="parameter"><code><span class="type">double</span> x1</code></em>, | |
1482 <em class="parameter"><code><span class="type">double</span> y1</code></em>, | |
1483 <em class="parameter"><code><span class="type">double</span> x2</code></em>, | |
1484 <em class="parameter"><code><span class="type">double</span> y2</code></em>, | |
1485 <em class="parameter"><code><span class="type">double</span> x3</code></em>, | |
1486 <em class="parameter"><code><span class="type">double</span> y3</code></em>);</pre> | |
1487 <p>Adds a cubic Bézier spline to the current patch from the current | |
1488 point to position (<em class="parameter"><code>x3</code></em> | |
1489 , <em class="parameter"><code>y3</code></em> | |
1490 ) in pattern-space coordinates, using | |
1491 (<em class="parameter"><code>x1</code></em> | |
1492 , <em class="parameter"><code>y1</code></em> | |
1493 ) and (<em class="parameter"><code>x2</code></em> | |
1494 , <em class="parameter"><code>y2</code></em> | |
1495 ) as the control points.</p> | |
1496 <p>If the current patch has no current point before the call to | |
1497 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-curve-to" title="cairo_mesh_pattern_curve_to ()"><code class="function">cairo_mesh_pattern_curve_to()</code></a>, this function will behave as if | |
1498 preceded by a call to cairo_mesh_pattern_move_to(<em class="parameter"><code>pattern</code></em> | |
1499 , <em class="parameter"><code>x1</code></em> | |
1500 , | |
1501 <em class="parameter"><code>y1</code></em> | |
1502 ).</p> | |
1503 <p>After this call the current point will be (<em class="parameter"><code>x3</code></em> | |
1504 , <em class="parameter"><code>y3</code></em> | |
1505 ).</p> | |
1506 <p>Note: If <em class="parameter"><code>pattern</code></em> | |
1507 is not a mesh pattern then <em class="parameter"><code>pattern</code></em> | |
1508 will be put | |
1509 into an error status with a status of | |
1510 <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> | |
1511 has no current | |
1512 patch or the current patch already has 4 sides, <em class="parameter"><code>pattern</code></em> | |
1513 will be | |
1514 put into an error status with a status of | |
1515 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.</p> | |
1516 <div class="refsect3"> | |
1517 <a name="cairo-mesh-pattern-curve-to.parameters"></a><h4>Parameters</h4> | |
1518 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1519 <colgroup> | |
1520 <col width="150px" class="parameters_name"> | |
1521 <col class="parameters_description"> | |
1522 <col width="200px" class="parameters_annotations"> | |
1523 </colgroup> | |
1524 <tbody> | |
1525 <tr> | |
1526 <td class="parameter_name"><p>pattern</p></td> | |
1527 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1528 <td class="parameter_annotations"> </td> | |
1529 </tr> | |
1530 <tr> | |
1531 <td class="parameter_name"><p>x1</p></td> | |
1532 <td class="parameter_description"><p>the X coordinate of the first control point</p></td> | |
1533 <td class="parameter_annotations"> </td> | |
1534 </tr> | |
1535 <tr> | |
1536 <td class="parameter_name"><p>y1</p></td> | |
1537 <td class="parameter_description"><p>the Y coordinate of the first control point</p></td> | |
1538 <td class="parameter_annotations"> </td> | |
1539 </tr> | |
1540 <tr> | |
1541 <td class="parameter_name"><p>x2</p></td> | |
1542 <td class="parameter_description"><p>the X coordinate of the second control point</p></td> | |
1543 <td class="parameter_annotations"> </td> | |
1544 </tr> | |
1545 <tr> | |
1546 <td class="parameter_name"><p>y2</p></td> | |
1547 <td class="parameter_description"><p>the Y coordinate of the second control point</p></td> | |
1548 <td class="parameter_annotations"> </td> | |
1549 </tr> | |
1550 <tr> | |
1551 <td class="parameter_name"><p>x3</p></td> | |
1552 <td class="parameter_description"><p>the X coordinate of the end of the curve</p></td> | |
1553 <td class="parameter_annotations"> </td> | |
1554 </tr> | |
1555 <tr> | |
1556 <td class="parameter_name"><p>y3</p></td> | |
1557 <td class="parameter_description"><p>the Y coordinate of the end of the curve</p></td> | |
1558 <td class="parameter_annotations"> </td> | |
1559 </tr> | |
1560 </tbody> | |
1561 </table></div> | |
1562 </div> | |
1563 <p class="since">Since: 1.12</p> | |
1564 </div> | |
1565 <hr> | |
1566 <div class="refsect2"> | |
1567 <a name="cairo-mesh-pattern-set-control-point"></a><h3>cairo_mesh_pattern_set_control_point ()</h3> | |
1568 <pre class="programlisting"><span class="returnvalue">void</span> | |
1569 cairo_mesh_pattern_set_control_point (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1570 <em class="parameter"><code>unsigned <span class="type">int</span> point_num</code></em>, | |
1571 <em class="parameter"><code><span class="type">double</span> x</code></em>, | |
1572 <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre> | |
1573 <p>Set an internal control point of the current patch.</p> | |
1574 <p>Valid values for <em class="parameter"><code>point_num</code></em> | |
1575 are from 0 to 3 and identify the | |
1576 control points as explained in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()"><code class="function">cairo_pattern_create_mesh()</code></a>.</p> | |
1577 <p>Note: If <em class="parameter"><code>pattern</code></em> | |
1578 is not a mesh pattern then <em class="parameter"><code>pattern</code></em> | |
1579 will be put | |
1580 into an error status with a status of | |
1581 <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>point_num</code></em> | |
1582 is not valid, | |
1583 <em class="parameter"><code>pattern</code></em> | |
1584 will be put into an error status with a status of | |
1585 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a>. If <em class="parameter"><code>pattern</code></em> | |
1586 has no current patch, | |
1587 <em class="parameter"><code>pattern</code></em> | |
1588 will be put into an error status with a status of | |
1589 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.</p> | |
1590 <div class="refsect3"> | |
1591 <a name="cairo-mesh-pattern-set-control-point.parameters"></a><h4>Parameters</h4> | |
1592 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1593 <colgroup> | |
1594 <col width="150px" class="parameters_name"> | |
1595 <col class="parameters_description"> | |
1596 <col width="200px" class="parameters_annotations"> | |
1597 </colgroup> | |
1598 <tbody> | |
1599 <tr> | |
1600 <td class="parameter_name"><p>pattern</p></td> | |
1601 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1602 <td class="parameter_annotations"> </td> | |
1603 </tr> | |
1604 <tr> | |
1605 <td class="parameter_name"><p>point_num</p></td> | |
1606 <td class="parameter_description"><p>the control point to set the position for</p></td> | |
1607 <td class="parameter_annotations"> </td> | |
1608 </tr> | |
1609 <tr> | |
1610 <td class="parameter_name"><p>x</p></td> | |
1611 <td class="parameter_description"><p>the X coordinate of the control point</p></td> | |
1612 <td class="parameter_annotations"> </td> | |
1613 </tr> | |
1614 <tr> | |
1615 <td class="parameter_name"><p>y</p></td> | |
1616 <td class="parameter_description"><p>the Y coordinate of the control point</p></td> | |
1617 <td class="parameter_annotations"> </td> | |
1618 </tr> | |
1619 </tbody> | |
1620 </table></div> | |
1621 </div> | |
1622 <p class="since">Since: 1.12</p> | |
1623 </div> | |
1624 <hr> | |
1625 <div class="refsect2"> | |
1626 <a name="cairo-mesh-pattern-set-corner-color-rgb"></a><h3>cairo_mesh_pattern_set_corner_color_rgb ()</h3> | |
1627 <pre class="programlisting"><span class="returnvalue">void</span> | |
1628 cairo_mesh_pattern_set_corner_color_rgb | |
1629 (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1630 <em class="parameter"><code>unsigned <span class="type">int</span> corner_num</code></em>, | |
1631 <em class="parameter"><code><span class="type">double</span> red</code></em>, | |
1632 <em class="parameter"><code><span class="type">double</span> green</code></em>, | |
1633 <em class="parameter"><code><span class="type">double</span> blue</code></em>);</pre> | |
1634 <p>Sets the color of a corner of the current patch in a mesh pattern.</p> | |
1635 <p>The color is specified in the same way as in <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgb" title="cairo_set_source_rgb ()"><code class="function">cairo_set_source_rgb()</code></a>.</p> | |
1636 <p>Valid values for <em class="parameter"><code>corner_num</code></em> | |
1637 are from 0 to 3 and identify the | |
1638 corners as explained in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()"><code class="function">cairo_pattern_create_mesh()</code></a>.</p> | |
1639 <p>Note: If <em class="parameter"><code>pattern</code></em> | |
1640 is not a mesh pattern then <em class="parameter"><code>pattern</code></em> | |
1641 will be put | |
1642 into an error status with a status of | |
1643 <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>corner_num</code></em> | |
1644 is not valid, | |
1645 <em class="parameter"><code>pattern</code></em> | |
1646 will be put into an error status with a status of | |
1647 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a>. If <em class="parameter"><code>pattern</code></em> | |
1648 has no current patch, | |
1649 <em class="parameter"><code>pattern</code></em> | |
1650 will be put into an error status with a status of | |
1651 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.</p> | |
1652 <div class="refsect3"> | |
1653 <a name="cairo-mesh-pattern-set-corner-color-rgb.parameters"></a><h4>Parameters</h4> | |
1654 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1655 <colgroup> | |
1656 <col width="150px" class="parameters_name"> | |
1657 <col class="parameters_description"> | |
1658 <col width="200px" class="parameters_annotations"> | |
1659 </colgroup> | |
1660 <tbody> | |
1661 <tr> | |
1662 <td class="parameter_name"><p>pattern</p></td> | |
1663 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1664 <td class="parameter_annotations"> </td> | |
1665 </tr> | |
1666 <tr> | |
1667 <td class="parameter_name"><p>corner_num</p></td> | |
1668 <td class="parameter_description"><p>the corner to set the color for</p></td> | |
1669 <td class="parameter_annotations"> </td> | |
1670 </tr> | |
1671 <tr> | |
1672 <td class="parameter_name"><p>red</p></td> | |
1673 <td class="parameter_description"><p>red component of color</p></td> | |
1674 <td class="parameter_annotations"> </td> | |
1675 </tr> | |
1676 <tr> | |
1677 <td class="parameter_name"><p>green</p></td> | |
1678 <td class="parameter_description"><p>green component of color</p></td> | |
1679 <td class="parameter_annotations"> </td> | |
1680 </tr> | |
1681 <tr> | |
1682 <td class="parameter_name"><p>blue</p></td> | |
1683 <td class="parameter_description"><p>blue component of color</p></td> | |
1684 <td class="parameter_annotations"> </td> | |
1685 </tr> | |
1686 </tbody> | |
1687 </table></div> | |
1688 </div> | |
1689 <p class="since">Since: 1.12</p> | |
1690 </div> | |
1691 <hr> | |
1692 <div class="refsect2"> | |
1693 <a name="cairo-mesh-pattern-set-corner-color-rgba"></a><h3>cairo_mesh_pattern_set_corner_color_rgba ()</h3> | |
1694 <pre class="programlisting"><span class="returnvalue">void</span> | |
1695 cairo_mesh_pattern_set_corner_color_rgba | |
1696 (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1697 <em class="parameter"><code>unsigned <span class="type">int</span> corner_num</code></em>, | |
1698 <em class="parameter"><code><span class="type">double</span> red</code></em>, | |
1699 <em class="parameter"><code><span class="type">double</span> green</code></em>, | |
1700 <em class="parameter"><code><span class="type">double</span> blue</code></em>, | |
1701 <em class="parameter"><code><span class="type">double</span> alpha</code></em>);</pre> | |
1702 <p>Sets the color of a corner of the current patch in a mesh pattern.</p> | |
1703 <p>The color is specified in the same way as in <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgba" title="cairo_set_source_rgba ()"><code class="function">cairo_set_source_rgba()</code></a>.</p> | |
1704 <p>Valid values for <em class="parameter"><code>corner_num</code></em> | |
1705 are from 0 to 3 and identify the | |
1706 corners as explained in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()"><code class="function">cairo_pattern_create_mesh()</code></a>.</p> | |
1707 <p>Note: If <em class="parameter"><code>pattern</code></em> | |
1708 is not a mesh pattern then <em class="parameter"><code>pattern</code></em> | |
1709 will be put | |
1710 into an error status with a status of | |
1711 <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>corner_num</code></em> | |
1712 is not valid, | |
1713 <em class="parameter"><code>pattern</code></em> | |
1714 will be put into an error status with a status of | |
1715 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a>. If <em class="parameter"><code>pattern</code></em> | |
1716 has no current patch, | |
1717 <em class="parameter"><code>pattern</code></em> | |
1718 will be put into an error status with a status of | |
1719 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.</p> | |
1720 <div class="refsect3"> | |
1721 <a name="cairo-mesh-pattern-set-corner-color-rgba.parameters"></a><h4>Parameters</h4> | |
1722 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1723 <colgroup> | |
1724 <col width="150px" class="parameters_name"> | |
1725 <col class="parameters_description"> | |
1726 <col width="200px" class="parameters_annotations"> | |
1727 </colgroup> | |
1728 <tbody> | |
1729 <tr> | |
1730 <td class="parameter_name"><p>pattern</p></td> | |
1731 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1732 <td class="parameter_annotations"> </td> | |
1733 </tr> | |
1734 <tr> | |
1735 <td class="parameter_name"><p>corner_num</p></td> | |
1736 <td class="parameter_description"><p>the corner to set the color for</p></td> | |
1737 <td class="parameter_annotations"> </td> | |
1738 </tr> | |
1739 <tr> | |
1740 <td class="parameter_name"><p>red</p></td> | |
1741 <td class="parameter_description"><p>red component of color</p></td> | |
1742 <td class="parameter_annotations"> </td> | |
1743 </tr> | |
1744 <tr> | |
1745 <td class="parameter_name"><p>green</p></td> | |
1746 <td class="parameter_description"><p>green component of color</p></td> | |
1747 <td class="parameter_annotations"> </td> | |
1748 </tr> | |
1749 <tr> | |
1750 <td class="parameter_name"><p>blue</p></td> | |
1751 <td class="parameter_description"><p>blue component of color</p></td> | |
1752 <td class="parameter_annotations"> </td> | |
1753 </tr> | |
1754 <tr> | |
1755 <td class="parameter_name"><p>alpha</p></td> | |
1756 <td class="parameter_description"><p>alpha component of color</p></td> | |
1757 <td class="parameter_annotations"> </td> | |
1758 </tr> | |
1759 </tbody> | |
1760 </table></div> | |
1761 </div> | |
1762 <p class="since">Since: 1.12</p> | |
1763 </div> | |
1764 <hr> | |
1765 <div class="refsect2"> | |
1766 <a name="cairo-mesh-pattern-get-patch-count"></a><h3>cairo_mesh_pattern_get_patch_count ()</h3> | |
1767 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
1768 cairo_mesh_pattern_get_patch_count (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1769 <em class="parameter"><code>unsigned <span class="type">int</span> *count</code></em>);</pre> | |
1770 <p>Gets the number of patches specified in the given mesh pattern.</p> | |
1771 <p>The number only includes patches which have been finished by | |
1772 calling <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-end-patch" title="cairo_mesh_pattern_end_patch ()"><code class="function">cairo_mesh_pattern_end_patch()</code></a>. For example it will be 0 | |
1773 during the definition of the first patch.</p> | |
1774 <div class="refsect3"> | |
1775 <a name="cairo-mesh-pattern-get-patch-count.parameters"></a><h4>Parameters</h4> | |
1776 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1777 <colgroup> | |
1778 <col width="150px" class="parameters_name"> | |
1779 <col class="parameters_description"> | |
1780 <col width="200px" class="parameters_annotations"> | |
1781 </colgroup> | |
1782 <tbody> | |
1783 <tr> | |
1784 <td class="parameter_name"><p>pattern</p></td> | |
1785 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1786 <td class="parameter_annotations"> </td> | |
1787 </tr> | |
1788 <tr> | |
1789 <td class="parameter_name"><p>count</p></td> | |
1790 <td class="parameter_description"><p>return value for the number patches, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1791 <td class="parameter_annotations"> </td> | |
1792 </tr> | |
1793 </tbody> | |
1794 </table></div> | |
1795 </div> | |
1796 <div class="refsect3"> | |
1797 <a name="cairo-mesh-pattern-get-patch-count.returns"></a><h4>Returns</h4> | |
1798 <p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or | |
1799 <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> | |
1800 is not a mesh | |
1801 pattern.</p> | |
1802 </div> | |
1803 <p class="since">Since: 1.12</p> | |
1804 </div> | |
1805 <hr> | |
1806 <div class="refsect2"> | |
1807 <a name="cairo-mesh-pattern-get-path"></a><h3>cairo_mesh_pattern_get_path ()</h3> | |
1808 <pre class="programlisting"><a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="returnvalue">cairo_path_t</span></a> * | |
1809 cairo_mesh_pattern_get_path (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1810 <em class="parameter"><code>unsigned <span class="type">int</span> patch_num</code></em>);</pre> | |
1811 <p>Gets path defining the patch <em class="parameter"><code>patch_num</code></em> | |
1812 for a mesh | |
1813 pattern.</p> | |
1814 <p><em class="parameter"><code>patch_num</code></em> | |
1815 can range from 0 to n-1 where n is the number returned by | |
1816 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-get-patch-count" title="cairo_mesh_pattern_get_patch_count ()"><code class="function">cairo_mesh_pattern_get_patch_count()</code></a>.</p> | |
1817 <div class="refsect3"> | |
1818 <a name="cairo-mesh-pattern-get-path.parameters"></a><h4>Parameters</h4> | |
1819 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1820 <colgroup> | |
1821 <col width="150px" class="parameters_name"> | |
1822 <col class="parameters_description"> | |
1823 <col width="200px" class="parameters_annotations"> | |
1824 </colgroup> | |
1825 <tbody> | |
1826 <tr> | |
1827 <td class="parameter_name"><p>pattern</p></td> | |
1828 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1829 <td class="parameter_annotations"> </td> | |
1830 </tr> | |
1831 <tr> | |
1832 <td class="parameter_name"><p>patch_num</p></td> | |
1833 <td class="parameter_description"><p>the patch number to return data for</p></td> | |
1834 <td class="parameter_annotations"> </td> | |
1835 </tr> | |
1836 </tbody> | |
1837 </table></div> | |
1838 </div> | |
1839 <div class="refsect3"> | |
1840 <a name="cairo-mesh-pattern-get-path.returns"></a><h4>Returns</h4> | |
1841 <p> the path defining the patch, or a path with status | |
1842 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a> if <em class="parameter"><code>patch_num</code></em> | |
1843 or <em class="parameter"><code>point_num</code></em> | |
1844 is not | |
1845 valid for <em class="parameter"><code>pattern</code></em> | |
1846 . If <em class="parameter"><code>pattern</code></em> | |
1847 is not a mesh pattern, a path with | |
1848 status <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 returned.</p> | |
1849 </div> | |
1850 <p class="since">Since: 1.12</p> | |
1851 </div> | |
1852 <hr> | |
1853 <div class="refsect2"> | |
1854 <a name="cairo-mesh-pattern-get-control-point"></a><h3>cairo_mesh_pattern_get_control_point ()</h3> | |
1855 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
1856 cairo_mesh_pattern_get_control_point (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1857 <em class="parameter"><code>unsigned <span class="type">int</span> patch_num</code></em>, | |
1858 <em class="parameter"><code>unsigned <span class="type">int</span> point_num</code></em>, | |
1859 <em class="parameter"><code><span class="type">double</span> *x</code></em>, | |
1860 <em class="parameter"><code><span class="type">double</span> *y</code></em>);</pre> | |
1861 <p>Gets the control point <em class="parameter"><code>point_num</code></em> | |
1862 of patch <em class="parameter"><code>patch_num</code></em> | |
1863 for a mesh | |
1864 pattern.</p> | |
1865 <p><em class="parameter"><code>patch_num</code></em> | |
1866 can range from 0 to n-1 where n is the number returned by | |
1867 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-get-patch-count" title="cairo_mesh_pattern_get_patch_count ()"><code class="function">cairo_mesh_pattern_get_patch_count()</code></a>.</p> | |
1868 <p>Valid values for <em class="parameter"><code>point_num</code></em> | |
1869 are from 0 to 3 and identify the | |
1870 control points as explained in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()"><code class="function">cairo_pattern_create_mesh()</code></a>.</p> | |
1871 <div class="refsect3"> | |
1872 <a name="cairo-mesh-pattern-get-control-point.parameters"></a><h4>Parameters</h4> | |
1873 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1874 <colgroup> | |
1875 <col width="150px" class="parameters_name"> | |
1876 <col class="parameters_description"> | |
1877 <col width="200px" class="parameters_annotations"> | |
1878 </colgroup> | |
1879 <tbody> | |
1880 <tr> | |
1881 <td class="parameter_name"><p>pattern</p></td> | |
1882 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1883 <td class="parameter_annotations"> </td> | |
1884 </tr> | |
1885 <tr> | |
1886 <td class="parameter_name"><p>patch_num</p></td> | |
1887 <td class="parameter_description"><p>the patch number to return data for</p></td> | |
1888 <td class="parameter_annotations"> </td> | |
1889 </tr> | |
1890 <tr> | |
1891 <td class="parameter_name"><p>point_num</p></td> | |
1892 <td class="parameter_description"><p>the control point number to return data for</p></td> | |
1893 <td class="parameter_annotations"> </td> | |
1894 </tr> | |
1895 <tr> | |
1896 <td class="parameter_name"><p>x</p></td> | |
1897 <td class="parameter_description"><p>return value for the x coordinate of the control point, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1898 <td class="parameter_annotations"> </td> | |
1899 </tr> | |
1900 <tr> | |
1901 <td class="parameter_name"><p>y</p></td> | |
1902 <td class="parameter_description"><p>return value for the y coordinate of the control point, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1903 <td class="parameter_annotations"> </td> | |
1904 </tr> | |
1905 </tbody> | |
1906 </table></div> | |
1907 </div> | |
1908 <div class="refsect3"> | |
1909 <a name="cairo-mesh-pattern-get-control-point.returns"></a><h4>Returns</h4> | |
1910 <p> <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> | |
1911 if <em class="parameter"><code>patch_num</code></em> | |
1912 or <em class="parameter"><code>point_num</code></em> | |
1913 is not valid for <em class="parameter"><code>pattern</code></em> | |
1914 . If <em class="parameter"><code>pattern</code></em> | |
1915 is not a mesh 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 | |
1916 returned.</p> | |
1917 </div> | |
1918 <p class="since">Since: 1.12</p> | |
1919 </div> | |
1920 <hr> | |
1921 <div class="refsect2"> | |
1922 <a name="cairo-mesh-pattern-get-corner-color-rgba"></a><h3>cairo_mesh_pattern_get_corner_color_rgba ()</h3> | |
1923 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
1924 cairo_mesh_pattern_get_corner_color_rgba | |
1925 (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
1926 <em class="parameter"><code>unsigned <span class="type">int</span> patch_num</code></em>, | |
1927 <em class="parameter"><code>unsigned <span class="type">int</span> corner_num</code></em>, | |
1928 <em class="parameter"><code><span class="type">double</span> *red</code></em>, | |
1929 <em class="parameter"><code><span class="type">double</span> *green</code></em>, | |
1930 <em class="parameter"><code><span class="type">double</span> *blue</code></em>, | |
1931 <em class="parameter"><code><span class="type">double</span> *alpha</code></em>);</pre> | |
1932 <p>Gets the color information in corner <em class="parameter"><code>corner_num</code></em> | |
1933 of patch | |
1934 <em class="parameter"><code>patch_num</code></em> | |
1935 for a mesh pattern.</p> | |
1936 <p><em class="parameter"><code>patch_num</code></em> | |
1937 can range from 0 to n-1 where n is the number returned by | |
1938 <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-get-patch-count" title="cairo_mesh_pattern_get_patch_count ()"><code class="function">cairo_mesh_pattern_get_patch_count()</code></a>.</p> | |
1939 <p>Valid values for <em class="parameter"><code>corner_num</code></em> | |
1940 are from 0 to 3 and identify the | |
1941 corners as explained in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()"><code class="function">cairo_pattern_create_mesh()</code></a>.</p> | |
1942 <div class="refsect3"> | |
1943 <a name="cairo-mesh-pattern-get-corner-color-rgba.parameters"></a><h4>Parameters</h4> | |
1944 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
1945 <colgroup> | |
1946 <col width="150px" class="parameters_name"> | |
1947 <col class="parameters_description"> | |
1948 <col width="200px" class="parameters_annotations"> | |
1949 </colgroup> | |
1950 <tbody> | |
1951 <tr> | |
1952 <td class="parameter_name"><p>pattern</p></td> | |
1953 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
1954 <td class="parameter_annotations"> </td> | |
1955 </tr> | |
1956 <tr> | |
1957 <td class="parameter_name"><p>patch_num</p></td> | |
1958 <td class="parameter_description"><p>the patch number to return data for</p></td> | |
1959 <td class="parameter_annotations"> </td> | |
1960 </tr> | |
1961 <tr> | |
1962 <td class="parameter_name"><p>corner_num</p></td> | |
1963 <td class="parameter_description"><p>the corner number to return data for</p></td> | |
1964 <td class="parameter_annotations"> </td> | |
1965 </tr> | |
1966 <tr> | |
1967 <td class="parameter_name"><p>red</p></td> | |
1968 <td class="parameter_description"><p>return value for red component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1969 <td class="parameter_annotations"> </td> | |
1970 </tr> | |
1971 <tr> | |
1972 <td class="parameter_name"><p>green</p></td> | |
1973 <td class="parameter_description"><p>return value for green component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1974 <td class="parameter_annotations"> </td> | |
1975 </tr> | |
1976 <tr> | |
1977 <td class="parameter_name"><p>blue</p></td> | |
1978 <td class="parameter_description"><p>return value for blue component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1979 <td class="parameter_annotations"> </td> | |
1980 </tr> | |
1981 <tr> | |
1982 <td class="parameter_name"><p>alpha</p></td> | |
1983 <td class="parameter_description"><p>return value for alpha component of color, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> | |
1984 <td class="parameter_annotations"> </td> | |
1985 </tr> | |
1986 </tbody> | |
1987 </table></div> | |
1988 </div> | |
1989 <div class="refsect3"> | |
1990 <a name="cairo-mesh-pattern-get-corner-color-rgba.returns"></a><h4>Returns</h4> | |
1991 <p> <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> | |
1992 if <em class="parameter"><code>patch_num</code></em> | |
1993 or <em class="parameter"><code>corner_num</code></em> | |
1994 is not valid for <em class="parameter"><code>pattern</code></em> | |
1995 . If | |
1996 <em class="parameter"><code>pattern</code></em> | |
1997 is not a mesh 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> | |
1998 is returned.</p> | |
1999 </div> | |
2000 <p class="since">Since: 1.12</p> | |
2001 </div> | |
2002 <hr> | |
2003 <div class="refsect2"> | |
2004 <a name="cairo-pattern-reference"></a><h3>cairo_pattern_reference ()</h3> | |
2005 <pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * | |
2006 cairo_pattern_reference (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre> | |
2007 <p>Increases the reference count on <em class="parameter"><code>pattern</code></em> | |
2008 by one. This prevents | |
2009 <em class="parameter"><code>pattern</code></em> | |
2010 from being destroyed until a matching call to | |
2011 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> is made.</p> | |
2012 <p>Use <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-reference-count" title="cairo_pattern_get_reference_count ()"><code class="function">cairo_pattern_get_reference_count()</code></a> to get the number of | |
2013 references to a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>.</p> | |
2014 <div class="refsect3"> | |
2015 <a name="cairo-pattern-reference.parameters"></a><h4>Parameters</h4> | |
2016 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2017 <colgroup> | |
2018 <col width="150px" class="parameters_name"> | |
2019 <col class="parameters_description"> | |
2020 <col width="200px" class="parameters_annotations"> | |
2021 </colgroup> | |
2022 <tbody><tr> | |
2023 <td class="parameter_name"><p>pattern</p></td> | |
2024 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2025 <td class="parameter_annotations"> </td> | |
2026 </tr></tbody> | |
2027 </table></div> | |
2028 </div> | |
2029 <div class="refsect3"> | |
2030 <a name="cairo-pattern-reference.returns"></a><h4>Returns</h4> | |
2031 <p> the referenced <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>.</p> | |
2032 </div> | |
2033 <p class="since">Since: 1.0</p> | |
2034 </div> | |
2035 <hr> | |
2036 <div class="refsect2"> | |
2037 <a name="cairo-pattern-destroy"></a><h3>cairo_pattern_destroy ()</h3> | |
2038 <pre class="programlisting"><span class="returnvalue">void</span> | |
2039 cairo_pattern_destroy (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre> | |
2040 <p>Decreases the reference count on <em class="parameter"><code>pattern</code></em> | |
2041 by one. If the result is | |
2042 zero, then <em class="parameter"><code>pattern</code></em> | |
2043 and all associated resources are freed. See | |
2044 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-reference" title="cairo_pattern_reference ()"><code class="function">cairo_pattern_reference()</code></a>.</p> | |
2045 <div class="refsect3"> | |
2046 <a name="cairo-pattern-destroy.parameters"></a><h4>Parameters</h4> | |
2047 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2048 <colgroup> | |
2049 <col width="150px" class="parameters_name"> | |
2050 <col class="parameters_description"> | |
2051 <col width="200px" class="parameters_annotations"> | |
2052 </colgroup> | |
2053 <tbody><tr> | |
2054 <td class="parameter_name"><p>pattern</p></td> | |
2055 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2056 <td class="parameter_annotations"> </td> | |
2057 </tr></tbody> | |
2058 </table></div> | |
2059 </div> | |
2060 <p class="since">Since: 1.0</p> | |
2061 </div> | |
2062 <hr> | |
2063 <div class="refsect2"> | |
2064 <a name="cairo-pattern-status"></a><h3>cairo_pattern_status ()</h3> | |
2065 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
2066 cairo_pattern_status (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre> | |
2067 <p>Checks whether an error has previously occurred for this | |
2068 pattern.</p> | |
2069 <div class="refsect3"> | |
2070 <a name="cairo-pattern-status.parameters"></a><h4>Parameters</h4> | |
2071 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2072 <colgroup> | |
2073 <col width="150px" class="parameters_name"> | |
2074 <col class="parameters_description"> | |
2075 <col width="200px" class="parameters_annotations"> | |
2076 </colgroup> | |
2077 <tbody><tr> | |
2078 <td class="parameter_name"><p>pattern</p></td> | |
2079 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2080 <td class="parameter_annotations"> </td> | |
2081 </tr></tbody> | |
2082 </table></div> | |
2083 </div> | |
2084 <div class="refsect3"> | |
2085 <a name="cairo-pattern-status.returns"></a><h4>Returns</h4> | |
2086 <p> <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>, | |
2087 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MATRIX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MATRIX</code></a>, <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>, | |
2088 or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.</p> | |
2089 </div> | |
2090 <p class="since">Since: 1.0</p> | |
2091 </div> | |
2092 <hr> | |
2093 <div class="refsect2"> | |
2094 <a name="cairo-pattern-set-extend"></a><h3>cairo_pattern_set_extend ()</h3> | |
2095 <pre class="programlisting"><span class="returnvalue">void</span> | |
2096 cairo_pattern_set_extend (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
2097 <em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-extend-t" title="enum cairo_extend_t"><span class="type">cairo_extend_t</span></a> extend</code></em>);</pre> | |
2098 <p>Sets the mode to be used for drawing outside the area of a pattern. | |
2099 See <a class="link" href="cairo-cairo-pattern-t.html#cairo-extend-t" title="enum cairo_extend_t"><span class="type">cairo_extend_t</span></a> for details on the semantics of each extend | |
2100 strategy.</p> | |
2101 <p>The default extend mode is <a class="link" href="cairo-cairo-pattern-t.html#CAIRO-EXTEND-NONE:CAPS"><code class="literal">CAIRO_EXTEND_NONE</code></a> for surface patterns | |
2102 and <a class="link" href="cairo-cairo-pattern-t.html#CAIRO-EXTEND-PAD:CAPS"><code class="literal">CAIRO_EXTEND_PAD</code></a> for gradient patterns.</p> | |
2103 <div class="refsect3"> | |
2104 <a name="cairo-pattern-set-extend.parameters"></a><h4>Parameters</h4> | |
2105 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2106 <colgroup> | |
2107 <col width="150px" class="parameters_name"> | |
2108 <col class="parameters_description"> | |
2109 <col width="200px" class="parameters_annotations"> | |
2110 </colgroup> | |
2111 <tbody> | |
2112 <tr> | |
2113 <td class="parameter_name"><p>pattern</p></td> | |
2114 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2115 <td class="parameter_annotations"> </td> | |
2116 </tr> | |
2117 <tr> | |
2118 <td class="parameter_name"><p>extend</p></td> | |
2119 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-extend-t" title="enum cairo_extend_t"><span class="type">cairo_extend_t</span></a> describing how the area outside of the | |
2120 pattern will be drawn</p></td> | |
2121 <td class="parameter_annotations"> </td> | |
2122 </tr> | |
2123 </tbody> | |
2124 </table></div> | |
2125 </div> | |
2126 <p class="since">Since: 1.0</p> | |
2127 </div> | |
2128 <hr> | |
2129 <div class="refsect2"> | |
2130 <a name="cairo-pattern-get-extend"></a><h3>cairo_pattern_get_extend ()</h3> | |
2131 <pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-extend-t" title="enum cairo_extend_t"><span class="returnvalue">cairo_extend_t</span></a> | |
2132 cairo_pattern_get_extend (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre> | |
2133 <p>Gets the current extend mode for a pattern. See <a class="link" href="cairo-cairo-pattern-t.html#cairo-extend-t" title="enum cairo_extend_t"><span class="type">cairo_extend_t</span></a> | |
2134 for details on the semantics of each extend strategy.</p> | |
2135 <div class="refsect3"> | |
2136 <a name="cairo-pattern-get-extend.parameters"></a><h4>Parameters</h4> | |
2137 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2138 <colgroup> | |
2139 <col width="150px" class="parameters_name"> | |
2140 <col class="parameters_description"> | |
2141 <col width="200px" class="parameters_annotations"> | |
2142 </colgroup> | |
2143 <tbody><tr> | |
2144 <td class="parameter_name"><p>pattern</p></td> | |
2145 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2146 <td class="parameter_annotations"> </td> | |
2147 </tr></tbody> | |
2148 </table></div> | |
2149 </div> | |
2150 <div class="refsect3"> | |
2151 <a name="cairo-pattern-get-extend.returns"></a><h4>Returns</h4> | |
2152 <p> the current extend strategy used for drawing the | |
2153 pattern.</p> | |
2154 </div> | |
2155 <p class="since">Since: 1.0</p> | |
2156 </div> | |
2157 <hr> | |
2158 <div class="refsect2"> | |
2159 <a name="cairo-pattern-set-filter"></a><h3>cairo_pattern_set_filter ()</h3> | |
2160 <pre class="programlisting"><span class="returnvalue">void</span> | |
2161 cairo_pattern_set_filter (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
2162 <em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-filter-t" title="enum cairo_filter_t"><span class="type">cairo_filter_t</span></a> filter</code></em>);</pre> | |
2163 <p>Sets the filter to be used for resizing when using this pattern. | |
2164 See <a class="link" href="cairo-cairo-pattern-t.html#cairo-filter-t" title="enum cairo_filter_t"><span class="type">cairo_filter_t</span></a> for details on each filter.</p> | |
2165 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Note that you might want to control filtering even when you do not | |
2166 have an explicit <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> object, (for example when using | |
2167 <a class="link" href="cairo-cairo-t.html#cairo-set-source-surface" title="cairo_set_source_surface ()"><code class="function">cairo_set_source_surface()</code></a>). In these cases, it is convenient to | |
2168 use <a class="link" href="cairo-cairo-t.html#cairo-get-source" title="cairo_get_source ()"><code class="function">cairo_get_source()</code></a> to get access to the pattern that cairo | |
2169 creates implicitly. For example:</p></li></ul></div> | |
2170 <div class="informalexample"> | |
2171 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> | |
2172 <tbody> | |
2173 <tr> | |
2174 <td class="listing_lines" align="right"><pre>1 | |
2175 2</pre></td> | |
2176 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="cairo-cairo-t.html#cairo-set-source-surface">cairo_set_source_surface</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">,</span> image<span class="gtkdoc opt">,</span> x<span class="gtkdoc opt">,</span> y<span class="gtkdoc opt">);</span> | |
2177 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-pattern-set-filter">cairo_pattern_set_filter</a></span> <span class="gtkdoc opt">(</span><span class="function"><a href="cairo-cairo-t.html#cairo-get-source">cairo_get_source</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">),</span> CAIRO_FILTER_NEAREST<span class="gtkdoc opt">);</span></pre></td> | |
2178 </tr> | |
2179 </tbody> | |
2180 </table> | |
2181 </div> | |
2182 | |
2183 <div class="refsect3"> | |
2184 <a name="cairo-pattern-set-filter.parameters"></a><h4>Parameters</h4> | |
2185 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2186 <colgroup> | |
2187 <col width="150px" class="parameters_name"> | |
2188 <col class="parameters_description"> | |
2189 <col width="200px" class="parameters_annotations"> | |
2190 </colgroup> | |
2191 <tbody> | |
2192 <tr> | |
2193 <td class="parameter_name"><p>pattern</p></td> | |
2194 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2195 <td class="parameter_annotations"> </td> | |
2196 </tr> | |
2197 <tr> | |
2198 <td class="parameter_name"><p>filter</p></td> | |
2199 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-filter-t" title="enum cairo_filter_t"><span class="type">cairo_filter_t</span></a> describing the filter to use for resizing | |
2200 the pattern</p></td> | |
2201 <td class="parameter_annotations"> </td> | |
2202 </tr> | |
2203 </tbody> | |
2204 </table></div> | |
2205 </div> | |
2206 <p class="since">Since: 1.0</p> | |
2207 </div> | |
2208 <hr> | |
2209 <div class="refsect2"> | |
2210 <a name="cairo-pattern-get-filter"></a><h3>cairo_pattern_get_filter ()</h3> | |
2211 <pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-filter-t" title="enum cairo_filter_t"><span class="returnvalue">cairo_filter_t</span></a> | |
2212 cairo_pattern_get_filter (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre> | |
2213 <p>Gets the current filter for a pattern. See <a class="link" href="cairo-cairo-pattern-t.html#cairo-filter-t" title="enum cairo_filter_t"><span class="type">cairo_filter_t</span></a> | |
2214 for details on each filter.</p> | |
2215 <div class="refsect3"> | |
2216 <a name="cairo-pattern-get-filter.parameters"></a><h4>Parameters</h4> | |
2217 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2218 <colgroup> | |
2219 <col width="150px" class="parameters_name"> | |
2220 <col class="parameters_description"> | |
2221 <col width="200px" class="parameters_annotations"> | |
2222 </colgroup> | |
2223 <tbody><tr> | |
2224 <td class="parameter_name"><p>pattern</p></td> | |
2225 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2226 <td class="parameter_annotations"> </td> | |
2227 </tr></tbody> | |
2228 </table></div> | |
2229 </div> | |
2230 <div class="refsect3"> | |
2231 <a name="cairo-pattern-get-filter.returns"></a><h4>Returns</h4> | |
2232 <p> the current filter used for resizing the pattern.</p> | |
2233 </div> | |
2234 <p class="since">Since: 1.0</p> | |
2235 </div> | |
2236 <hr> | |
2237 <div class="refsect2"> | |
2238 <a name="cairo-pattern-set-matrix"></a><h3>cairo_pattern_set_matrix ()</h3> | |
2239 <pre class="programlisting"><span class="returnvalue">void</span> | |
2240 cairo_pattern_set_matrix (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
2241 <em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>);</pre> | |
2242 <p>Sets the pattern's transformation matrix to <em class="parameter"><code>matrix</code></em> | |
2243 . This matrix is | |
2244 a transformation from user space to pattern space.</p> | |
2245 <p>When a pattern is first created it always has the identity matrix | |
2246 for its transformation matrix, which means that pattern space is | |
2247 initially identical to user space.</p> | |
2248 <p>Important: Please note that the direction of this transformation | |
2249 matrix is from user space to pattern space. This means that if you | |
2250 imagine the flow from a pattern to user space (and on to device | |
2251 space), then coordinates in that flow will be transformed by the | |
2252 inverse of the pattern matrix.</p> | |
2253 <p>For example, if you want to make a pattern appear twice as large as | |
2254 it does by default the correct code to use is:</p> | |
2255 <div class="informalexample"> | |
2256 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> | |
2257 <tbody> | |
2258 <tr> | |
2259 <td class="listing_lines" align="right"><pre>1 | |
2260 2</pre></td> | |
2261 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="cairo-cairo-matrix-t.html#cairo-matrix-init-scale">cairo_matrix_init_scale</a></span> <span class="gtkdoc opt">(&</span>matrix<span class="gtkdoc opt">,</span> <span class="number">0.5</span><span class="gtkdoc opt">,</span> <span class="number">0.5</span><span class="gtkdoc opt">);</span> | |
2262 <span class="function"><a href="cairo-cairo-pattern-t.html#cairo-pattern-set-matrix">cairo_pattern_set_matrix</a></span> <span class="gtkdoc opt">(</span>pattern<span class="gtkdoc opt">, &</span>matrix<span class="gtkdoc opt">);</span></pre></td> | |
2263 </tr> | |
2264 </tbody> | |
2265 </table> | |
2266 </div> | |
2267 | |
2268 <p>Meanwhile, using values of 2.0 rather than 0.5 in the code above | |
2269 would cause the pattern to appear at half of its default size.</p> | |
2270 <p>Also, please note the discussion of the user-space locking | |
2271 semantics of <a class="link" href="cairo-cairo-t.html#cairo-set-source" title="cairo_set_source ()"><code class="function">cairo_set_source()</code></a>.</p> | |
2272 <div class="refsect3"> | |
2273 <a name="cairo-pattern-set-matrix.parameters"></a><h4>Parameters</h4> | |
2274 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2275 <colgroup> | |
2276 <col width="150px" class="parameters_name"> | |
2277 <col class="parameters_description"> | |
2278 <col width="200px" class="parameters_annotations"> | |
2279 </colgroup> | |
2280 <tbody> | |
2281 <tr> | |
2282 <td class="parameter_name"><p>pattern</p></td> | |
2283 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2284 <td class="parameter_annotations"> </td> | |
2285 </tr> | |
2286 <tr> | |
2287 <td class="parameter_name"><p>matrix</p></td> | |
2288 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a></p></td> | |
2289 <td class="parameter_annotations"> </td> | |
2290 </tr> | |
2291 </tbody> | |
2292 </table></div> | |
2293 </div> | |
2294 <p class="since">Since: 1.0</p> | |
2295 </div> | |
2296 <hr> | |
2297 <div class="refsect2"> | |
2298 <a name="cairo-pattern-get-matrix"></a><h3>cairo_pattern_get_matrix ()</h3> | |
2299 <pre class="programlisting"><span class="returnvalue">void</span> | |
2300 cairo_pattern_get_matrix (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
2301 <em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *matrix</code></em>);</pre> | |
2302 <p>Stores the pattern's transformation matrix into <em class="parameter"><code>matrix</code></em> | |
2303 .</p> | |
2304 <div class="refsect3"> | |
2305 <a name="cairo-pattern-get-matrix.parameters"></a><h4>Parameters</h4> | |
2306 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2307 <colgroup> | |
2308 <col width="150px" class="parameters_name"> | |
2309 <col class="parameters_description"> | |
2310 <col width="200px" class="parameters_annotations"> | |
2311 </colgroup> | |
2312 <tbody> | |
2313 <tr> | |
2314 <td class="parameter_name"><p>pattern</p></td> | |
2315 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2316 <td class="parameter_annotations"> </td> | |
2317 </tr> | |
2318 <tr> | |
2319 <td class="parameter_name"><p>matrix</p></td> | |
2320 <td class="parameter_description"><p>return value for the matrix</p></td> | |
2321 <td class="parameter_annotations"> </td> | |
2322 </tr> | |
2323 </tbody> | |
2324 </table></div> | |
2325 </div> | |
2326 <p class="since">Since: 1.0</p> | |
2327 </div> | |
2328 <hr> | |
2329 <div class="refsect2"> | |
2330 <a name="cairo-pattern-get-type"></a><h3>cairo_pattern_get_type ()</h3> | |
2331 <pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-type-t" title="enum cairo_pattern_type_t"><span class="returnvalue">cairo_pattern_type_t</span></a> | |
2332 cairo_pattern_get_type (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre> | |
2333 <p>Get the pattern's type. See <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-type-t" title="enum cairo_pattern_type_t"><span class="type">cairo_pattern_type_t</span></a> for available | |
2334 types.</p> | |
2335 <div class="refsect3"> | |
2336 <a name="cairo-pattern-get-type.parameters"></a><h4>Parameters</h4> | |
2337 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2338 <colgroup> | |
2339 <col width="150px" class="parameters_name"> | |
2340 <col class="parameters_description"> | |
2341 <col width="200px" class="parameters_annotations"> | |
2342 </colgroup> | |
2343 <tbody><tr> | |
2344 <td class="parameter_name"><p>pattern</p></td> | |
2345 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2346 <td class="parameter_annotations"> </td> | |
2347 </tr></tbody> | |
2348 </table></div> | |
2349 </div> | |
2350 <div class="refsect3"> | |
2351 <a name="cairo-pattern-get-type.returns"></a><h4>Returns</h4> | |
2352 <p> The type of <em class="parameter"><code>pattern</code></em> | |
2353 .</p> | |
2354 </div> | |
2355 <p class="since">Since: 1.2</p> | |
2356 </div> | |
2357 <hr> | |
2358 <div class="refsect2"> | |
2359 <a name="cairo-pattern-get-reference-count"></a><h3>cairo_pattern_get_reference_count ()</h3> | |
2360 <pre class="programlisting">unsigned <span class="returnvalue">int</span> | |
2361 cairo_pattern_get_reference_count (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre> | |
2362 <p>Returns the current reference count of <em class="parameter"><code>pattern</code></em> | |
2363 .</p> | |
2364 <div class="refsect3"> | |
2365 <a name="cairo-pattern-get-reference-count.parameters"></a><h4>Parameters</h4> | |
2366 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2367 <colgroup> | |
2368 <col width="150px" class="parameters_name"> | |
2369 <col class="parameters_description"> | |
2370 <col width="200px" class="parameters_annotations"> | |
2371 </colgroup> | |
2372 <tbody><tr> | |
2373 <td class="parameter_name"><p>pattern</p></td> | |
2374 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2375 <td class="parameter_annotations"> </td> | |
2376 </tr></tbody> | |
2377 </table></div> | |
2378 </div> | |
2379 <div class="refsect3"> | |
2380 <a name="cairo-pattern-get-reference-count.returns"></a><h4>Returns</h4> | |
2381 <p> the current reference count of <em class="parameter"><code>pattern</code></em> | |
2382 . If the | |
2383 object is a nil object, 0 will be returned.</p> | |
2384 </div> | |
2385 <p class="since">Since: 1.4</p> | |
2386 </div> | |
2387 <hr> | |
2388 <div class="refsect2"> | |
2389 <a name="cairo-pattern-set-user-data"></a><h3>cairo_pattern_set_user_data ()</h3> | |
2390 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
2391 cairo_pattern_set_user_data (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
2392 <em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>, | |
2393 <em class="parameter"><code><span class="type">void</span> *user_data</code></em>, | |
2394 <em class="parameter"><code><a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> destroy</code></em>);</pre> | |
2395 <p>Attach user data to <em class="parameter"><code>pattern</code></em> | |
2396 . To remove user data from a surface, | |
2397 call this function with the key that was used to set it and <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> | |
2398 for <em class="parameter"><code>data</code></em> | |
2399 .</p> | |
2400 <div class="refsect3"> | |
2401 <a name="cairo-pattern-set-user-data.parameters"></a><h4>Parameters</h4> | |
2402 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2403 <colgroup> | |
2404 <col width="150px" class="parameters_name"> | |
2405 <col class="parameters_description"> | |
2406 <col width="200px" class="parameters_annotations"> | |
2407 </colgroup> | |
2408 <tbody> | |
2409 <tr> | |
2410 <td class="parameter_name"><p>pattern</p></td> | |
2411 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2412 <td class="parameter_annotations"> </td> | |
2413 </tr> | |
2414 <tr> | |
2415 <td class="parameter_name"><p>key</p></td> | |
2416 <td class="parameter_description"><p>the address of a <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> to attach the user data to</p></td> | |
2417 <td class="parameter_annotations"> </td> | |
2418 </tr> | |
2419 <tr> | |
2420 <td class="parameter_name"><p>user_data</p></td> | |
2421 <td class="parameter_description"><p>the user data to attach to the <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2422 <td class="parameter_annotations"> </td> | |
2423 </tr> | |
2424 <tr> | |
2425 <td class="parameter_name"><p>destroy</p></td> | |
2426 <td class="parameter_description"><p>a <a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> which will be called when the | |
2427 <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is destroyed or when new user data is attached using the | |
2428 same key.</p></td> | |
2429 <td class="parameter_annotations"> </td> | |
2430 </tr> | |
2431 </tbody> | |
2432 </table></div> | |
2433 </div> | |
2434 <div class="refsect3"> | |
2435 <a name="cairo-pattern-set-user-data.returns"></a><h4>Returns</h4> | |
2436 <p> <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 | |
2437 slot could not be allocated for the user data.</p> | |
2438 </div> | |
2439 <p class="since">Since: 1.4</p> | |
2440 </div> | |
2441 <hr> | |
2442 <div class="refsect2"> | |
2443 <a name="cairo-pattern-get-user-data"></a><h3>cairo_pattern_get_user_data ()</h3> | |
2444 <pre class="programlisting"><span class="returnvalue">void</span> * | |
2445 cairo_pattern_get_user_data (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>, | |
2446 <em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>);</pre> | |
2447 <p>Return user data previously attached to <em class="parameter"><code>pattern</code></em> | |
2448 using the | |
2449 specified key. If no user data has been attached with the given | |
2450 key this function returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p> | |
2451 <div class="refsect3"> | |
2452 <a name="cairo-pattern-get-user-data.parameters"></a><h4>Parameters</h4> | |
2453 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2454 <colgroup> | |
2455 <col width="150px" class="parameters_name"> | |
2456 <col class="parameters_description"> | |
2457 <col width="200px" class="parameters_annotations"> | |
2458 </colgroup> | |
2459 <tbody> | |
2460 <tr> | |
2461 <td class="parameter_name"><p>pattern</p></td> | |
2462 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a></p></td> | |
2463 <td class="parameter_annotations"> </td> | |
2464 </tr> | |
2465 <tr> | |
2466 <td class="parameter_name"><p>key</p></td> | |
2467 <td class="parameter_description"><p>the address of the <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> the user data was | |
2468 attached to</p></td> | |
2469 <td class="parameter_annotations"> </td> | |
2470 </tr> | |
2471 </tbody> | |
2472 </table></div> | |
2473 </div> | |
2474 <div class="refsect3"> | |
2475 <a name="cairo-pattern-get-user-data.returns"></a><h4>Returns</h4> | |
2476 <p> the user data previously attached or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p> | |
2477 </div> | |
2478 <p class="since">Since: 1.4</p> | |
2479 </div> | |
2480 </div> | |
2481 <div class="refsect1"> | |
2482 <a name="cairo-cairo-pattern-t.other_details"></a><h2>Types and Values</h2> | |
2483 <div class="refsect2"> | |
2484 <a name="cairo-pattern-t"></a><h3>cairo_pattern_t</h3> | |
2485 <pre class="programlisting">typedef struct _cairo_pattern cairo_pattern_t; | |
2486 </pre> | |
2487 <p>A <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> represents a source when drawing onto a | |
2488 surface. There are different subtypes of <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>, | |
2489 for different types of sources; for example, | |
2490 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-rgb" title="cairo_pattern_create_rgb ()"><code class="function">cairo_pattern_create_rgb()</code></a> creates a pattern for a solid | |
2491 opaque color.</p> | |
2492 <p>Other than various | |
2493 <code class="function">cairo_pattern_create_<span class="emphasis"><em>type</em></span>()</code> | |
2494 functions, some of the pattern types can be implicitly created using various | |
2495 <code class="function">cairo_set_source_<span class="emphasis"><em>type</em></span>()</code> functions; | |
2496 for example <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgb" title="cairo_set_source_rgb ()"><code class="function">cairo_set_source_rgb()</code></a>.</p> | |
2497 <p>The type of a pattern can be queried with <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-type" title="cairo_pattern_get_type ()"><code class="function">cairo_pattern_get_type()</code></a>.</p> | |
2498 <p>Memory management of <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> is done with | |
2499 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-reference" title="cairo_pattern_reference ()"><code class="function">cairo_pattern_reference()</code></a> and <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a>.</p> | |
2500 <p class="since">Since: 1.0</p> | |
2501 </div> | |
2502 <hr> | |
2503 <div class="refsect2"> | |
2504 <a name="cairo-extend-t"></a><h3>enum cairo_extend_t</h3> | |
2505 <p><a class="link" href="cairo-cairo-pattern-t.html#cairo-extend-t" title="enum cairo_extend_t"><span class="type">cairo_extend_t</span></a> is used to describe how pattern color/alpha will be | |
2506 determined for areas "outside" the pattern's natural area, (for | |
2507 example, outside the surface bounds or outside the gradient | |
2508 geometry).</p> | |
2509 <p>Mesh patterns are not affected by the extend mode.</p> | |
2510 <p>The default extend mode is <a class="link" href="cairo-cairo-pattern-t.html#CAIRO-EXTEND-NONE:CAPS"><code class="literal">CAIRO_EXTEND_NONE</code></a> for surface patterns | |
2511 and <a class="link" href="cairo-cairo-pattern-t.html#CAIRO-EXTEND-PAD:CAPS"><code class="literal">CAIRO_EXTEND_PAD</code></a> for gradient patterns.</p> | |
2512 <p>New entries may be added in future versions.</p> | |
2513 <div class="refsect3"> | |
2514 <a name="cairo-extend-t.members"></a><h4>Members</h4> | |
2515 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2516 <colgroup> | |
2517 <col width="300px" class="enum_members_name"> | |
2518 <col class="enum_members_description"> | |
2519 <col width="200px" class="enum_members_annotations"> | |
2520 </colgroup> | |
2521 <tbody> | |
2522 <tr> | |
2523 <td class="enum_member_name"><p><a name="CAIRO-EXTEND-NONE:CAPS"></a>CAIRO_EXTEND_NONE</p></td> | |
2524 <td class="enum_member_description"> | |
2525 <p>pixels outside of the source pattern | |
2526 are fully transparent (Since 1.0)</p> | |
2527 </td> | |
2528 <td class="enum_member_annotations"> </td> | |
2529 </tr> | |
2530 <tr> | |
2531 <td class="enum_member_name"><p><a name="CAIRO-EXTEND-REPEAT:CAPS"></a>CAIRO_EXTEND_REPEAT</p></td> | |
2532 <td class="enum_member_description"> | |
2533 <p>the pattern is tiled by repeating (Since 1.0)</p> | |
2534 </td> | |
2535 <td class="enum_member_annotations"> </td> | |
2536 </tr> | |
2537 <tr> | |
2538 <td class="enum_member_name"><p><a name="CAIRO-EXTEND-REFLECT:CAPS"></a>CAIRO_EXTEND_REFLECT</p></td> | |
2539 <td class="enum_member_description"> | |
2540 <p>the pattern is tiled by reflecting | |
2541 at the edges (Since 1.0; but only implemented for surface patterns since 1.6)</p> | |
2542 </td> | |
2543 <td class="enum_member_annotations"> </td> | |
2544 </tr> | |
2545 <tr> | |
2546 <td class="enum_member_name"><p><a name="CAIRO-EXTEND-PAD:CAPS"></a>CAIRO_EXTEND_PAD</p></td> | |
2547 <td class="enum_member_description"> | |
2548 <p>pixels outside of the pattern copy | |
2549 the closest pixel from the source (Since 1.2; but only | |
2550 implemented for surface patterns since 1.6)</p> | |
2551 </td> | |
2552 <td class="enum_member_annotations"> </td> | |
2553 </tr> | |
2554 </tbody> | |
2555 </table></div> | |
2556 </div> | |
2557 <p class="since">Since: 1.0</p> | |
2558 </div> | |
2559 <hr> | |
2560 <div class="refsect2"> | |
2561 <a name="cairo-filter-t"></a><h3>enum cairo_filter_t</h3> | |
2562 <p><a class="link" href="cairo-cairo-pattern-t.html#cairo-filter-t" title="enum cairo_filter_t"><span class="type">cairo_filter_t</span></a> is used to indicate what filtering should be | |
2563 applied when reading pixel values from patterns. See | |
2564 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-filter" title="cairo_pattern_set_filter ()"><code class="function">cairo_pattern_set_filter()</code></a> for indicating the desired filter to be | |
2565 used with a particular pattern.</p> | |
2566 <div class="refsect3"> | |
2567 <a name="cairo-filter-t.members"></a><h4>Members</h4> | |
2568 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2569 <colgroup> | |
2570 <col width="300px" class="enum_members_name"> | |
2571 <col class="enum_members_description"> | |
2572 <col width="200px" class="enum_members_annotations"> | |
2573 </colgroup> | |
2574 <tbody> | |
2575 <tr> | |
2576 <td class="enum_member_name"><p><a name="CAIRO-FILTER-FAST:CAPS"></a>CAIRO_FILTER_FAST</p></td> | |
2577 <td class="enum_member_description"> | |
2578 <p>A high-performance filter, with quality similar | |
2579 to <a class="link" href="cairo-cairo-pattern-t.html#CAIRO-FILTER-NEAREST:CAPS"><code class="literal">CAIRO_FILTER_NEAREST</code></a> (Since 1.0)</p> | |
2580 </td> | |
2581 <td class="enum_member_annotations"> </td> | |
2582 </tr> | |
2583 <tr> | |
2584 <td class="enum_member_name"><p><a name="CAIRO-FILTER-GOOD:CAPS"></a>CAIRO_FILTER_GOOD</p></td> | |
2585 <td class="enum_member_description"> | |
2586 <p>A reasonable-performance filter, with quality | |
2587 similar to <a class="link" href="cairo-cairo-pattern-t.html#CAIRO-FILTER-BILINEAR:CAPS"><code class="literal">CAIRO_FILTER_BILINEAR</code></a> (Since 1.0)</p> | |
2588 </td> | |
2589 <td class="enum_member_annotations"> </td> | |
2590 </tr> | |
2591 <tr> | |
2592 <td class="enum_member_name"><p><a name="CAIRO-FILTER-BEST:CAPS"></a>CAIRO_FILTER_BEST</p></td> | |
2593 <td class="enum_member_description"> | |
2594 <p>The highest-quality available, performance may | |
2595 not be suitable for interactive use. (Since 1.0)</p> | |
2596 </td> | |
2597 <td class="enum_member_annotations"> </td> | |
2598 </tr> | |
2599 <tr> | |
2600 <td class="enum_member_name"><p><a name="CAIRO-FILTER-NEAREST:CAPS"></a>CAIRO_FILTER_NEAREST</p></td> | |
2601 <td class="enum_member_description"> | |
2602 <p>Nearest-neighbor filtering (Since 1.0)</p> | |
2603 </td> | |
2604 <td class="enum_member_annotations"> </td> | |
2605 </tr> | |
2606 <tr> | |
2607 <td class="enum_member_name"><p><a name="CAIRO-FILTER-BILINEAR:CAPS"></a>CAIRO_FILTER_BILINEAR</p></td> | |
2608 <td class="enum_member_description"> | |
2609 <p>Linear interpolation in two dimensions (Since 1.0)</p> | |
2610 </td> | |
2611 <td class="enum_member_annotations"> </td> | |
2612 </tr> | |
2613 <tr> | |
2614 <td class="enum_member_name"><p><a name="CAIRO-FILTER-GAUSSIAN:CAPS"></a>CAIRO_FILTER_GAUSSIAN</p></td> | |
2615 <td class="enum_member_description"> | |
2616 <p>This filter value is currently | |
2617 unimplemented, and should not be used in current code. (Since 1.0)</p> | |
2618 </td> | |
2619 <td class="enum_member_annotations"> </td> | |
2620 </tr> | |
2621 </tbody> | |
2622 </table></div> | |
2623 </div> | |
2624 <p class="since">Since: 1.0</p> | |
2625 </div> | |
2626 <hr> | |
2627 <div class="refsect2"> | |
2628 <a name="cairo-pattern-type-t"></a><h3>enum cairo_pattern_type_t</h3> | |
2629 <p><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-type-t" title="enum cairo_pattern_type_t"><span class="type">cairo_pattern_type_t</span></a> is used to describe the type of a given pattern.</p> | |
2630 <p>The type of a pattern is determined by the function used to create | |
2631 it. The <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-rgb" title="cairo_pattern_create_rgb ()"><code class="function">cairo_pattern_create_rgb()</code></a> and <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-rgba" title="cairo_pattern_create_rgba ()"><code class="function">cairo_pattern_create_rgba()</code></a> | |
2632 functions create SOLID patterns. The remaining | |
2633 cairo_pattern_create functions map to pattern types in obvious | |
2634 ways.</p> | |
2635 <p>The pattern type can be queried with <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-get-type" title="cairo_pattern_get_type ()"><code class="function">cairo_pattern_get_type()</code></a></p> | |
2636 <p>Most <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> functions can be called with a pattern of any | |
2637 type, (though trying to change the extend or filter for a solid | |
2638 pattern will have no effect). A notable exception is | |
2639 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-add-color-stop-rgb" title="cairo_pattern_add_color_stop_rgb ()"><code class="function">cairo_pattern_add_color_stop_rgb()</code></a> and | |
2640 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-add-color-stop-rgba" title="cairo_pattern_add_color_stop_rgba ()"><code class="function">cairo_pattern_add_color_stop_rgba()</code></a> which must only be called with | |
2641 gradient patterns (either LINEAR or RADIAL). Otherwise the pattern | |
2642 will be shutdown and put into an error state.</p> | |
2643 <p>New entries may be added in future versions.</p> | |
2644 <div class="refsect3"> | |
2645 <a name="cairo-pattern-type-t.members"></a><h4>Members</h4> | |
2646 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
2647 <colgroup> | |
2648 <col width="300px" class="enum_members_name"> | |
2649 <col class="enum_members_description"> | |
2650 <col width="200px" class="enum_members_annotations"> | |
2651 </colgroup> | |
2652 <tbody> | |
2653 <tr> | |
2654 <td class="enum_member_name"><p><a name="CAIRO-PATTERN-TYPE-SOLID:CAPS"></a>CAIRO_PATTERN_TYPE_SOLID</p></td> | |
2655 <td class="enum_member_description"> | |
2656 <p>The pattern is a solid (uniform) | |
2657 color. It may be opaque or translucent, since 1.2.</p> | |
2658 </td> | |
2659 <td class="enum_member_annotations"> </td> | |
2660 </tr> | |
2661 <tr> | |
2662 <td class="enum_member_name"><p><a name="CAIRO-PATTERN-TYPE-SURFACE:CAPS"></a>CAIRO_PATTERN_TYPE_SURFACE</p></td> | |
2663 <td class="enum_member_description"> | |
2664 <p>The pattern is a based on a surface (an image), since 1.2.</p> | |
2665 </td> | |
2666 <td class="enum_member_annotations"> </td> | |
2667 </tr> | |
2668 <tr> | |
2669 <td class="enum_member_name"><p><a name="CAIRO-PATTERN-TYPE-LINEAR:CAPS"></a>CAIRO_PATTERN_TYPE_LINEAR</p></td> | |
2670 <td class="enum_member_description"> | |
2671 <p>The pattern is a linear gradient, since 1.2.</p> | |
2672 </td> | |
2673 <td class="enum_member_annotations"> </td> | |
2674 </tr> | |
2675 <tr> | |
2676 <td class="enum_member_name"><p><a name="CAIRO-PATTERN-TYPE-RADIAL:CAPS"></a>CAIRO_PATTERN_TYPE_RADIAL</p></td> | |
2677 <td class="enum_member_description"> | |
2678 <p>The pattern is a radial gradient, since 1.2.</p> | |
2679 </td> | |
2680 <td class="enum_member_annotations"> </td> | |
2681 </tr> | |
2682 <tr> | |
2683 <td class="enum_member_name"><p><a name="CAIRO-PATTERN-TYPE-MESH:CAPS"></a>CAIRO_PATTERN_TYPE_MESH</p></td> | |
2684 <td class="enum_member_description"> | |
2685 <p>The pattern is a mesh, since 1.12.</p> | |
2686 </td> | |
2687 <td class="enum_member_annotations"> </td> | |
2688 </tr> | |
2689 <tr> | |
2690 <td class="enum_member_name"><p><a name="CAIRO-PATTERN-TYPE-RASTER-SOURCE:CAPS"></a>CAIRO_PATTERN_TYPE_RASTER_SOURCE</p></td> | |
2691 <td class="enum_member_description"> | |
2692 <p>The pattern is a user pattern providing raster data, since 1.12.</p> | |
2693 </td> | |
2694 <td class="enum_member_annotations"> </td> | |
2695 </tr> | |
2696 </tbody> | |
2697 </table></div> | |
2698 </div> | |
2699 <p class="since">Since: 1.2</p> | |
2700 </div> | |
2701 </div> | |
2702 <div class="refsect1"> | |
2703 <a name="cairo-cairo-pattern-t.see-also"></a><h2>See Also</h2> | |
2704 <p><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>, <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p> | |
2705 </div> | |
2706 </div> | |
2707 <div class="footer"> | |
2708 <hr>Generated by GTK-Doc V1.27</div> | |
2709 </body> | |
2710 </html> |