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