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