Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gtk-doc/html/cairo/cairo-Script-Surfaces.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>Script Surfaces: 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-surfaces.html" title="Surfaces"> | |
9 <link rel="prev" href="cairo-XLib-XRender-Backend.html" title="XLib-XRender Backend"> | |
10 <link rel="next" href="cairo-support.html" title="Utilities"> | |
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-Script-Surfaces.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-surfaces.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
22 <td><a accesskey="p" href="cairo-XLib-XRender-Backend.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
23 <td><a accesskey="n" href="cairo-support.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-Script-Surfaces"></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-Script-Surfaces.top_of_page"></a>Script Surfaces</span></h2> | |
30 <p>Script Surfaces — Rendering to replayable scripts</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-Script-Surfaces.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-device-t.html#cairo-device-t" title="cairo_device_t"><span class="returnvalue">cairo_device_t</span></a> * | |
45 </td> | |
46 <td class="function_name"> | |
47 <a class="link" href="cairo-Script-Surfaces.html#cairo-script-create" title="cairo_script_create ()">cairo_script_create</a> <span class="c_punctuation">()</span> | |
48 </td> | |
49 </tr> | |
50 <tr> | |
51 <td class="function_type"> | |
52 <a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="returnvalue">cairo_device_t</span></a> * | |
53 </td> | |
54 <td class="function_name"> | |
55 <a class="link" href="cairo-Script-Surfaces.html#cairo-script-create-for-stream" title="cairo_script_create_for_stream ()">cairo_script_create_for_stream</a> <span class="c_punctuation">()</span> | |
56 </td> | |
57 </tr> | |
58 <tr> | |
59 <td class="function_type"> | |
60 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> | |
61 </td> | |
62 <td class="function_name"> | |
63 <a class="link" href="cairo-Script-Surfaces.html#cairo-script-from-recording-surface" title="cairo_script_from_recording_surface ()">cairo_script_from_recording_surface</a> <span class="c_punctuation">()</span> | |
64 </td> | |
65 </tr> | |
66 <tr> | |
67 <td class="function_type"> | |
68 <a class="link" href="cairo-Script-Surfaces.html#cairo-script-mode-t" title="enum cairo_script_mode_t"><span class="returnvalue">cairo_script_mode_t</span></a> | |
69 </td> | |
70 <td class="function_name"> | |
71 <a class="link" href="cairo-Script-Surfaces.html#cairo-script-get-mode" title="cairo_script_get_mode ()">cairo_script_get_mode</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-Script-Surfaces.html#cairo-script-set-mode" title="cairo_script_set_mode ()">cairo_script_set_mode</a> <span class="c_punctuation">()</span> | |
80 </td> | |
81 </tr> | |
82 <tr> | |
83 <td class="function_type"> | |
84 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * | |
85 </td> | |
86 <td class="function_name"> | |
87 <a class="link" href="cairo-Script-Surfaces.html#cairo-script-surface-create" title="cairo_script_surface_create ()">cairo_script_surface_create</a> <span class="c_punctuation">()</span> | |
88 </td> | |
89 </tr> | |
90 <tr> | |
91 <td class="function_type"> | |
92 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * | |
93 </td> | |
94 <td class="function_name"> | |
95 <a class="link" href="cairo-Script-Surfaces.html#cairo-script-surface-create-for-target" title="cairo_script_surface_create_for_target ()">cairo_script_surface_create_for_target</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-Script-Surfaces.html#cairo-script-write-comment" title="cairo_script_write_comment ()">cairo_script_write_comment</a> <span class="c_punctuation">()</span> | |
104 </td> | |
105 </tr> | |
106 </tbody> | |
107 </table></div> | |
108 </div> | |
109 <div class="refsect1"> | |
110 <a name="cairo-Script-Surfaces.other"></a><h2>Types and Values</h2> | |
111 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
112 <colgroup> | |
113 <col width="150px" class="name"> | |
114 <col class="description"> | |
115 </colgroup> | |
116 <tbody> | |
117 <tr> | |
118 <td class="define_keyword">#define</td> | |
119 <td class="function_name"><a class="link" href="cairo-Script-Surfaces.html#CAIRO-HAS-SCRIPT-SURFACE:CAPS" title="CAIRO_HAS_SCRIPT_SURFACE">CAIRO_HAS_SCRIPT_SURFACE</a></td> | |
120 </tr> | |
121 <tr> | |
122 <td class="datatype_keyword">enum</td> | |
123 <td class="function_name"><a class="link" href="cairo-Script-Surfaces.html#cairo-script-mode-t" title="enum cairo_script_mode_t">cairo_script_mode_t</a></td> | |
124 </tr> | |
125 </tbody> | |
126 </table></div> | |
127 </div> | |
128 <div class="refsect1"> | |
129 <a name="cairo-Script-Surfaces.description"></a><h2>Description</h2> | |
130 <p>The script surface provides the ability to render to a native | |
131 script that matches the cairo drawing model. The scripts can | |
132 be replayed using tools under the util/cairo-script directory, | |
133 or with cairo-perf-trace.</p> | |
134 </div> | |
135 <div class="refsect1"> | |
136 <a name="cairo-Script-Surfaces.functions_details"></a><h2>Functions</h2> | |
137 <div class="refsect2"> | |
138 <a name="cairo-script-create"></a><h3>cairo_script_create ()</h3> | |
139 <pre class="programlisting"><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="returnvalue">cairo_device_t</span></a> * | |
140 cairo_script_create (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre> | |
141 <p>Creates a output device for emitting the script, used when | |
142 creating the individual surfaces.</p> | |
143 <div class="refsect3"> | |
144 <a name="cairo-script-create.parameters"></a><h4>Parameters</h4> | |
145 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
146 <colgroup> | |
147 <col width="150px" class="parameters_name"> | |
148 <col class="parameters_description"> | |
149 <col width="200px" class="parameters_annotations"> | |
150 </colgroup> | |
151 <tbody><tr> | |
152 <td class="parameter_name"><p>filename</p></td> | |
153 <td class="parameter_description"><p>the name (path) of the file to write the script to</p></td> | |
154 <td class="parameter_annotations"> </td> | |
155 </tr></tbody> | |
156 </table></div> | |
157 </div> | |
158 <div class="refsect3"> | |
159 <a name="cairo-script-create.returns"></a><h4>Returns</h4> | |
160 <p> a pointer to the newly created device. The caller | |
161 owns the surface and should call <a class="link" href="cairo-cairo-device-t.html#cairo-device-destroy" title="cairo_device_destroy ()"><code class="function">cairo_device_destroy()</code></a> when done | |
162 with it.</p> | |
163 <p>This function always returns a valid pointer, but it will return a | |
164 pointer to a "nil" device if an error such as out of memory | |
165 occurs. You can use <a class="link" href="cairo-cairo-device-t.html#cairo-device-status" title="cairo_device_status ()"><code class="function">cairo_device_status()</code></a> to check for this.</p> | |
166 </div> | |
167 <p class="since">Since: 1.12</p> | |
168 </div> | |
169 <hr> | |
170 <div class="refsect2"> | |
171 <a name="cairo-script-create-for-stream"></a><h3>cairo_script_create_for_stream ()</h3> | |
172 <pre class="programlisting"><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="returnvalue">cairo_device_t</span></a> * | |
173 cairo_script_create_for_stream (<em class="parameter"><code><a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> write_func</code></em>, | |
174 <em class="parameter"><code><span class="type">void</span> *closure</code></em>);</pre> | |
175 <p>Creates a output device for emitting the script, used when | |
176 creating the individual surfaces.</p> | |
177 <div class="refsect3"> | |
178 <a name="cairo-script-create-for-stream.parameters"></a><h4>Parameters</h4> | |
179 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
180 <colgroup> | |
181 <col width="150px" class="parameters_name"> | |
182 <col class="parameters_description"> | |
183 <col width="200px" class="parameters_annotations"> | |
184 </colgroup> | |
185 <tbody> | |
186 <tr> | |
187 <td class="parameter_name"><p>write_func</p></td> | |
188 <td class="parameter_description"><p>callback function passed the bytes written to the script</p></td> | |
189 <td class="parameter_annotations"> </td> | |
190 </tr> | |
191 <tr> | |
192 <td class="parameter_name"><p>closure</p></td> | |
193 <td class="parameter_description"><p>user data to be passed to the callback</p></td> | |
194 <td class="parameter_annotations"> </td> | |
195 </tr> | |
196 </tbody> | |
197 </table></div> | |
198 </div> | |
199 <div class="refsect3"> | |
200 <a name="cairo-script-create-for-stream.returns"></a><h4>Returns</h4> | |
201 <p> a pointer to the newly created device. The caller | |
202 owns the surface and should call <a class="link" href="cairo-cairo-device-t.html#cairo-device-destroy" title="cairo_device_destroy ()"><code class="function">cairo_device_destroy()</code></a> when done | |
203 with it.</p> | |
204 <p>This function always returns a valid pointer, but it will return a | |
205 pointer to a "nil" device if an error such as out of memory | |
206 occurs. You can use <a class="link" href="cairo-cairo-device-t.html#cairo-device-status" title="cairo_device_status ()"><code class="function">cairo_device_status()</code></a> to check for this.</p> | |
207 </div> | |
208 <p class="since">Since: 1.12</p> | |
209 </div> | |
210 <hr> | |
211 <div class="refsect2"> | |
212 <a name="cairo-script-from-recording-surface"></a><h3>cairo_script_from_recording_surface ()</h3> | |
213 <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> | |
214 cairo_script_from_recording_surface (<em class="parameter"><code><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> *script</code></em>, | |
215 <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> *recording_surface</code></em>);</pre> | |
216 <p>Converts the record operations in <em class="parameter"><code>recording_surface</code></em> | |
217 into a script.</p> | |
218 <div class="refsect3"> | |
219 <a name="cairo-script-from-recording-surface.parameters"></a><h4>Parameters</h4> | |
220 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
221 <colgroup> | |
222 <col width="150px" class="parameters_name"> | |
223 <col class="parameters_description"> | |
224 <col width="200px" class="parameters_annotations"> | |
225 </colgroup> | |
226 <tbody> | |
227 <tr> | |
228 <td class="parameter_name"><p>script</p></td> | |
229 <td class="parameter_description"><p>the script (output device)</p></td> | |
230 <td class="parameter_annotations"> </td> | |
231 </tr> | |
232 <tr> | |
233 <td class="parameter_name"><p>recording_surface</p></td> | |
234 <td class="parameter_description"><p>the recording surface to replay</p></td> | |
235 <td class="parameter_annotations"> </td> | |
236 </tr> | |
237 </tbody> | |
238 </table></div> | |
239 </div> | |
240 <div class="refsect3"> | |
241 <a name="cairo-script-from-recording-surface.returns"></a><h4>Returns</h4> | |
242 <p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><span class="type">CAIRO_STATUS_SUCCESS</span></a> on successful completion or an error code.</p> | |
243 </div> | |
244 <p class="since">Since: 1.12</p> | |
245 </div> | |
246 <hr> | |
247 <div class="refsect2"> | |
248 <a name="cairo-script-get-mode"></a><h3>cairo_script_get_mode ()</h3> | |
249 <pre class="programlisting"><a class="link" href="cairo-Script-Surfaces.html#cairo-script-mode-t" title="enum cairo_script_mode_t"><span class="returnvalue">cairo_script_mode_t</span></a> | |
250 cairo_script_get_mode (<em class="parameter"><code><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> *script</code></em>);</pre> | |
251 <p>Queries the script for its current output mode.</p> | |
252 <div class="refsect3"> | |
253 <a name="cairo-script-get-mode.parameters"></a><h4>Parameters</h4> | |
254 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
255 <colgroup> | |
256 <col width="150px" class="parameters_name"> | |
257 <col class="parameters_description"> | |
258 <col width="200px" class="parameters_annotations"> | |
259 </colgroup> | |
260 <tbody><tr> | |
261 <td class="parameter_name"><p>script</p></td> | |
262 <td class="parameter_description"><p>The script (output device) to query</p></td> | |
263 <td class="parameter_annotations"> </td> | |
264 </tr></tbody> | |
265 </table></div> | |
266 </div> | |
267 <div class="refsect3"> | |
268 <a name="cairo-script-get-mode.returns"></a><h4>Returns</h4> | |
269 <p> the current output mode of the script</p> | |
270 </div> | |
271 <p class="since">Since: 1.12</p> | |
272 </div> | |
273 <hr> | |
274 <div class="refsect2"> | |
275 <a name="cairo-script-set-mode"></a><h3>cairo_script_set_mode ()</h3> | |
276 <pre class="programlisting"><span class="returnvalue">void</span> | |
277 cairo_script_set_mode (<em class="parameter"><code><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> *script</code></em>, | |
278 <em class="parameter"><code><a class="link" href="cairo-Script-Surfaces.html#cairo-script-mode-t" title="enum cairo_script_mode_t"><span class="type">cairo_script_mode_t</span></a> mode</code></em>);</pre> | |
279 <p>Change the output mode of the script</p> | |
280 <div class="refsect3"> | |
281 <a name="cairo-script-set-mode.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> | |
289 <tr> | |
290 <td class="parameter_name"><p>script</p></td> | |
291 <td class="parameter_description"><p>The script (output device)</p></td> | |
292 <td class="parameter_annotations"> </td> | |
293 </tr> | |
294 <tr> | |
295 <td class="parameter_name"><p>mode</p></td> | |
296 <td class="parameter_description"><p>the new mode</p></td> | |
297 <td class="parameter_annotations"> </td> | |
298 </tr> | |
299 </tbody> | |
300 </table></div> | |
301 </div> | |
302 <p class="since">Since: 1.12</p> | |
303 </div> | |
304 <hr> | |
305 <div class="refsect2"> | |
306 <a name="cairo-script-surface-create"></a><h3>cairo_script_surface_create ()</h3> | |
307 <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> * | |
308 cairo_script_surface_create (<em class="parameter"><code><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> *script</code></em>, | |
309 <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>, | |
310 <em class="parameter"><code><span class="type">double</span> width</code></em>, | |
311 <em class="parameter"><code><span class="type">double</span> height</code></em>);</pre> | |
312 <p>Create a new surface that will emit its rendering through <em class="parameter"><code>script</code></em> | |
313 </p> | |
314 <div class="refsect3"> | |
315 <a name="cairo-script-surface-create.parameters"></a><h4>Parameters</h4> | |
316 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
317 <colgroup> | |
318 <col width="150px" class="parameters_name"> | |
319 <col class="parameters_description"> | |
320 <col width="200px" class="parameters_annotations"> | |
321 </colgroup> | |
322 <tbody> | |
323 <tr> | |
324 <td class="parameter_name"><p>script</p></td> | |
325 <td class="parameter_description"><p>the script (output device)</p></td> | |
326 <td class="parameter_annotations"> </td> | |
327 </tr> | |
328 <tr> | |
329 <td class="parameter_name"><p>content</p></td> | |
330 <td class="parameter_description"><p>the content of the surface</p></td> | |
331 <td class="parameter_annotations"> </td> | |
332 </tr> | |
333 <tr> | |
334 <td class="parameter_name"><p>width</p></td> | |
335 <td class="parameter_description"><p>width in pixels</p></td> | |
336 <td class="parameter_annotations"> </td> | |
337 </tr> | |
338 <tr> | |
339 <td class="parameter_name"><p>height</p></td> | |
340 <td class="parameter_description"><p>height in pixels</p></td> | |
341 <td class="parameter_annotations"> </td> | |
342 </tr> | |
343 </tbody> | |
344 </table></div> | |
345 </div> | |
346 <div class="refsect3"> | |
347 <a name="cairo-script-surface-create.returns"></a><h4>Returns</h4> | |
348 <p> a pointer to the newly created surface. The caller | |
349 owns the surface and should call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done | |
350 with it.</p> | |
351 <p>This function always returns a valid pointer, but it will return a | |
352 pointer to a "nil" surface if an error such as out of memory | |
353 occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a> to check for this.</p> | |
354 </div> | |
355 <p class="since">Since: 1.12</p> | |
356 </div> | |
357 <hr> | |
358 <div class="refsect2"> | |
359 <a name="cairo-script-surface-create-for-target"></a><h3>cairo_script_surface_create_for_target ()</h3> | |
360 <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> * | |
361 cairo_script_surface_create_for_target | |
362 (<em class="parameter"><code><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> *script</code></em>, | |
363 <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>);</pre> | |
364 <p>Create a pxoy surface that will render to <em class="parameter"><code>target</code></em> | |
365 and record | |
366 the operations to <em class="parameter"><code>device</code></em> | |
367 .</p> | |
368 <div class="refsect3"> | |
369 <a name="cairo-script-surface-create-for-target.parameters"></a><h4>Parameters</h4> | |
370 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
371 <colgroup> | |
372 <col width="150px" class="parameters_name"> | |
373 <col class="parameters_description"> | |
374 <col width="200px" class="parameters_annotations"> | |
375 </colgroup> | |
376 <tbody> | |
377 <tr> | |
378 <td class="parameter_name"><p>script</p></td> | |
379 <td class="parameter_description"><p>the script (output device)</p></td> | |
380 <td class="parameter_annotations"> </td> | |
381 </tr> | |
382 <tr> | |
383 <td class="parameter_name"><p>target</p></td> | |
384 <td class="parameter_description"><p>a target surface to wrap</p></td> | |
385 <td class="parameter_annotations"> </td> | |
386 </tr> | |
387 </tbody> | |
388 </table></div> | |
389 </div> | |
390 <div class="refsect3"> | |
391 <a name="cairo-script-surface-create-for-target.returns"></a><h4>Returns</h4> | |
392 <p> a pointer to the newly created surface. The caller | |
393 owns the surface and should call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done | |
394 with it.</p> | |
395 <p>This function always returns a valid pointer, but it will return a | |
396 pointer to a "nil" surface if an error such as out of memory | |
397 occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a> to check for this.</p> | |
398 </div> | |
399 <p class="since">Since: 1.12</p> | |
400 </div> | |
401 <hr> | |
402 <div class="refsect2"> | |
403 <a name="cairo-script-write-comment"></a><h3>cairo_script_write_comment ()</h3> | |
404 <pre class="programlisting"><span class="returnvalue">void</span> | |
405 cairo_script_write_comment (<em class="parameter"><code><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> *script</code></em>, | |
406 <em class="parameter"><code>const <span class="type">char</span> *comment</code></em>, | |
407 <em class="parameter"><code><span class="type">int</span> len</code></em>);</pre> | |
408 <p>Emit a string verbatim into the script.</p> | |
409 <div class="refsect3"> | |
410 <a name="cairo-script-write-comment.parameters"></a><h4>Parameters</h4> | |
411 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
412 <colgroup> | |
413 <col width="150px" class="parameters_name"> | |
414 <col class="parameters_description"> | |
415 <col width="200px" class="parameters_annotations"> | |
416 </colgroup> | |
417 <tbody> | |
418 <tr> | |
419 <td class="parameter_name"><p>script</p></td> | |
420 <td class="parameter_description"><p>the script (output device)</p></td> | |
421 <td class="parameter_annotations"> </td> | |
422 </tr> | |
423 <tr> | |
424 <td class="parameter_name"><p>comment</p></td> | |
425 <td class="parameter_description"><p>the string to emit</p></td> | |
426 <td class="parameter_annotations"> </td> | |
427 </tr> | |
428 <tr> | |
429 <td class="parameter_name"><p>len</p></td> | |
430 <td class="parameter_description"><p>the length of the sting to write, or -1 to use <code class="function">strlen()</code></p></td> | |
431 <td class="parameter_annotations"> </td> | |
432 </tr> | |
433 </tbody> | |
434 </table></div> | |
435 </div> | |
436 <p class="since">Since: 1.12</p> | |
437 </div> | |
438 </div> | |
439 <div class="refsect1"> | |
440 <a name="cairo-Script-Surfaces.other_details"></a><h2>Types and Values</h2> | |
441 <div class="refsect2"> | |
442 <a name="CAIRO-HAS-SCRIPT-SURFACE:CAPS"></a><h3>CAIRO_HAS_SCRIPT_SURFACE</h3> | |
443 <pre class="programlisting">#define CAIRO_HAS_SCRIPT_SURFACE 1 | |
444 </pre> | |
445 <p>Defined if the script surface backend is available. | |
446 The script surface backend is always built in since 1.12.</p> | |
447 <p class="since">Since: 1.12</p> | |
448 </div> | |
449 <hr> | |
450 <div class="refsect2"> | |
451 <a name="cairo-script-mode-t"></a><h3>enum cairo_script_mode_t</h3> | |
452 <p>A set of script output variants.</p> | |
453 <div class="refsect3"> | |
454 <a name="cairo-script-mode-t.members"></a><h4>Members</h4> | |
455 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
456 <colgroup> | |
457 <col width="300px" class="enum_members_name"> | |
458 <col class="enum_members_description"> | |
459 <col width="200px" class="enum_members_annotations"> | |
460 </colgroup> | |
461 <tbody> | |
462 <tr> | |
463 <td class="enum_member_name"><p><a name="CAIRO-SCRIPT-MODE-ASCII:CAPS"></a>CAIRO_SCRIPT_MODE_ASCII</p></td> | |
464 <td class="enum_member_description"> | |
465 <p>the output will be in readable text (default). (Since 1.12)</p> | |
466 </td> | |
467 <td class="enum_member_annotations"> </td> | |
468 </tr> | |
469 <tr> | |
470 <td class="enum_member_name"><p><a name="CAIRO-SCRIPT-MODE-BINARY:CAPS"></a>CAIRO_SCRIPT_MODE_BINARY</p></td> | |
471 <td class="enum_member_description"> | |
472 <p>the output will use byte codes. (Since 1.12)</p> | |
473 </td> | |
474 <td class="enum_member_annotations"> </td> | |
475 </tr> | |
476 </tbody> | |
477 </table></div> | |
478 </div> | |
479 <p class="since">Since: 1.12</p> | |
480 </div> | |
481 </div> | |
482 <div class="refsect1"> | |
483 <a name="cairo-Script-Surfaces.see-also"></a><h2>See Also</h2> | |
484 <p><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> | |
485 </div> | |
486 </div> | |
487 <div class="footer"> | |
488 <hr>Generated by GTK-Doc V1.27</div> | |
489 </body> | |
490 </html> |