comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gtk-doc/html/cairo/cairo-Raster-Sources.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>Raster Sources: 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-text.html" title="text">
10 <link rel="next" href="cairo-Tags-and-Links.html" title="Tags and Links">
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-Raster-Sources.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-text.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="cairo-Tags-and-Links.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-Raster-Sources"></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-Raster-Sources.top_of_page"></a>Raster Sources</span></h2>
30 <p>Raster Sources — Supplying arbitrary image data</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-Raster-Sources.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 <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> *
45 </td>
46 <td class="function_name">
47 <a class="link" href="cairo-Raster-Sources.html#cairo-pattern-create-raster-source" title="cairo_pattern_create_raster_source ()">cairo_pattern_create_raster_source</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-Raster-Sources.html#cairo-raster-source-pattern-set-callback-data" title="cairo_raster_source_pattern_set_callback_data ()">cairo_raster_source_pattern_set_callback_data</a> <span class="c_punctuation">()</span>
56 </td>
57 </tr>
58 <tr>
59 <td class="function_type">
60 <span class="returnvalue">void</span> *
61 </td>
62 <td class="function_name">
63 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-pattern-get-callback-data" title="cairo_raster_source_pattern_get_callback_data ()">cairo_raster_source_pattern_get_callback_data</a> <span class="c_punctuation">()</span>
64 </td>
65 </tr>
66 <tr>
67 <td class="function_type">
68 <span class="returnvalue">void</span>
69 </td>
70 <td class="function_name">
71 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-pattern-set-acquire" title="cairo_raster_source_pattern_set_acquire ()">cairo_raster_source_pattern_set_acquire</a> <span class="c_punctuation">()</span>
72 </td>
73 </tr>
74 <tr>
75 <td class="function_type">
76 <span class="returnvalue">void</span>
77 </td>
78 <td class="function_name">
79 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-pattern-get-acquire" title="cairo_raster_source_pattern_get_acquire ()">cairo_raster_source_pattern_get_acquire</a> <span class="c_punctuation">()</span>
80 </td>
81 </tr>
82 <tr>
83 <td class="function_type">
84 <span class="returnvalue">void</span>
85 </td>
86 <td class="function_name">
87 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-pattern-set-snapshot" title="cairo_raster_source_pattern_set_snapshot ()">cairo_raster_source_pattern_set_snapshot</a> <span class="c_punctuation">()</span>
88 </td>
89 </tr>
90 <tr>
91 <td class="function_type">
92 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-snapshot-func-t" title="cairo_raster_source_snapshot_func_t ()"><span class="returnvalue">cairo_raster_source_snapshot_func_t</span></a>
93 </td>
94 <td class="function_name">
95 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-pattern-get-snapshot" title="cairo_raster_source_pattern_get_snapshot ()">cairo_raster_source_pattern_get_snapshot</a> <span class="c_punctuation">()</span>
96 </td>
97 </tr>
98 <tr>
99 <td class="function_type">
100 <span class="returnvalue">void</span>
101 </td>
102 <td class="function_name">
103 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-pattern-set-copy" title="cairo_raster_source_pattern_set_copy ()">cairo_raster_source_pattern_set_copy</a> <span class="c_punctuation">()</span>
104 </td>
105 </tr>
106 <tr>
107 <td class="function_type">
108 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-copy-func-t" title="cairo_raster_source_copy_func_t ()"><span class="returnvalue">cairo_raster_source_copy_func_t</span></a>
109 </td>
110 <td class="function_name">
111 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-pattern-get-copy" title="cairo_raster_source_pattern_get_copy ()">cairo_raster_source_pattern_get_copy</a> <span class="c_punctuation">()</span>
112 </td>
113 </tr>
114 <tr>
115 <td class="function_type">
116 <span class="returnvalue">void</span>
117 </td>
118 <td class="function_name">
119 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-pattern-set-finish" title="cairo_raster_source_pattern_set_finish ()">cairo_raster_source_pattern_set_finish</a> <span class="c_punctuation">()</span>
120 </td>
121 </tr>
122 <tr>
123 <td class="function_type">
124 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-finish-func-t" title="cairo_raster_source_finish_func_t ()"><span class="returnvalue">cairo_raster_source_finish_func_t</span></a>
125 </td>
126 <td class="function_name">
127 <a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-pattern-get-finish" title="cairo_raster_source_pattern_get_finish ()">cairo_raster_source_pattern_get_finish</a> <span class="c_punctuation">()</span>
128 </td>
129 </tr>
130 <tr>
131 <td class="function_type">
132 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a>
133 </td>
134 <td class="function_name">
135 <span class="c_punctuation">(</span><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-acquire-func-t" title="cairo_raster_source_acquire_func_t ()">*cairo_raster_source_acquire_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
136 </td>
137 </tr>
138 <tr>
139 <td class="function_type">
140 <span class="returnvalue">void</span>
141 </td>
142 <td class="function_name">
143 <span class="c_punctuation">(</span><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-release-func-t" title="cairo_raster_source_release_func_t ()">*cairo_raster_source_release_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
144 </td>
145 </tr>
146 <tr>
147 <td class="function_type">
148 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
149 </td>
150 <td class="function_name">
151 <span class="c_punctuation">(</span><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-snapshot-func-t" title="cairo_raster_source_snapshot_func_t ()">*cairo_raster_source_snapshot_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
152 </td>
153 </tr>
154 <tr>
155 <td class="function_type">
156 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
157 </td>
158 <td class="function_name">
159 <span class="c_punctuation">(</span><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-copy-func-t" title="cairo_raster_source_copy_func_t ()">*cairo_raster_source_copy_func_t</a><span class="c_punctuation">)</span> <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 <span class="c_punctuation">(</span><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-finish-func-t" title="cairo_raster_source_finish_func_t ()">*cairo_raster_source_finish_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
168 </td>
169 </tr>
170 </tbody>
171 </table></div>
172 </div>
173 <div class="refsect1">
174 <a name="cairo-Raster-Sources.description"></a><h2>Description</h2>
175 <p>The raster source provides the ability to supply arbitrary pixel data
176 whilst rendering. The pixels are queried at the time of rasterisation
177 by means of user callback functions, allowing for the ultimate
178 flexibility. For example, in handling compressed image sources, you
179 may keep a MRU cache of decompressed images and decompress sources on the
180 fly and discard old ones to conserve memory.</p>
181 <p>For the raster source to be effective, you must at least specify
182 the acquire and release callbacks which are used to retrieve the pixel
183 data for the region of interest and demark when it can be freed afterwards.
184 Other callbacks are provided for when the pattern is copied temporarily
185 during rasterisation, or more permanently as a snapshot in order to keep
186 the pixel data available for printing.</p>
187 </div>
188 <div class="refsect1">
189 <a name="cairo-Raster-Sources.functions_details"></a><h2>Functions</h2>
190 <div class="refsect2">
191 <a name="cairo-pattern-create-raster-source"></a><h3>cairo_pattern_create_raster_source ()</h3>
192 <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> *
193 cairo_pattern_create_raster_source (<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
194 <em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> content</code></em>,
195 <em class="parameter"><code><span class="type">int</span> width</code></em>,
196 <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
197 <p>Creates a new user pattern for providing pixel data.</p>
198 <p>Use the setter functions to associate callbacks with the returned
199 pattern. The only mandatory callback is acquire.</p>
200 <div class="refsect3">
201 <a name="cairo-pattern-create-raster-source.parameters"></a><h4>Parameters</h4>
202 <div class="informaltable"><table class="informaltable" width="100%" border="0">
203 <colgroup>
204 <col width="150px" class="parameters_name">
205 <col class="parameters_description">
206 <col width="200px" class="parameters_annotations">
207 </colgroup>
208 <tbody>
209 <tr>
210 <td class="parameter_name"><p>user_data</p></td>
211 <td class="parameter_description"><p>the user data to be passed to all callbacks</p></td>
212 <td class="parameter_annotations"> </td>
213 </tr>
214 <tr>
215 <td class="parameter_name"><p>content</p></td>
216 <td class="parameter_description"><p>content type for the pixel data that will be returned. Knowing
217 the content type ahead of time is used for analysing the operation and
218 picking the appropriate rendering path.</p></td>
219 <td class="parameter_annotations"> </td>
220 </tr>
221 <tr>
222 <td class="parameter_name"><p>width</p></td>
223 <td class="parameter_description"><p>maximum size of the sample area</p></td>
224 <td class="parameter_annotations"> </td>
225 </tr>
226 <tr>
227 <td class="parameter_name"><p>height</p></td>
228 <td class="parameter_description"><p>maximum size of the sample area</p></td>
229 <td class="parameter_annotations"> </td>
230 </tr>
231 </tbody>
232 </table></div>
233 </div>
234 <div class="refsect3">
235 <a name="cairo-pattern-create-raster-source.returns"></a><h4>Returns</h4>
236 <p> a 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>. Free with
237 <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 you are done using it.</p>
238 </div>
239 <p class="since">Since: 1.12</p>
240 </div>
241 <hr>
242 <div class="refsect2">
243 <a name="cairo-raster-source-pattern-set-callback-data"></a><h3>cairo_raster_source_pattern_set_callback_data ()</h3>
244 <pre class="programlisting"><span class="returnvalue">void</span>
245 cairo_raster_source_pattern_set_callback_data
246 (<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>,
247 <em class="parameter"><code><span class="type">void</span> *data</code></em>);</pre>
248 <p>Updates the user data that is provided to all callbacks.</p>
249 <div class="refsect3">
250 <a name="cairo-raster-source-pattern-set-callback-data.parameters"></a><h4>Parameters</h4>
251 <div class="informaltable"><table class="informaltable" width="100%" border="0">
252 <colgroup>
253 <col width="150px" class="parameters_name">
254 <col class="parameters_description">
255 <col width="200px" class="parameters_annotations">
256 </colgroup>
257 <tbody>
258 <tr>
259 <td class="parameter_name"><p>pattern</p></td>
260 <td class="parameter_description"><p>the pattern to update</p></td>
261 <td class="parameter_annotations"> </td>
262 </tr>
263 <tr>
264 <td class="parameter_name"><p>data</p></td>
265 <td class="parameter_description"><p>the user data to be passed to all callbacks</p></td>
266 <td class="parameter_annotations"> </td>
267 </tr>
268 </tbody>
269 </table></div>
270 </div>
271 <p class="since">Since: 1.12</p>
272 </div>
273 <hr>
274 <div class="refsect2">
275 <a name="cairo-raster-source-pattern-get-callback-data"></a><h3>cairo_raster_source_pattern_get_callback_data ()</h3>
276 <pre class="programlisting"><span class="returnvalue">void</span> *
277 cairo_raster_source_pattern_get_callback_data
278 (<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>
279 <p>Queries the current user data.</p>
280 <div class="refsect3">
281 <a name="cairo-raster-source-pattern-get-callback-data.parameters"></a><h4>Parameters</h4>
282 <div class="informaltable"><table class="informaltable" width="100%" border="0">
283 <colgroup>
284 <col width="150px" class="parameters_name">
285 <col class="parameters_description">
286 <col width="200px" class="parameters_annotations">
287 </colgroup>
288 <tbody><tr>
289 <td class="parameter_name"><p>pattern</p></td>
290 <td class="parameter_description"><p>the pattern to update</p></td>
291 <td class="parameter_annotations"> </td>
292 </tr></tbody>
293 </table></div>
294 </div>
295 <div class="refsect3">
296 <a name="cairo-raster-source-pattern-get-callback-data.returns"></a><h4>Returns</h4>
297 <p> the current user-data passed to each callback</p>
298 </div>
299 <p class="since">Since: 1.12</p>
300 </div>
301 <hr>
302 <div class="refsect2">
303 <a name="cairo-raster-source-pattern-set-acquire"></a><h3>cairo_raster_source_pattern_set_acquire ()</h3>
304 <pre class="programlisting"><span class="returnvalue">void</span>
305 cairo_raster_source_pattern_set_acquire
306 (<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>,
307 <em class="parameter"><code><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-acquire-func-t" title="cairo_raster_source_acquire_func_t ()"><span class="type">cairo_raster_source_acquire_func_t</span></a> acquire</code></em>,
308 <em class="parameter"><code><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-release-func-t" title="cairo_raster_source_release_func_t ()"><span class="type">cairo_raster_source_release_func_t</span></a> release</code></em>);</pre>
309 <p>Specifies the callbacks used to generate the image surface for a rendering
310 operation (acquire) and the function used to cleanup that surface afterwards.</p>
311 <p>The <em class="parameter"><code>acquire</code></em>
312 callback should create a surface (preferably an image
313 surface created to match the target using
314 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-create-similar-image" title="cairo_surface_create_similar_image ()"><code class="function">cairo_surface_create_similar_image()</code></a>) that defines at least the region
315 of interest specified by extents. The surface is allowed to be the entire
316 sample area, but if it does contain a subsection of the sample area,
317 the surface extents should be provided by setting the device offset (along
318 with its width and height) using <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-set-device-offset" title="cairo_surface_set_device_offset ()"><code class="function">cairo_surface_set_device_offset()</code></a>.</p>
319 <div class="refsect3">
320 <a name="cairo-raster-source-pattern-set-acquire.parameters"></a><h4>Parameters</h4>
321 <div class="informaltable"><table class="informaltable" width="100%" border="0">
322 <colgroup>
323 <col width="150px" class="parameters_name">
324 <col class="parameters_description">
325 <col width="200px" class="parameters_annotations">
326 </colgroup>
327 <tbody>
328 <tr>
329 <td class="parameter_name"><p>pattern</p></td>
330 <td class="parameter_description"><p>the pattern to update</p></td>
331 <td class="parameter_annotations"> </td>
332 </tr>
333 <tr>
334 <td class="parameter_name"><p>acquire</p></td>
335 <td class="parameter_description"><p>acquire callback</p></td>
336 <td class="parameter_annotations"> </td>
337 </tr>
338 <tr>
339 <td class="parameter_name"><p>release</p></td>
340 <td class="parameter_description"><p>release callback</p></td>
341 <td class="parameter_annotations"> </td>
342 </tr>
343 </tbody>
344 </table></div>
345 </div>
346 <p class="since">Since: 1.12</p>
347 </div>
348 <hr>
349 <div class="refsect2">
350 <a name="cairo-raster-source-pattern-get-acquire"></a><h3>cairo_raster_source_pattern_get_acquire ()</h3>
351 <pre class="programlisting"><span class="returnvalue">void</span>
352 cairo_raster_source_pattern_get_acquire
353 (<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>,
354 <em class="parameter"><code><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-acquire-func-t" title="cairo_raster_source_acquire_func_t ()"><span class="type">cairo_raster_source_acquire_func_t</span></a> *acquire</code></em>,
355 <em class="parameter"><code><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-release-func-t" title="cairo_raster_source_release_func_t ()"><span class="type">cairo_raster_source_release_func_t</span></a> *release</code></em>);</pre>
356 <p>Queries the current acquire and release callbacks.</p>
357 <div class="refsect3">
358 <a name="cairo-raster-source-pattern-get-acquire.parameters"></a><h4>Parameters</h4>
359 <div class="informaltable"><table class="informaltable" width="100%" border="0">
360 <colgroup>
361 <col width="150px" class="parameters_name">
362 <col class="parameters_description">
363 <col width="200px" class="parameters_annotations">
364 </colgroup>
365 <tbody>
366 <tr>
367 <td class="parameter_name"><p>pattern</p></td>
368 <td class="parameter_description"><p>the pattern to query</p></td>
369 <td class="parameter_annotations"> </td>
370 </tr>
371 <tr>
372 <td class="parameter_name"><p>acquire</p></td>
373 <td class="parameter_description"><p>return value for the current acquire callback</p></td>
374 <td class="parameter_annotations"> </td>
375 </tr>
376 <tr>
377 <td class="parameter_name"><p>release</p></td>
378 <td class="parameter_description"><p>return value for the current release callback</p></td>
379 <td class="parameter_annotations"> </td>
380 </tr>
381 </tbody>
382 </table></div>
383 </div>
384 <p class="since">Since: 1.12</p>
385 </div>
386 <hr>
387 <div class="refsect2">
388 <a name="cairo-raster-source-pattern-set-snapshot"></a><h3>cairo_raster_source_pattern_set_snapshot ()</h3>
389 <pre class="programlisting"><span class="returnvalue">void</span>
390 cairo_raster_source_pattern_set_snapshot
391 (<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>,
392 <em class="parameter"><code><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-snapshot-func-t" title="cairo_raster_source_snapshot_func_t ()"><span class="type">cairo_raster_source_snapshot_func_t</span></a> snapshot</code></em>);</pre>
393 <p>Sets the callback that will be used whenever a snapshot is taken of the
394 pattern, that is whenever the current contents of the pattern should be
395 preserved for later use. This is typically invoked whilst printing.</p>
396 <div class="refsect3">
397 <a name="cairo-raster-source-pattern-set-snapshot.parameters"></a><h4>Parameters</h4>
398 <div class="informaltable"><table class="informaltable" width="100%" border="0">
399 <colgroup>
400 <col width="150px" class="parameters_name">
401 <col class="parameters_description">
402 <col width="200px" class="parameters_annotations">
403 </colgroup>
404 <tbody>
405 <tr>
406 <td class="parameter_name"><p>pattern</p></td>
407 <td class="parameter_description"><p>the pattern to update</p></td>
408 <td class="parameter_annotations"> </td>
409 </tr>
410 <tr>
411 <td class="parameter_name"><p>snapshot</p></td>
412 <td class="parameter_description"><p>snapshot callback</p></td>
413 <td class="parameter_annotations"> </td>
414 </tr>
415 </tbody>
416 </table></div>
417 </div>
418 <p class="since">Since: 1.12</p>
419 </div>
420 <hr>
421 <div class="refsect2">
422 <a name="cairo-raster-source-pattern-get-snapshot"></a><h3>cairo_raster_source_pattern_get_snapshot ()</h3>
423 <pre class="programlisting"><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-snapshot-func-t" title="cairo_raster_source_snapshot_func_t ()"><span class="returnvalue">cairo_raster_source_snapshot_func_t</span></a>
424 cairo_raster_source_pattern_get_snapshot
425 (<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>
426 <p>Queries the current snapshot callback.</p>
427 <div class="refsect3">
428 <a name="cairo-raster-source-pattern-get-snapshot.parameters"></a><h4>Parameters</h4>
429 <div class="informaltable"><table class="informaltable" width="100%" border="0">
430 <colgroup>
431 <col width="150px" class="parameters_name">
432 <col class="parameters_description">
433 <col width="200px" class="parameters_annotations">
434 </colgroup>
435 <tbody><tr>
436 <td class="parameter_name"><p>pattern</p></td>
437 <td class="parameter_description"><p>the pattern to query</p></td>
438 <td class="parameter_annotations"> </td>
439 </tr></tbody>
440 </table></div>
441 </div>
442 <div class="refsect3">
443 <a name="cairo-raster-source-pattern-get-snapshot.returns"></a><h4>Returns</h4>
444 <p> the current snapshot callback</p>
445 </div>
446 <p class="since">Since: 1.12</p>
447 </div>
448 <hr>
449 <div class="refsect2">
450 <a name="cairo-raster-source-pattern-set-copy"></a><h3>cairo_raster_source_pattern_set_copy ()</h3>
451 <pre class="programlisting"><span class="returnvalue">void</span>
452 cairo_raster_source_pattern_set_copy (<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>,
453 <em class="parameter"><code><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-copy-func-t" title="cairo_raster_source_copy_func_t ()"><span class="type">cairo_raster_source_copy_func_t</span></a> copy</code></em>);</pre>
454 <p>Updates the copy callback which is used whenever a temporary copy of the
455 pattern is taken.</p>
456 <div class="refsect3">
457 <a name="cairo-raster-source-pattern-set-copy.parameters"></a><h4>Parameters</h4>
458 <div class="informaltable"><table class="informaltable" width="100%" border="0">
459 <colgroup>
460 <col width="150px" class="parameters_name">
461 <col class="parameters_description">
462 <col width="200px" class="parameters_annotations">
463 </colgroup>
464 <tbody>
465 <tr>
466 <td class="parameter_name"><p>pattern</p></td>
467 <td class="parameter_description"><p>the pattern to update</p></td>
468 <td class="parameter_annotations"> </td>
469 </tr>
470 <tr>
471 <td class="parameter_name"><p>copy</p></td>
472 <td class="parameter_description"><p>the copy callback</p></td>
473 <td class="parameter_annotations"> </td>
474 </tr>
475 </tbody>
476 </table></div>
477 </div>
478 <p class="since">Since: 1.12</p>
479 </div>
480 <hr>
481 <div class="refsect2">
482 <a name="cairo-raster-source-pattern-get-copy"></a><h3>cairo_raster_source_pattern_get_copy ()</h3>
483 <pre class="programlisting"><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-copy-func-t" title="cairo_raster_source_copy_func_t ()"><span class="returnvalue">cairo_raster_source_copy_func_t</span></a>
484 cairo_raster_source_pattern_get_copy (<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>
485 <p>Queries the current copy callback.</p>
486 <div class="refsect3">
487 <a name="cairo-raster-source-pattern-get-copy.parameters"></a><h4>Parameters</h4>
488 <div class="informaltable"><table class="informaltable" width="100%" border="0">
489 <colgroup>
490 <col width="150px" class="parameters_name">
491 <col class="parameters_description">
492 <col width="200px" class="parameters_annotations">
493 </colgroup>
494 <tbody><tr>
495 <td class="parameter_name"><p>pattern</p></td>
496 <td class="parameter_description"><p>the pattern to query</p></td>
497 <td class="parameter_annotations"> </td>
498 </tr></tbody>
499 </table></div>
500 </div>
501 <div class="refsect3">
502 <a name="cairo-raster-source-pattern-get-copy.returns"></a><h4>Returns</h4>
503 <p> the current copy callback</p>
504 </div>
505 <p class="since">Since: 1.12</p>
506 </div>
507 <hr>
508 <div class="refsect2">
509 <a name="cairo-raster-source-pattern-set-finish"></a><h3>cairo_raster_source_pattern_set_finish ()</h3>
510 <pre class="programlisting"><span class="returnvalue">void</span>
511 cairo_raster_source_pattern_set_finish
512 (<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>,
513 <em class="parameter"><code><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-finish-func-t" title="cairo_raster_source_finish_func_t ()"><span class="type">cairo_raster_source_finish_func_t</span></a> finish</code></em>);</pre>
514 <p>Updates the finish callback which is used whenever a pattern (or a copy
515 thereof) will no longer be used.</p>
516 <div class="refsect3">
517 <a name="cairo-raster-source-pattern-set-finish.parameters"></a><h4>Parameters</h4>
518 <div class="informaltable"><table class="informaltable" width="100%" border="0">
519 <colgroup>
520 <col width="150px" class="parameters_name">
521 <col class="parameters_description">
522 <col width="200px" class="parameters_annotations">
523 </colgroup>
524 <tbody>
525 <tr>
526 <td class="parameter_name"><p>pattern</p></td>
527 <td class="parameter_description"><p>the pattern to update</p></td>
528 <td class="parameter_annotations"> </td>
529 </tr>
530 <tr>
531 <td class="parameter_name"><p>finish</p></td>
532 <td class="parameter_description"><p>the finish callback</p></td>
533 <td class="parameter_annotations"> </td>
534 </tr>
535 </tbody>
536 </table></div>
537 </div>
538 <p class="since">Since: 1.12</p>
539 </div>
540 <hr>
541 <div class="refsect2">
542 <a name="cairo-raster-source-pattern-get-finish"></a><h3>cairo_raster_source_pattern_get_finish ()</h3>
543 <pre class="programlisting"><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-finish-func-t" title="cairo_raster_source_finish_func_t ()"><span class="returnvalue">cairo_raster_source_finish_func_t</span></a>
544 cairo_raster_source_pattern_get_finish
545 (<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>
546 <p>Queries the current finish callback.</p>
547 <div class="refsect3">
548 <a name="cairo-raster-source-pattern-get-finish.parameters"></a><h4>Parameters</h4>
549 <div class="informaltable"><table class="informaltable" width="100%" border="0">
550 <colgroup>
551 <col width="150px" class="parameters_name">
552 <col class="parameters_description">
553 <col width="200px" class="parameters_annotations">
554 </colgroup>
555 <tbody><tr>
556 <td class="parameter_name"><p>pattern</p></td>
557 <td class="parameter_description"><p>the pattern to query</p></td>
558 <td class="parameter_annotations"> </td>
559 </tr></tbody>
560 </table></div>
561 </div>
562 <div class="refsect3">
563 <a name="cairo-raster-source-pattern-get-finish.returns"></a><h4>Returns</h4>
564 <p> the current finish callback</p>
565 </div>
566 <p class="since">Since: 1.12</p>
567 </div>
568 <hr>
569 <div class="refsect2">
570 <a name="cairo-raster-source-acquire-func-t"></a><h3>cairo_raster_source_acquire_func_t ()</h3>
571 <pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a>
572 <span class="c_punctuation">(</span>*cairo_raster_source_acquire_func_t<span class="c_punctuation">)</span> (<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>,
573 <em class="parameter"><code><span class="type">void</span> *callback_data</code></em>,
574 <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> *target</code></em>,
575 <em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-rectangle-int-t" title="cairo_rectangle_int_t"><span class="type">cairo_rectangle_int_t</span></a> *extents</code></em>);</pre>
576 <p><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-acquire-func-t" title="cairo_raster_source_acquire_func_t ()"><span class="type">cairo_raster_source_acquire_func_t</span></a> is the type of function which is
577 called when a pattern is being rendered from. It should create a surface
578 that provides the pixel data for the region of interest as defined by
579 extents, though the surface itself does not have to be limited to that
580 area. For convenience the surface should probably be of image type,
581 created with <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-create-similar-image" title="cairo_surface_create_similar_image ()"><code class="function">cairo_surface_create_similar_image()</code></a> for the target (which
582 enables the number of copies to be reduced during transfer to the
583 device). Another option, might be to return a similar surface to the
584 target for explicit handling by the application of a set of cached sources
585 on the device. The region of sample data provided should be defined using
586 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-set-device-offset" title="cairo_surface_set_device_offset ()"><code class="function">cairo_surface_set_device_offset()</code></a> to specify the top-left corner of the
587 sample data (along with width and height of the surface).</p>
588 <div class="refsect3">
589 <a name="cairo-raster-source-acquire-func-t.parameters"></a><h4>Parameters</h4>
590 <div class="informaltable"><table class="informaltable" width="100%" border="0">
591 <colgroup>
592 <col width="150px" class="parameters_name">
593 <col class="parameters_description">
594 <col width="200px" class="parameters_annotations">
595 </colgroup>
596 <tbody>
597 <tr>
598 <td class="parameter_name"><p>pattern</p></td>
599 <td class="parameter_description"><p>the pattern being rendered from</p></td>
600 <td class="parameter_annotations"> </td>
601 </tr>
602 <tr>
603 <td class="parameter_name"><p>callback_data</p></td>
604 <td class="parameter_description"><p>the user data supplied during creation</p></td>
605 <td class="parameter_annotations"> </td>
606 </tr>
607 <tr>
608 <td class="parameter_name"><p>target</p></td>
609 <td class="parameter_description"><p>the rendering target surface</p></td>
610 <td class="parameter_annotations"> </td>
611 </tr>
612 <tr>
613 <td class="parameter_name"><p>extents</p></td>
614 <td class="parameter_description"><p>rectangular region of interest in pixels in sample space</p></td>
615 <td class="parameter_annotations"> </td>
616 </tr>
617 </tbody>
618 </table></div>
619 </div>
620 <div class="refsect3">
621 <a name="cairo-raster-source-acquire-func-t.returns"></a><h4>Returns</h4>
622 <p> 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>
623 </div>
624 <p class="since">Since: 1.12</p>
625 </div>
626 <hr>
627 <div class="refsect2">
628 <a name="cairo-raster-source-release-func-t"></a><h3>cairo_raster_source_release_func_t ()</h3>
629 <pre class="programlisting"><span class="returnvalue">void</span>
630 <span class="c_punctuation">(</span>*cairo_raster_source_release_func_t<span class="c_punctuation">)</span> (<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>,
631 <em class="parameter"><code><span class="type">void</span> *callback_data</code></em>,
632 <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>
633 <p><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-release-func-t" title="cairo_raster_source_release_func_t ()"><span class="type">cairo_raster_source_release_func_t</span></a> is the type of function which is
634 called when the pixel data is no longer being access by the pattern
635 for the rendering operation. Typically this function will simply
636 destroy the surface created during acquire.</p>
637 <div class="refsect3">
638 <a name="cairo-raster-source-release-func-t.parameters"></a><h4>Parameters</h4>
639 <div class="informaltable"><table class="informaltable" width="100%" border="0">
640 <colgroup>
641 <col width="150px" class="parameters_name">
642 <col class="parameters_description">
643 <col width="200px" class="parameters_annotations">
644 </colgroup>
645 <tbody>
646 <tr>
647 <td class="parameter_name"><p>pattern</p></td>
648 <td class="parameter_description"><p>the pattern being rendered from</p></td>
649 <td class="parameter_annotations"> </td>
650 </tr>
651 <tr>
652 <td class="parameter_name"><p>callback_data</p></td>
653 <td class="parameter_description"><p>the user data supplied during creation</p></td>
654 <td class="parameter_annotations"> </td>
655 </tr>
656 <tr>
657 <td class="parameter_name"><p>surface</p></td>
658 <td class="parameter_description"><p>the surface created during acquire</p></td>
659 <td class="parameter_annotations"> </td>
660 </tr>
661 </tbody>
662 </table></div>
663 </div>
664 <p class="since">Since: 1.12</p>
665 </div>
666 <hr>
667 <div class="refsect2">
668 <a name="cairo-raster-source-snapshot-func-t"></a><h3>cairo_raster_source_snapshot_func_t ()</h3>
669 <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>
670 <span class="c_punctuation">(</span>*cairo_raster_source_snapshot_func_t<span class="c_punctuation">)</span>
671 (<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>,
672 <em class="parameter"><code><span class="type">void</span> *callback_data</code></em>);</pre>
673 <p><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-snapshot-func-t" title="cairo_raster_source_snapshot_func_t ()"><span class="type">cairo_raster_source_snapshot_func_t</span></a> is the type of function which is
674 called when the pixel data needs to be preserved for later use
675 during printing. This pattern will be accessed again later, and it
676 is expected to provide the pixel data that was current at the time
677 of snapshotting.</p>
678 <div class="refsect3">
679 <a name="cairo-raster-source-snapshot-func-t.parameters"></a><h4>Parameters</h4>
680 <div class="informaltable"><table class="informaltable" width="100%" border="0">
681 <colgroup>
682 <col width="150px" class="parameters_name">
683 <col class="parameters_description">
684 <col width="200px" class="parameters_annotations">
685 </colgroup>
686 <tbody>
687 <tr>
688 <td class="parameter_name"><p>pattern</p></td>
689 <td class="parameter_description"><p>the pattern being rendered from</p></td>
690 <td class="parameter_annotations"> </td>
691 </tr>
692 <tr>
693 <td class="parameter_name"><p>callback_data</p></td>
694 <td class="parameter_description"><p>the user data supplied during creation</p></td>
695 <td class="parameter_annotations"> </td>
696 </tr>
697 </tbody>
698 </table></div>
699 </div>
700 <div class="refsect3">
701 <a name="cairo-raster-source-snapshot-func-t.returns"></a><h4>Returns</h4>
702 <p> CAIRO_STATUS_SUCCESS on success, or one of the
703 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a> error codes for failure.</p>
704 </div>
705 <p class="since">Since: 1.12</p>
706 </div>
707 <hr>
708 <div class="refsect2">
709 <a name="cairo-raster-source-copy-func-t"></a><h3>cairo_raster_source_copy_func_t ()</h3>
710 <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>
711 <span class="c_punctuation">(</span>*cairo_raster_source_copy_func_t<span class="c_punctuation">)</span> (<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>,
712 <em class="parameter"><code><span class="type">void</span> *callback_data</code></em>,
713 <em class="parameter"><code>const <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *other</code></em>);</pre>
714 <p><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-copy-func-t" title="cairo_raster_source_copy_func_t ()"><span class="type">cairo_raster_source_copy_func_t</span></a> is the type of function which is
715 called when the pattern gets copied as a normal part of rendering.</p>
716 <div class="refsect3">
717 <a name="cairo-raster-source-copy-func-t.parameters"></a><h4>Parameters</h4>
718 <div class="informaltable"><table class="informaltable" width="100%" border="0">
719 <colgroup>
720 <col width="150px" class="parameters_name">
721 <col class="parameters_description">
722 <col width="200px" class="parameters_annotations">
723 </colgroup>
724 <tbody>
725 <tr>
726 <td class="parameter_name"><p>pattern</p></td>
727 <td class="parameter_description"><p>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> that was copied to</p></td>
728 <td class="parameter_annotations"> </td>
729 </tr>
730 <tr>
731 <td class="parameter_name"><p>callback_data</p></td>
732 <td class="parameter_description"><p>the user data supplied during creation</p></td>
733 <td class="parameter_annotations"> </td>
734 </tr>
735 <tr>
736 <td class="parameter_name"><p>other</p></td>
737 <td class="parameter_description"><p>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> being used as the source for the copy</p></td>
738 <td class="parameter_annotations"> </td>
739 </tr>
740 </tbody>
741 </table></div>
742 </div>
743 <div class="refsect3">
744 <a name="cairo-raster-source-copy-func-t.returns"></a><h4>Returns</h4>
745 <p> CAIRO_STATUS_SUCCESS on success, or one of the
746 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a> error codes for failure.</p>
747 </div>
748 <p class="since">Since: 1.12</p>
749 </div>
750 <hr>
751 <div class="refsect2">
752 <a name="cairo-raster-source-finish-func-t"></a><h3>cairo_raster_source_finish_func_t ()</h3>
753 <pre class="programlisting"><span class="returnvalue">void</span>
754 <span class="c_punctuation">(</span>*cairo_raster_source_finish_func_t<span class="c_punctuation">)</span> (<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>,
755 <em class="parameter"><code><span class="type">void</span> *callback_data</code></em>);</pre>
756 <p><a class="link" href="cairo-Raster-Sources.html#cairo-raster-source-finish-func-t" title="cairo_raster_source_finish_func_t ()"><span class="type">cairo_raster_source_finish_func_t</span></a> is the type of function which is
757 called when the pattern (or a copy thereof) is no longer required.</p>
758 <div class="refsect3">
759 <a name="cairo-raster-source-finish-func-t.parameters"></a><h4>Parameters</h4>
760 <div class="informaltable"><table class="informaltable" width="100%" border="0">
761 <colgroup>
762 <col width="150px" class="parameters_name">
763 <col class="parameters_description">
764 <col width="200px" class="parameters_annotations">
765 </colgroup>
766 <tbody>
767 <tr>
768 <td class="parameter_name"><p>pattern</p></td>
769 <td class="parameter_description"><p>the pattern being rendered from</p></td>
770 <td class="parameter_annotations"> </td>
771 </tr>
772 <tr>
773 <td class="parameter_name"><p>callback_data</p></td>
774 <td class="parameter_description"><p>the user data supplied during creation</p></td>
775 <td class="parameter_annotations"> </td>
776 </tr>
777 </tbody>
778 </table></div>
779 </div>
780 <p class="since">Since: 1.12</p>
781 </div>
782 </div>
783 <div class="refsect1">
784 <a name="cairo-Raster-Sources.other_details"></a><h2>Types and Values</h2>
785 </div>
786 <div class="refsect1">
787 <a name="cairo-Raster-Sources.see-also"></a><h2>See Also</h2>
788 <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></p>
789 </div>
790 </div>
791 <div class="footer">
792 <hr>Generated by GTK-Doc V1.27</div>
793 </body>
794 </html>