annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gtk-doc/html/cairo/cairo-Paths.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>Paths: 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-cairo-t.html" title="cairo_t">
jpayne@68 10 <link rel="next" href="cairo-cairo-pattern-t.html" title="cairo_pattern_t">
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-Paths.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-cairo-t.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
jpayne@68 23 <td><a accesskey="n" href="cairo-cairo-pattern-t.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-Paths"></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-Paths.top_of_page"></a>Paths</span></h2>
jpayne@68 30 <p>Paths — Creating paths and manipulating path 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-Paths.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-Paths.html#cairo-path-t" title="cairo_path_t"><span class="returnvalue">cairo_path_t</span></a> *
jpayne@68 45 </td>
jpayne@68 46 <td class="function_name">
jpayne@68 47 <a class="link" href="cairo-Paths.html#cairo-copy-path" title="cairo_copy_path ()">cairo_copy_path</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-Paths.html#cairo-path-t" title="cairo_path_t"><span class="returnvalue">cairo_path_t</span></a> *
jpayne@68 53 </td>
jpayne@68 54 <td class="function_name">
jpayne@68 55 <a class="link" href="cairo-Paths.html#cairo-copy-path-flat" title="cairo_copy_path_flat ()">cairo_copy_path_flat</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-Paths.html#cairo-path-destroy" title="cairo_path_destroy ()">cairo_path_destroy</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-Paths.html#cairo-append-path" title="cairo_append_path ()">cairo_append_path</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 <a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a>
jpayne@68 77 </td>
jpayne@68 78 <td class="function_name">
jpayne@68 79 <a class="link" href="cairo-Paths.html#cairo-has-current-point" title="cairo_has_current_point ()">cairo_has_current_point</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-Paths.html#cairo-get-current-point" title="cairo_get_current_point ()">cairo_get_current_point</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 <span class="returnvalue">void</span>
jpayne@68 93 </td>
jpayne@68 94 <td class="function_name">
jpayne@68 95 <a class="link" href="cairo-Paths.html#cairo-new-path" title="cairo_new_path ()">cairo_new_path</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-Paths.html#cairo-new-sub-path" title="cairo_new_sub_path ()">cairo_new_sub_path</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 <span class="returnvalue">void</span>
jpayne@68 109 </td>
jpayne@68 110 <td class="function_name">
jpayne@68 111 <a class="link" href="cairo-Paths.html#cairo-close-path" title="cairo_close_path ()">cairo_close_path</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-Paths.html#cairo-arc" title="cairo_arc ()">cairo_arc</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 <span class="returnvalue">void</span>
jpayne@68 125 </td>
jpayne@68 126 <td class="function_name">
jpayne@68 127 <a class="link" href="cairo-Paths.html#cairo-arc-negative" title="cairo_arc_negative ()">cairo_arc_negative</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 <span class="returnvalue">void</span>
jpayne@68 133 </td>
jpayne@68 134 <td class="function_name">
jpayne@68 135 <a class="link" href="cairo-Paths.html#cairo-curve-to" title="cairo_curve_to ()">cairo_curve_to</a> <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 <a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()">cairo_line_to</a> <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 <span class="returnvalue">void</span>
jpayne@68 149 </td>
jpayne@68 150 <td class="function_name">
jpayne@68 151 <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()">cairo_move_to</a> <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 <span class="returnvalue">void</span>
jpayne@68 157 </td>
jpayne@68 158 <td class="function_name">
jpayne@68 159 <a class="link" href="cairo-Paths.html#cairo-rectangle" title="cairo_rectangle ()">cairo_rectangle</a> <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 <a class="link" href="cairo-Paths.html#cairo-glyph-path" title="cairo_glyph_path ()">cairo_glyph_path</a> <span class="c_punctuation">()</span>
jpayne@68 168 </td>
jpayne@68 169 </tr>
jpayne@68 170 <tr>
jpayne@68 171 <td class="function_type">
jpayne@68 172 <span class="returnvalue">void</span>
jpayne@68 173 </td>
jpayne@68 174 <td class="function_name">
jpayne@68 175 <a class="link" href="cairo-Paths.html#cairo-text-path" title="cairo_text_path ()">cairo_text_path</a> <span class="c_punctuation">()</span>
jpayne@68 176 </td>
jpayne@68 177 </tr>
jpayne@68 178 <tr>
jpayne@68 179 <td class="function_type">
jpayne@68 180 <span class="returnvalue">void</span>
jpayne@68 181 </td>
jpayne@68 182 <td class="function_name">
jpayne@68 183 <a class="link" href="cairo-Paths.html#cairo-rel-curve-to" title="cairo_rel_curve_to ()">cairo_rel_curve_to</a> <span class="c_punctuation">()</span>
jpayne@68 184 </td>
jpayne@68 185 </tr>
jpayne@68 186 <tr>
jpayne@68 187 <td class="function_type">
jpayne@68 188 <span class="returnvalue">void</span>
jpayne@68 189 </td>
jpayne@68 190 <td class="function_name">
jpayne@68 191 <a class="link" href="cairo-Paths.html#cairo-rel-line-to" title="cairo_rel_line_to ()">cairo_rel_line_to</a> <span class="c_punctuation">()</span>
jpayne@68 192 </td>
jpayne@68 193 </tr>
jpayne@68 194 <tr>
jpayne@68 195 <td class="function_type">
jpayne@68 196 <span class="returnvalue">void</span>
jpayne@68 197 </td>
jpayne@68 198 <td class="function_name">
jpayne@68 199 <a class="link" href="cairo-Paths.html#cairo-rel-move-to" title="cairo_rel_move_to ()">cairo_rel_move_to</a> <span class="c_punctuation">()</span>
jpayne@68 200 </td>
jpayne@68 201 </tr>
jpayne@68 202 <tr>
jpayne@68 203 <td class="function_type">
jpayne@68 204 <span class="returnvalue">void</span>
jpayne@68 205 </td>
jpayne@68 206 <td class="function_name">
jpayne@68 207 <a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()">cairo_path_extents</a> <span class="c_punctuation">()</span>
jpayne@68 208 </td>
jpayne@68 209 </tr>
jpayne@68 210 </tbody>
jpayne@68 211 </table></div>
jpayne@68 212 </div>
jpayne@68 213 <div class="refsect1">
jpayne@68 214 <a name="cairo-Paths.other"></a><h2>Types and Values</h2>
jpayne@68 215 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 216 <colgroup>
jpayne@68 217 <col width="150px" class="name">
jpayne@68 218 <col class="description">
jpayne@68 219 </colgroup>
jpayne@68 220 <tbody>
jpayne@68 221 <tr>
jpayne@68 222 <td class="datatype_keyword"> </td>
jpayne@68 223 <td class="function_name"><a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t">cairo_path_t</a></td>
jpayne@68 224 </tr>
jpayne@68 225 <tr>
jpayne@68 226 <td class="datatype_keyword">union</td>
jpayne@68 227 <td class="function_name"><a class="link" href="cairo-Paths.html#cairo-path-data-t" title="union cairo_path_data_t">cairo_path_data_t</a></td>
jpayne@68 228 </tr>
jpayne@68 229 <tr>
jpayne@68 230 <td class="datatype_keyword">enum</td>
jpayne@68 231 <td class="function_name"><a class="link" href="cairo-Paths.html#cairo-path-data-type-t" title="enum cairo_path_data_type_t">cairo_path_data_type_t</a></td>
jpayne@68 232 </tr>
jpayne@68 233 </tbody>
jpayne@68 234 </table></div>
jpayne@68 235 </div>
jpayne@68 236 <div class="refsect1">
jpayne@68 237 <a name="cairo-Paths.description"></a><h2>Description</h2>
jpayne@68 238 <p>Paths are the most basic drawing tools and are primarily used to implicitly
jpayne@68 239 generate simple masks.</p>
jpayne@68 240 </div>
jpayne@68 241 <div class="refsect1">
jpayne@68 242 <a name="cairo-Paths.functions_details"></a><h2>Functions</h2>
jpayne@68 243 <div class="refsect2">
jpayne@68 244 <a name="cairo-copy-path"></a><h3>cairo_copy_path ()</h3>
jpayne@68 245 <pre class="programlisting"><a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="returnvalue">cairo_path_t</span></a> *
jpayne@68 246 cairo_copy_path (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
jpayne@68 247 <p>Creates a copy of the current path and returns it to the user as a
jpayne@68 248 <a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a>. See <a class="link" href="cairo-Paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> for hints on how to iterate
jpayne@68 249 over the returned data structure.</p>
jpayne@68 250 <p>This function will always return a valid pointer, but the result
jpayne@68 251 will have no data (<code class="literal">data==<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></code> and
jpayne@68 252 <code class="literal">num_data==0</code>), if either of the following
jpayne@68 253 conditions hold:</p>
jpayne@68 254 <div class="orderedlist"><ol class="orderedlist" type="1">
jpayne@68 255 <li class="listitem">If there is insufficient memory to copy the path. In this
jpayne@68 256 case <code class="literal">path-&gt;status</code> will be set to
jpayne@68 257 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.</li>
jpayne@68 258 <li class="listitem">If <em class="parameter"><code>cr</code></em> is already in an error state. In this case
jpayne@68 259 <code class="literal">path-&gt;status</code> will contain the same status that
jpayne@68 260 would be returned by <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a>.</li>
jpayne@68 261 </ol></div>
jpayne@68 262 <div class="refsect3">
jpayne@68 263 <a name="cairo-copy-path.parameters"></a><h4>Parameters</h4>
jpayne@68 264 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 265 <colgroup>
jpayne@68 266 <col width="150px" class="parameters_name">
jpayne@68 267 <col class="parameters_description">
jpayne@68 268 <col width="200px" class="parameters_annotations">
jpayne@68 269 </colgroup>
jpayne@68 270 <tbody><tr>
jpayne@68 271 <td class="parameter_name"><p>cr</p></td>
jpayne@68 272 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 273 <td class="parameter_annotations"> </td>
jpayne@68 274 </tr></tbody>
jpayne@68 275 </table></div>
jpayne@68 276 </div>
jpayne@68 277 <div class="refsect3">
jpayne@68 278 <a name="cairo-copy-path.returns"></a><h4>Returns</h4>
jpayne@68 279 <p> the copy of the current path. The caller owns the
jpayne@68 280 returned object and should call <a class="link" href="cairo-Paths.html#cairo-path-destroy" title="cairo_path_destroy ()"><code class="function">cairo_path_destroy()</code></a> when finished
jpayne@68 281 with it.</p>
jpayne@68 282 </div>
jpayne@68 283 <p class="since">Since: 1.0</p>
jpayne@68 284 </div>
jpayne@68 285 <hr>
jpayne@68 286 <div class="refsect2">
jpayne@68 287 <a name="cairo-copy-path-flat"></a><h3>cairo_copy_path_flat ()</h3>
jpayne@68 288 <pre class="programlisting"><a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="returnvalue">cairo_path_t</span></a> *
jpayne@68 289 cairo_copy_path_flat (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
jpayne@68 290 <p>Gets a flattened copy of the current path and returns it to the
jpayne@68 291 user as a <a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a>. See <a class="link" href="cairo-Paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> for hints on
jpayne@68 292 how to iterate over the returned data structure.</p>
jpayne@68 293 <p>This function is like <a class="link" href="cairo-Paths.html#cairo-copy-path" title="cairo_copy_path ()"><code class="function">cairo_copy_path()</code></a> except that any curves
jpayne@68 294 in the path will be approximated with piecewise-linear
jpayne@68 295 approximations, (accurate to within the current tolerance
jpayne@68 296 value). That is, the result is guaranteed to not have any elements
jpayne@68 297 of type <a class="link" href="cairo-Paths.html#CAIRO-PATH-CURVE-TO:CAPS"><code class="literal">CAIRO_PATH_CURVE_TO</code></a> which will instead be replaced by a
jpayne@68 298 series of <a class="link" href="cairo-Paths.html#CAIRO-PATH-LINE-TO:CAPS"><code class="literal">CAIRO_PATH_LINE_TO</code></a> elements.</p>
jpayne@68 299 <p>This function will always return a valid pointer, but the result
jpayne@68 300 will have no data (<code class="literal">data==<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></code> and
jpayne@68 301 <code class="literal">num_data==0</code>), if either of the following
jpayne@68 302 conditions hold:</p>
jpayne@68 303 <div class="orderedlist"><ol class="orderedlist" type="1">
jpayne@68 304 <li class="listitem">If there is insufficient memory to copy the path. In this
jpayne@68 305 case <code class="literal">path-&gt;status</code> will be set to
jpayne@68 306 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.</li>
jpayne@68 307 <li class="listitem">If <em class="parameter"><code>cr</code></em> is already in an error state. In this case
jpayne@68 308 <code class="literal">path-&gt;status</code> will contain the same status that
jpayne@68 309 would be returned by <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a>.</li>
jpayne@68 310 </ol></div>
jpayne@68 311 <div class="refsect3">
jpayne@68 312 <a name="cairo-copy-path-flat.parameters"></a><h4>Parameters</h4>
jpayne@68 313 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 314 <colgroup>
jpayne@68 315 <col width="150px" class="parameters_name">
jpayne@68 316 <col class="parameters_description">
jpayne@68 317 <col width="200px" class="parameters_annotations">
jpayne@68 318 </colgroup>
jpayne@68 319 <tbody><tr>
jpayne@68 320 <td class="parameter_name"><p>cr</p></td>
jpayne@68 321 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 322 <td class="parameter_annotations"> </td>
jpayne@68 323 </tr></tbody>
jpayne@68 324 </table></div>
jpayne@68 325 </div>
jpayne@68 326 <div class="refsect3">
jpayne@68 327 <a name="cairo-copy-path-flat.returns"></a><h4>Returns</h4>
jpayne@68 328 <p> the copy of the current path. The caller owns the
jpayne@68 329 returned object and should call <a class="link" href="cairo-Paths.html#cairo-path-destroy" title="cairo_path_destroy ()"><code class="function">cairo_path_destroy()</code></a> when finished
jpayne@68 330 with it.</p>
jpayne@68 331 </div>
jpayne@68 332 <p class="since">Since: 1.0</p>
jpayne@68 333 </div>
jpayne@68 334 <hr>
jpayne@68 335 <div class="refsect2">
jpayne@68 336 <a name="cairo-path-destroy"></a><h3>cairo_path_destroy ()</h3>
jpayne@68 337 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 338 cairo_path_destroy (<em class="parameter"><code><a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a> *path</code></em>);</pre>
jpayne@68 339 <p>Immediately releases all memory associated with <em class="parameter"><code>path</code></em>
jpayne@68 340 . After a call
jpayne@68 341 to <a class="link" href="cairo-Paths.html#cairo-path-destroy" title="cairo_path_destroy ()"><code class="function">cairo_path_destroy()</code></a> the <em class="parameter"><code>path</code></em>
jpayne@68 342 pointer is no longer valid and
jpayne@68 343 should not be used further.</p>
jpayne@68 344 <p>Note: <a class="link" href="cairo-Paths.html#cairo-path-destroy" title="cairo_path_destroy ()"><code class="function">cairo_path_destroy()</code></a> should only be called with a
jpayne@68 345 pointer to a <a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a> returned by a cairo function. Any path
jpayne@68 346 that is created manually (ie. outside of cairo) should be destroyed
jpayne@68 347 manually as well.</p>
jpayne@68 348 <div class="refsect3">
jpayne@68 349 <a name="cairo-path-destroy.parameters"></a><h4>Parameters</h4>
jpayne@68 350 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 351 <colgroup>
jpayne@68 352 <col width="150px" class="parameters_name">
jpayne@68 353 <col class="parameters_description">
jpayne@68 354 <col width="200px" class="parameters_annotations">
jpayne@68 355 </colgroup>
jpayne@68 356 <tbody><tr>
jpayne@68 357 <td class="parameter_name"><p>path</p></td>
jpayne@68 358 <td class="parameter_description"><p>a path previously returned by either <a class="link" href="cairo-Paths.html#cairo-copy-path" title="cairo_copy_path ()"><code class="function">cairo_copy_path()</code></a> or
jpayne@68 359 <a class="link" href="cairo-Paths.html#cairo-copy-path-flat" title="cairo_copy_path_flat ()"><code class="function">cairo_copy_path_flat()</code></a>.</p></td>
jpayne@68 360 <td class="parameter_annotations"> </td>
jpayne@68 361 </tr></tbody>
jpayne@68 362 </table></div>
jpayne@68 363 </div>
jpayne@68 364 <p class="since">Since: 1.0</p>
jpayne@68 365 </div>
jpayne@68 366 <hr>
jpayne@68 367 <div class="refsect2">
jpayne@68 368 <a name="cairo-append-path"></a><h3>cairo_append_path ()</h3>
jpayne@68 369 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 370 cairo_append_path (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 371 <em class="parameter"><code>const <a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a> *path</code></em>);</pre>
jpayne@68 372 <p>Append the <em class="parameter"><code>path</code></em>
jpayne@68 373 onto the current path. The <em class="parameter"><code>path</code></em>
jpayne@68 374 may be either the
jpayne@68 375 return value from one of <a class="link" href="cairo-Paths.html#cairo-copy-path" title="cairo_copy_path ()"><code class="function">cairo_copy_path()</code></a> or
jpayne@68 376 <a class="link" href="cairo-Paths.html#cairo-copy-path-flat" title="cairo_copy_path_flat ()"><code class="function">cairo_copy_path_flat()</code></a> or it may be constructed manually. See
jpayne@68 377 <a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a> for details on how the path data structure should be
jpayne@68 378 initialized, and note that <code class="literal">path-&gt;status</code> must be
jpayne@68 379 initialized to <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.</p>
jpayne@68 380 <div class="refsect3">
jpayne@68 381 <a name="cairo-append-path.parameters"></a><h4>Parameters</h4>
jpayne@68 382 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 383 <colgroup>
jpayne@68 384 <col width="150px" class="parameters_name">
jpayne@68 385 <col class="parameters_description">
jpayne@68 386 <col width="200px" class="parameters_annotations">
jpayne@68 387 </colgroup>
jpayne@68 388 <tbody>
jpayne@68 389 <tr>
jpayne@68 390 <td class="parameter_name"><p>cr</p></td>
jpayne@68 391 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 392 <td class="parameter_annotations"> </td>
jpayne@68 393 </tr>
jpayne@68 394 <tr>
jpayne@68 395 <td class="parameter_name"><p>path</p></td>
jpayne@68 396 <td class="parameter_description"><p>path to be appended</p></td>
jpayne@68 397 <td class="parameter_annotations"> </td>
jpayne@68 398 </tr>
jpayne@68 399 </tbody>
jpayne@68 400 </table></div>
jpayne@68 401 </div>
jpayne@68 402 <p class="since">Since: 1.0</p>
jpayne@68 403 </div>
jpayne@68 404 <hr>
jpayne@68 405 <div class="refsect2">
jpayne@68 406 <a name="cairo-has-current-point"></a><h3>cairo_has_current_point ()</h3>
jpayne@68 407 <pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a>
jpayne@68 408 cairo_has_current_point (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
jpayne@68 409 <p>Returns whether a current point is defined on the current path.
jpayne@68 410 See <a class="link" href="cairo-Paths.html#cairo-get-current-point" title="cairo_get_current_point ()"><code class="function">cairo_get_current_point()</code></a> for details on the current point.</p>
jpayne@68 411 <div class="refsect3">
jpayne@68 412 <a name="cairo-has-current-point.parameters"></a><h4>Parameters</h4>
jpayne@68 413 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 414 <colgroup>
jpayne@68 415 <col width="150px" class="parameters_name">
jpayne@68 416 <col class="parameters_description">
jpayne@68 417 <col width="200px" class="parameters_annotations">
jpayne@68 418 </colgroup>
jpayne@68 419 <tbody><tr>
jpayne@68 420 <td class="parameter_name"><p>cr</p></td>
jpayne@68 421 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 422 <td class="parameter_annotations"> </td>
jpayne@68 423 </tr></tbody>
jpayne@68 424 </table></div>
jpayne@68 425 </div>
jpayne@68 426 <div class="refsect3">
jpayne@68 427 <a name="cairo-has-current-point.returns"></a><h4>Returns</h4>
jpayne@68 428 <p> whether a current point is defined.</p>
jpayne@68 429 </div>
jpayne@68 430 <p class="since">Since: 1.6</p>
jpayne@68 431 </div>
jpayne@68 432 <hr>
jpayne@68 433 <div class="refsect2">
jpayne@68 434 <a name="cairo-get-current-point"></a><h3>cairo_get_current_point ()</h3>
jpayne@68 435 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 436 cairo_get_current_point (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 437 <em class="parameter"><code><span class="type">double</span> *x</code></em>,
jpayne@68 438 <em class="parameter"><code><span class="type">double</span> *y</code></em>);</pre>
jpayne@68 439 <p>Gets the current point of the current path, which is
jpayne@68 440 conceptually the final point reached by the path so far.</p>
jpayne@68 441 <p>The current point is returned in the user-space coordinate
jpayne@68 442 system. If there is no defined current point or if <em class="parameter"><code>cr</code></em>
jpayne@68 443 is in an
jpayne@68 444 error status, <em class="parameter"><code>x</code></em>
jpayne@68 445 and <em class="parameter"><code>y</code></em>
jpayne@68 446 will both be set to 0.0. It is possible to
jpayne@68 447 check this in advance with <a class="link" href="cairo-Paths.html#cairo-has-current-point" title="cairo_has_current_point ()"><code class="function">cairo_has_current_point()</code></a>.</p>
jpayne@68 448 <p>Most path construction functions alter the current point. See the
jpayne@68 449 following for details on how they affect the current point:
jpayne@68 450 <a class="link" href="cairo-Paths.html#cairo-new-path" title="cairo_new_path ()"><code class="function">cairo_new_path()</code></a>, <a class="link" href="cairo-Paths.html#cairo-new-sub-path" title="cairo_new_sub_path ()"><code class="function">cairo_new_sub_path()</code></a>,
jpayne@68 451 <a class="link" href="cairo-Paths.html#cairo-append-path" title="cairo_append_path ()"><code class="function">cairo_append_path()</code></a>, <a class="link" href="cairo-Paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a>,
jpayne@68 452 <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>, <a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>, <a class="link" href="cairo-Paths.html#cairo-curve-to" title="cairo_curve_to ()"><code class="function">cairo_curve_to()</code></a>,
jpayne@68 453 <a class="link" href="cairo-Paths.html#cairo-rel-move-to" title="cairo_rel_move_to ()"><code class="function">cairo_rel_move_to()</code></a>, <a class="link" href="cairo-Paths.html#cairo-rel-line-to" title="cairo_rel_line_to ()"><code class="function">cairo_rel_line_to()</code></a>, <a class="link" href="cairo-Paths.html#cairo-rel-curve-to" title="cairo_rel_curve_to ()"><code class="function">cairo_rel_curve_to()</code></a>,
jpayne@68 454 <a class="link" href="cairo-Paths.html#cairo-arc" title="cairo_arc ()"><code class="function">cairo_arc()</code></a>, <a class="link" href="cairo-Paths.html#cairo-arc-negative" title="cairo_arc_negative ()"><code class="function">cairo_arc_negative()</code></a>, <a class="link" href="cairo-Paths.html#cairo-rectangle" title="cairo_rectangle ()"><code class="function">cairo_rectangle()</code></a>,
jpayne@68 455 <a class="link" href="cairo-Paths.html#cairo-text-path" title="cairo_text_path ()"><code class="function">cairo_text_path()</code></a>, <a class="link" href="cairo-Paths.html#cairo-glyph-path" title="cairo_glyph_path ()"><code class="function">cairo_glyph_path()</code></a>, <code class="function">cairo_stroke_to_path()</code>.</p>
jpayne@68 456 <p>Some functions use and alter the current point but do not
jpayne@68 457 otherwise change current path:
jpayne@68 458 <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>.</p>
jpayne@68 459 <p>Some functions unset the current path and as a result, current point:
jpayne@68 460 <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>.</p>
jpayne@68 461 <div class="refsect3">
jpayne@68 462 <a name="cairo-get-current-point.parameters"></a><h4>Parameters</h4>
jpayne@68 463 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 464 <colgroup>
jpayne@68 465 <col width="150px" class="parameters_name">
jpayne@68 466 <col class="parameters_description">
jpayne@68 467 <col width="200px" class="parameters_annotations">
jpayne@68 468 </colgroup>
jpayne@68 469 <tbody>
jpayne@68 470 <tr>
jpayne@68 471 <td class="parameter_name"><p>cr</p></td>
jpayne@68 472 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 473 <td class="parameter_annotations"> </td>
jpayne@68 474 </tr>
jpayne@68 475 <tr>
jpayne@68 476 <td class="parameter_name"><p>x</p></td>
jpayne@68 477 <td class="parameter_description"><p>return value for X coordinate of the current point</p></td>
jpayne@68 478 <td class="parameter_annotations"> </td>
jpayne@68 479 </tr>
jpayne@68 480 <tr>
jpayne@68 481 <td class="parameter_name"><p>y</p></td>
jpayne@68 482 <td class="parameter_description"><p>return value for Y coordinate of the current point</p></td>
jpayne@68 483 <td class="parameter_annotations"> </td>
jpayne@68 484 </tr>
jpayne@68 485 </tbody>
jpayne@68 486 </table></div>
jpayne@68 487 </div>
jpayne@68 488 <p class="since">Since: 1.0</p>
jpayne@68 489 </div>
jpayne@68 490 <hr>
jpayne@68 491 <div class="refsect2">
jpayne@68 492 <a name="cairo-new-path"></a><h3>cairo_new_path ()</h3>
jpayne@68 493 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 494 cairo_new_path (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
jpayne@68 495 <p>Clears the current path. After this call there will be no path and
jpayne@68 496 no current point.</p>
jpayne@68 497 <div class="refsect3">
jpayne@68 498 <a name="cairo-new-path.parameters"></a><h4>Parameters</h4>
jpayne@68 499 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 500 <colgroup>
jpayne@68 501 <col width="150px" class="parameters_name">
jpayne@68 502 <col class="parameters_description">
jpayne@68 503 <col width="200px" class="parameters_annotations">
jpayne@68 504 </colgroup>
jpayne@68 505 <tbody><tr>
jpayne@68 506 <td class="parameter_name"><p>cr</p></td>
jpayne@68 507 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 508 <td class="parameter_annotations"> </td>
jpayne@68 509 </tr></tbody>
jpayne@68 510 </table></div>
jpayne@68 511 </div>
jpayne@68 512 <p class="since">Since: 1.0</p>
jpayne@68 513 </div>
jpayne@68 514 <hr>
jpayne@68 515 <div class="refsect2">
jpayne@68 516 <a name="cairo-new-sub-path"></a><h3>cairo_new_sub_path ()</h3>
jpayne@68 517 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 518 cairo_new_sub_path (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
jpayne@68 519 <p>Begin a new sub-path. Note that the existing path is not
jpayne@68 520 affected. After this call there will be no current point.</p>
jpayne@68 521 <p>In many cases, this call is not needed since new sub-paths are
jpayne@68 522 frequently started with <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>.</p>
jpayne@68 523 <p>A call to <a class="link" href="cairo-Paths.html#cairo-new-sub-path" title="cairo_new_sub_path ()"><code class="function">cairo_new_sub_path()</code></a> is particularly useful when
jpayne@68 524 beginning a new sub-path with one of the <a class="link" href="cairo-Paths.html#cairo-arc" title="cairo_arc ()"><code class="function">cairo_arc()</code></a> calls. This
jpayne@68 525 makes things easier as it is no longer necessary to manually
jpayne@68 526 compute the arc's initial coordinates for a call to
jpayne@68 527 <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>.</p>
jpayne@68 528 <div class="refsect3">
jpayne@68 529 <a name="cairo-new-sub-path.parameters"></a><h4>Parameters</h4>
jpayne@68 530 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 531 <colgroup>
jpayne@68 532 <col width="150px" class="parameters_name">
jpayne@68 533 <col class="parameters_description">
jpayne@68 534 <col width="200px" class="parameters_annotations">
jpayne@68 535 </colgroup>
jpayne@68 536 <tbody><tr>
jpayne@68 537 <td class="parameter_name"><p>cr</p></td>
jpayne@68 538 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 539 <td class="parameter_annotations"> </td>
jpayne@68 540 </tr></tbody>
jpayne@68 541 </table></div>
jpayne@68 542 </div>
jpayne@68 543 <p class="since">Since: 1.2</p>
jpayne@68 544 </div>
jpayne@68 545 <hr>
jpayne@68 546 <div class="refsect2">
jpayne@68 547 <a name="cairo-close-path"></a><h3>cairo_close_path ()</h3>
jpayne@68 548 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 549 cairo_close_path (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
jpayne@68 550 <p>Adds a line segment to the path from the current point to the
jpayne@68 551 beginning of the current sub-path, (the most recent point passed to
jpayne@68 552 <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>), and closes this sub-path. After this call the
jpayne@68 553 current point will be at the joined endpoint of the sub-path.</p>
jpayne@68 554 <p>The behavior of <a class="link" href="cairo-Paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a> is distinct from simply calling
jpayne@68 555 <a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a> with the equivalent coordinate in the case of
jpayne@68 556 stroking. When a closed sub-path is stroked, there are no caps on
jpayne@68 557 the ends of the sub-path. Instead, there is a line join connecting
jpayne@68 558 the final and initial segments of the sub-path.</p>
jpayne@68 559 <p>If there is no current point before the call to <a class="link" href="cairo-Paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a>,
jpayne@68 560 this function will have no effect.</p>
jpayne@68 561 <p>Note: As of cairo version 1.2.4 any call to <a class="link" href="cairo-Paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a> will
jpayne@68 562 place an explicit MOVE_TO element into the path immediately after
jpayne@68 563 the CLOSE_PATH element, (which can be seen in <a class="link" href="cairo-Paths.html#cairo-copy-path" title="cairo_copy_path ()"><code class="function">cairo_copy_path()</code></a> for
jpayne@68 564 example). This can simplify path processing in some cases as it may
jpayne@68 565 not be necessary to save the "last move_to point" during processing
jpayne@68 566 as the MOVE_TO immediately after the CLOSE_PATH will provide that
jpayne@68 567 point.</p>
jpayne@68 568 <div class="refsect3">
jpayne@68 569 <a name="cairo-close-path.parameters"></a><h4>Parameters</h4>
jpayne@68 570 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 571 <colgroup>
jpayne@68 572 <col width="150px" class="parameters_name">
jpayne@68 573 <col class="parameters_description">
jpayne@68 574 <col width="200px" class="parameters_annotations">
jpayne@68 575 </colgroup>
jpayne@68 576 <tbody><tr>
jpayne@68 577 <td class="parameter_name"><p>cr</p></td>
jpayne@68 578 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 579 <td class="parameter_annotations"> </td>
jpayne@68 580 </tr></tbody>
jpayne@68 581 </table></div>
jpayne@68 582 </div>
jpayne@68 583 <p class="since">Since: 1.0</p>
jpayne@68 584 </div>
jpayne@68 585 <hr>
jpayne@68 586 <div class="refsect2">
jpayne@68 587 <a name="cairo-arc"></a><h3>cairo_arc ()</h3>
jpayne@68 588 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 589 cairo_arc (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 590 <em class="parameter"><code><span class="type">double</span> xc</code></em>,
jpayne@68 591 <em class="parameter"><code><span class="type">double</span> yc</code></em>,
jpayne@68 592 <em class="parameter"><code><span class="type">double</span> radius</code></em>,
jpayne@68 593 <em class="parameter"><code><span class="type">double</span> angle1</code></em>,
jpayne@68 594 <em class="parameter"><code><span class="type">double</span> angle2</code></em>);</pre>
jpayne@68 595 <p>Adds a circular arc of the given <em class="parameter"><code>radius</code></em>
jpayne@68 596 to the current path. The
jpayne@68 597 arc is centered at (<em class="parameter"><code>xc</code></em>
jpayne@68 598 , <em class="parameter"><code>yc</code></em>
jpayne@68 599 ), begins at <em class="parameter"><code>angle1</code></em>
jpayne@68 600 and proceeds in
jpayne@68 601 the direction of increasing angles to end at <em class="parameter"><code>angle2</code></em>
jpayne@68 602 . If <em class="parameter"><code>angle2</code></em>
jpayne@68 603 is
jpayne@68 604 less than <em class="parameter"><code>angle1</code></em>
jpayne@68 605 it will be progressively increased by
jpayne@68 606 <code class="literal">2*M_PI</code> until it is greater than <em class="parameter"><code>angle1</code></em>
jpayne@68 607 .</p>
jpayne@68 608 <p>If there is a current point, an initial line segment will be added
jpayne@68 609 to the path to connect the current point to the beginning of the
jpayne@68 610 arc. If this initial line is undesired, it can be avoided by
jpayne@68 611 calling <a class="link" href="cairo-Paths.html#cairo-new-sub-path" title="cairo_new_sub_path ()"><code class="function">cairo_new_sub_path()</code></a> before calling <a class="link" href="cairo-Paths.html#cairo-arc" title="cairo_arc ()"><code class="function">cairo_arc()</code></a>.</p>
jpayne@68 612 <p>Angles are measured in radians. An angle of 0.0 is in the direction
jpayne@68 613 of the positive X axis (in user space). An angle of
jpayne@68 614 <code class="literal">M_PI/2.0</code> radians (90 degrees) is in the
jpayne@68 615 direction of the positive Y axis (in user space). Angles increase
jpayne@68 616 in the direction from the positive X axis toward the positive Y
jpayne@68 617 axis. So with the default transformation matrix, angles increase in
jpayne@68 618 a clockwise direction.</p>
jpayne@68 619 <p>(To convert from degrees to radians, use <code class="literal">degrees * (M_PI /
jpayne@68 620 180.)</code>.)</p>
jpayne@68 621 <p>This function gives the arc in the direction of increasing angles;
jpayne@68 622 see <a class="link" href="cairo-Paths.html#cairo-arc-negative" title="cairo_arc_negative ()"><code class="function">cairo_arc_negative()</code></a> to get the arc in the direction of
jpayne@68 623 decreasing angles.</p>
jpayne@68 624 <p>The arc is circular in user space. To achieve an elliptical arc,
jpayne@68 625 you can scale the current transformation matrix by different
jpayne@68 626 amounts in the X and Y directions. For example, to draw an ellipse
jpayne@68 627 in the box given by <em class="parameter"><code>x</code></em>
jpayne@68 628 , <em class="parameter"><code>y</code></em>
jpayne@68 629 , <em class="parameter"><code>width</code></em>
jpayne@68 630 , <em class="parameter"><code>height</code></em>
jpayne@68 631 :</p>
jpayne@68 632 <div class="informalexample">
jpayne@68 633 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
jpayne@68 634 <tbody>
jpayne@68 635 <tr>
jpayne@68 636 <td class="listing_lines" align="right"><pre>1
jpayne@68 637 2
jpayne@68 638 3
jpayne@68 639 4
jpayne@68 640 5</pre></td>
jpayne@68 641 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="cairo-cairo-t.html#cairo-save">cairo_save</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">);</span>
jpayne@68 642 <span class="function"><a href="cairo-Transformations.html#cairo-translate">cairo_translate</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">,</span> x <span class="gtkdoc opt">+</span> width <span class="gtkdoc opt">/</span> <span class="number">2</span><span class="gtkdoc opt">.,</span> y <span class="gtkdoc opt">+</span> height <span class="gtkdoc opt">/</span> <span class="number">2</span><span class="gtkdoc opt">.);</span>
jpayne@68 643 <span class="function"><a href="cairo-Transformations.html#cairo-scale">cairo_scale</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">,</span> width <span class="gtkdoc opt">/</span> <span class="number">2</span><span class="gtkdoc opt">.,</span> height <span class="gtkdoc opt">/</span> <span class="number">2</span><span class="gtkdoc opt">.);</span>
jpayne@68 644 <span class="function"><a href="cairo-Paths.html#cairo-arc">cairo_arc</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">.,</span> <span class="number">0</span><span class="gtkdoc opt">.,</span> <span class="number">1</span><span class="gtkdoc opt">.,</span> <span class="number">0</span><span class="gtkdoc opt">.,</span> <span class="number">2</span> <span class="gtkdoc opt">*</span> M_PI<span class="gtkdoc opt">);</span>
jpayne@68 645 <span class="function"><a href="cairo-cairo-t.html#cairo-restore">cairo_restore</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">);</span></pre></td>
jpayne@68 646 </tr>
jpayne@68 647 </tbody>
jpayne@68 648 </table>
jpayne@68 649 </div>
jpayne@68 650
jpayne@68 651 <div class="refsect3">
jpayne@68 652 <a name="cairo-arc.parameters"></a><h4>Parameters</h4>
jpayne@68 653 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 654 <colgroup>
jpayne@68 655 <col width="150px" class="parameters_name">
jpayne@68 656 <col class="parameters_description">
jpayne@68 657 <col width="200px" class="parameters_annotations">
jpayne@68 658 </colgroup>
jpayne@68 659 <tbody>
jpayne@68 660 <tr>
jpayne@68 661 <td class="parameter_name"><p>cr</p></td>
jpayne@68 662 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 663 <td class="parameter_annotations"> </td>
jpayne@68 664 </tr>
jpayne@68 665 <tr>
jpayne@68 666 <td class="parameter_name"><p>xc</p></td>
jpayne@68 667 <td class="parameter_description"><p>X position of the center of the arc</p></td>
jpayne@68 668 <td class="parameter_annotations"> </td>
jpayne@68 669 </tr>
jpayne@68 670 <tr>
jpayne@68 671 <td class="parameter_name"><p>yc</p></td>
jpayne@68 672 <td class="parameter_description"><p>Y position of the center of the arc</p></td>
jpayne@68 673 <td class="parameter_annotations"> </td>
jpayne@68 674 </tr>
jpayne@68 675 <tr>
jpayne@68 676 <td class="parameter_name"><p>radius</p></td>
jpayne@68 677 <td class="parameter_description"><p>the radius of the arc</p></td>
jpayne@68 678 <td class="parameter_annotations"> </td>
jpayne@68 679 </tr>
jpayne@68 680 <tr>
jpayne@68 681 <td class="parameter_name"><p>angle1</p></td>
jpayne@68 682 <td class="parameter_description"><p>the start angle, in radians</p></td>
jpayne@68 683 <td class="parameter_annotations"> </td>
jpayne@68 684 </tr>
jpayne@68 685 <tr>
jpayne@68 686 <td class="parameter_name"><p>angle2</p></td>
jpayne@68 687 <td class="parameter_description"><p>the end angle, in radians</p></td>
jpayne@68 688 <td class="parameter_annotations"> </td>
jpayne@68 689 </tr>
jpayne@68 690 </tbody>
jpayne@68 691 </table></div>
jpayne@68 692 </div>
jpayne@68 693 <p class="since">Since: 1.0</p>
jpayne@68 694 </div>
jpayne@68 695 <hr>
jpayne@68 696 <div class="refsect2">
jpayne@68 697 <a name="cairo-arc-negative"></a><h3>cairo_arc_negative ()</h3>
jpayne@68 698 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 699 cairo_arc_negative (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 700 <em class="parameter"><code><span class="type">double</span> xc</code></em>,
jpayne@68 701 <em class="parameter"><code><span class="type">double</span> yc</code></em>,
jpayne@68 702 <em class="parameter"><code><span class="type">double</span> radius</code></em>,
jpayne@68 703 <em class="parameter"><code><span class="type">double</span> angle1</code></em>,
jpayne@68 704 <em class="parameter"><code><span class="type">double</span> angle2</code></em>);</pre>
jpayne@68 705 <p>Adds a circular arc of the given <em class="parameter"><code>radius</code></em>
jpayne@68 706 to the current path. The
jpayne@68 707 arc is centered at (<em class="parameter"><code>xc</code></em>
jpayne@68 708 , <em class="parameter"><code>yc</code></em>
jpayne@68 709 ), begins at <em class="parameter"><code>angle1</code></em>
jpayne@68 710 and proceeds in
jpayne@68 711 the direction of decreasing angles to end at <em class="parameter"><code>angle2</code></em>
jpayne@68 712 . If <em class="parameter"><code>angle2</code></em>
jpayne@68 713 is
jpayne@68 714 greater than <em class="parameter"><code>angle1</code></em>
jpayne@68 715 it will be progressively decreased by
jpayne@68 716 <code class="literal">2*M_PI</code> until it is less than <em class="parameter"><code>angle1</code></em>
jpayne@68 717 .</p>
jpayne@68 718 <p>See <a class="link" href="cairo-Paths.html#cairo-arc" title="cairo_arc ()"><code class="function">cairo_arc()</code></a> for more details. This function differs only in the
jpayne@68 719 direction of the arc between the two angles.</p>
jpayne@68 720 <div class="refsect3">
jpayne@68 721 <a name="cairo-arc-negative.parameters"></a><h4>Parameters</h4>
jpayne@68 722 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 723 <colgroup>
jpayne@68 724 <col width="150px" class="parameters_name">
jpayne@68 725 <col class="parameters_description">
jpayne@68 726 <col width="200px" class="parameters_annotations">
jpayne@68 727 </colgroup>
jpayne@68 728 <tbody>
jpayne@68 729 <tr>
jpayne@68 730 <td class="parameter_name"><p>cr</p></td>
jpayne@68 731 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 732 <td class="parameter_annotations"> </td>
jpayne@68 733 </tr>
jpayne@68 734 <tr>
jpayne@68 735 <td class="parameter_name"><p>xc</p></td>
jpayne@68 736 <td class="parameter_description"><p>X position of the center of the arc</p></td>
jpayne@68 737 <td class="parameter_annotations"> </td>
jpayne@68 738 </tr>
jpayne@68 739 <tr>
jpayne@68 740 <td class="parameter_name"><p>yc</p></td>
jpayne@68 741 <td class="parameter_description"><p>Y position of the center of the arc</p></td>
jpayne@68 742 <td class="parameter_annotations"> </td>
jpayne@68 743 </tr>
jpayne@68 744 <tr>
jpayne@68 745 <td class="parameter_name"><p>radius</p></td>
jpayne@68 746 <td class="parameter_description"><p>the radius of the arc</p></td>
jpayne@68 747 <td class="parameter_annotations"> </td>
jpayne@68 748 </tr>
jpayne@68 749 <tr>
jpayne@68 750 <td class="parameter_name"><p>angle1</p></td>
jpayne@68 751 <td class="parameter_description"><p>the start angle, in radians</p></td>
jpayne@68 752 <td class="parameter_annotations"> </td>
jpayne@68 753 </tr>
jpayne@68 754 <tr>
jpayne@68 755 <td class="parameter_name"><p>angle2</p></td>
jpayne@68 756 <td class="parameter_description"><p>the end angle, in radians</p></td>
jpayne@68 757 <td class="parameter_annotations"> </td>
jpayne@68 758 </tr>
jpayne@68 759 </tbody>
jpayne@68 760 </table></div>
jpayne@68 761 </div>
jpayne@68 762 <p class="since">Since: 1.0</p>
jpayne@68 763 </div>
jpayne@68 764 <hr>
jpayne@68 765 <div class="refsect2">
jpayne@68 766 <a name="cairo-curve-to"></a><h3>cairo_curve_to ()</h3>
jpayne@68 767 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 768 cairo_curve_to (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 769 <em class="parameter"><code><span class="type">double</span> x1</code></em>,
jpayne@68 770 <em class="parameter"><code><span class="type">double</span> y1</code></em>,
jpayne@68 771 <em class="parameter"><code><span class="type">double</span> x2</code></em>,
jpayne@68 772 <em class="parameter"><code><span class="type">double</span> y2</code></em>,
jpayne@68 773 <em class="parameter"><code><span class="type">double</span> x3</code></em>,
jpayne@68 774 <em class="parameter"><code><span class="type">double</span> y3</code></em>);</pre>
jpayne@68 775 <p>Adds a cubic Bézier spline to the path from the current point to
jpayne@68 776 position (<em class="parameter"><code>x3</code></em>
jpayne@68 777 , <em class="parameter"><code>y3</code></em>
jpayne@68 778 ) in user-space coordinates, using (<em class="parameter"><code>x1</code></em>
jpayne@68 779 , <em class="parameter"><code>y1</code></em>
jpayne@68 780 ) and
jpayne@68 781 (<em class="parameter"><code>x2</code></em>
jpayne@68 782 , <em class="parameter"><code>y2</code></em>
jpayne@68 783 ) as the control points. After this call the current point
jpayne@68 784 will be (<em class="parameter"><code>x3</code></em>
jpayne@68 785 , <em class="parameter"><code>y3</code></em>
jpayne@68 786 ).</p>
jpayne@68 787 <p>If there is no current point before the call to <a class="link" href="cairo-Paths.html#cairo-curve-to" title="cairo_curve_to ()"><code class="function">cairo_curve_to()</code></a>
jpayne@68 788 this function will behave as if preceded by a call to
jpayne@68 789 cairo_move_to(<em class="parameter"><code>cr</code></em>
jpayne@68 790 , <em class="parameter"><code>x1</code></em>
jpayne@68 791 , <em class="parameter"><code>y1</code></em>
jpayne@68 792 ).</p>
jpayne@68 793 <div class="refsect3">
jpayne@68 794 <a name="cairo-curve-to.parameters"></a><h4>Parameters</h4>
jpayne@68 795 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 796 <colgroup>
jpayne@68 797 <col width="150px" class="parameters_name">
jpayne@68 798 <col class="parameters_description">
jpayne@68 799 <col width="200px" class="parameters_annotations">
jpayne@68 800 </colgroup>
jpayne@68 801 <tbody>
jpayne@68 802 <tr>
jpayne@68 803 <td class="parameter_name"><p>cr</p></td>
jpayne@68 804 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 805 <td class="parameter_annotations"> </td>
jpayne@68 806 </tr>
jpayne@68 807 <tr>
jpayne@68 808 <td class="parameter_name"><p>x1</p></td>
jpayne@68 809 <td class="parameter_description"><p>the X coordinate of the first control point</p></td>
jpayne@68 810 <td class="parameter_annotations"> </td>
jpayne@68 811 </tr>
jpayne@68 812 <tr>
jpayne@68 813 <td class="parameter_name"><p>y1</p></td>
jpayne@68 814 <td class="parameter_description"><p>the Y coordinate of the first control point</p></td>
jpayne@68 815 <td class="parameter_annotations"> </td>
jpayne@68 816 </tr>
jpayne@68 817 <tr>
jpayne@68 818 <td class="parameter_name"><p>x2</p></td>
jpayne@68 819 <td class="parameter_description"><p>the X coordinate of the second control point</p></td>
jpayne@68 820 <td class="parameter_annotations"> </td>
jpayne@68 821 </tr>
jpayne@68 822 <tr>
jpayne@68 823 <td class="parameter_name"><p>y2</p></td>
jpayne@68 824 <td class="parameter_description"><p>the Y coordinate of the second control point</p></td>
jpayne@68 825 <td class="parameter_annotations"> </td>
jpayne@68 826 </tr>
jpayne@68 827 <tr>
jpayne@68 828 <td class="parameter_name"><p>x3</p></td>
jpayne@68 829 <td class="parameter_description"><p>the X coordinate of the end of the curve</p></td>
jpayne@68 830 <td class="parameter_annotations"> </td>
jpayne@68 831 </tr>
jpayne@68 832 <tr>
jpayne@68 833 <td class="parameter_name"><p>y3</p></td>
jpayne@68 834 <td class="parameter_description"><p>the Y coordinate of the end of the curve</p></td>
jpayne@68 835 <td class="parameter_annotations"> </td>
jpayne@68 836 </tr>
jpayne@68 837 </tbody>
jpayne@68 838 </table></div>
jpayne@68 839 </div>
jpayne@68 840 <p class="since">Since: 1.0</p>
jpayne@68 841 </div>
jpayne@68 842 <hr>
jpayne@68 843 <div class="refsect2">
jpayne@68 844 <a name="cairo-line-to"></a><h3>cairo_line_to ()</h3>
jpayne@68 845 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 846 cairo_line_to (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 847 <em class="parameter"><code><span class="type">double</span> x</code></em>,
jpayne@68 848 <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
jpayne@68 849 <p>Adds a line to the path from the current point to position (<em class="parameter"><code>x</code></em>
jpayne@68 850 , <em class="parameter"><code>y</code></em>
jpayne@68 851 )
jpayne@68 852 in user-space coordinates. After this call the current point
jpayne@68 853 will be (<em class="parameter"><code>x</code></em>
jpayne@68 854 , <em class="parameter"><code>y</code></em>
jpayne@68 855 ).</p>
jpayne@68 856 <p>If there is no current point before the call to <a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>
jpayne@68 857 this function will behave as cairo_move_to(<em class="parameter"><code>cr</code></em>
jpayne@68 858 , <em class="parameter"><code>x</code></em>
jpayne@68 859 , <em class="parameter"><code>y</code></em>
jpayne@68 860 ).</p>
jpayne@68 861 <div class="refsect3">
jpayne@68 862 <a name="cairo-line-to.parameters"></a><h4>Parameters</h4>
jpayne@68 863 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 864 <colgroup>
jpayne@68 865 <col width="150px" class="parameters_name">
jpayne@68 866 <col class="parameters_description">
jpayne@68 867 <col width="200px" class="parameters_annotations">
jpayne@68 868 </colgroup>
jpayne@68 869 <tbody>
jpayne@68 870 <tr>
jpayne@68 871 <td class="parameter_name"><p>cr</p></td>
jpayne@68 872 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 873 <td class="parameter_annotations"> </td>
jpayne@68 874 </tr>
jpayne@68 875 <tr>
jpayne@68 876 <td class="parameter_name"><p>x</p></td>
jpayne@68 877 <td class="parameter_description"><p>the X coordinate of the end of the new line</p></td>
jpayne@68 878 <td class="parameter_annotations"> </td>
jpayne@68 879 </tr>
jpayne@68 880 <tr>
jpayne@68 881 <td class="parameter_name"><p>y</p></td>
jpayne@68 882 <td class="parameter_description"><p>the Y coordinate of the end of the new line</p></td>
jpayne@68 883 <td class="parameter_annotations"> </td>
jpayne@68 884 </tr>
jpayne@68 885 </tbody>
jpayne@68 886 </table></div>
jpayne@68 887 </div>
jpayne@68 888 <p class="since">Since: 1.0</p>
jpayne@68 889 </div>
jpayne@68 890 <hr>
jpayne@68 891 <div class="refsect2">
jpayne@68 892 <a name="cairo-move-to"></a><h3>cairo_move_to ()</h3>
jpayne@68 893 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 894 cairo_move_to (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 895 <em class="parameter"><code><span class="type">double</span> x</code></em>,
jpayne@68 896 <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
jpayne@68 897 <p>Begin a new sub-path. After this call the current point will be (<em class="parameter"><code>x</code></em>
jpayne@68 898 ,
jpayne@68 899 <em class="parameter"><code>y</code></em>
jpayne@68 900 ).</p>
jpayne@68 901 <div class="refsect3">
jpayne@68 902 <a name="cairo-move-to.parameters"></a><h4>Parameters</h4>
jpayne@68 903 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 904 <colgroup>
jpayne@68 905 <col width="150px" class="parameters_name">
jpayne@68 906 <col class="parameters_description">
jpayne@68 907 <col width="200px" class="parameters_annotations">
jpayne@68 908 </colgroup>
jpayne@68 909 <tbody>
jpayne@68 910 <tr>
jpayne@68 911 <td class="parameter_name"><p>cr</p></td>
jpayne@68 912 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 913 <td class="parameter_annotations"> </td>
jpayne@68 914 </tr>
jpayne@68 915 <tr>
jpayne@68 916 <td class="parameter_name"><p>x</p></td>
jpayne@68 917 <td class="parameter_description"><p>the X coordinate of the new position</p></td>
jpayne@68 918 <td class="parameter_annotations"> </td>
jpayne@68 919 </tr>
jpayne@68 920 <tr>
jpayne@68 921 <td class="parameter_name"><p>y</p></td>
jpayne@68 922 <td class="parameter_description"><p>the Y coordinate of the new position</p></td>
jpayne@68 923 <td class="parameter_annotations"> </td>
jpayne@68 924 </tr>
jpayne@68 925 </tbody>
jpayne@68 926 </table></div>
jpayne@68 927 </div>
jpayne@68 928 <p class="since">Since: 1.0</p>
jpayne@68 929 </div>
jpayne@68 930 <hr>
jpayne@68 931 <div class="refsect2">
jpayne@68 932 <a name="cairo-rectangle"></a><h3>cairo_rectangle ()</h3>
jpayne@68 933 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 934 cairo_rectangle (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 935 <em class="parameter"><code><span class="type">double</span> x</code></em>,
jpayne@68 936 <em class="parameter"><code><span class="type">double</span> y</code></em>,
jpayne@68 937 <em class="parameter"><code><span class="type">double</span> width</code></em>,
jpayne@68 938 <em class="parameter"><code><span class="type">double</span> height</code></em>);</pre>
jpayne@68 939 <p>Adds a closed sub-path rectangle of the given size to the current
jpayne@68 940 path at position (<em class="parameter"><code>x</code></em>
jpayne@68 941 , <em class="parameter"><code>y</code></em>
jpayne@68 942 ) in user-space coordinates.</p>
jpayne@68 943 <p>This function is logically equivalent to:</p>
jpayne@68 944 <div class="informalexample">
jpayne@68 945 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
jpayne@68 946 <tbody>
jpayne@68 947 <tr>
jpayne@68 948 <td class="listing_lines" align="right"><pre>1
jpayne@68 949 2
jpayne@68 950 3
jpayne@68 951 4
jpayne@68 952 5</pre></td>
jpayne@68 953 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="cairo-Paths.html#cairo-move-to">cairo_move_to</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">,</span> x<span class="gtkdoc opt">,</span> y<span class="gtkdoc opt">);</span>
jpayne@68 954 <span class="function"><a href="cairo-Paths.html#cairo-rel-line-to">cairo_rel_line_to</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">,</span> width<span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span>
jpayne@68 955 <span class="function"><a href="cairo-Paths.html#cairo-rel-line-to">cairo_rel_line_to</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span> height<span class="gtkdoc opt">);</span>
jpayne@68 956 <span class="function"><a href="cairo-Paths.html#cairo-rel-line-to">cairo_rel_line_to</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">, -</span>width<span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span>
jpayne@68 957 <span class="function"><a href="cairo-Paths.html#cairo-close-path">cairo_close_path</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">);</span></pre></td>
jpayne@68 958 </tr>
jpayne@68 959 </tbody>
jpayne@68 960 </table>
jpayne@68 961 </div>
jpayne@68 962
jpayne@68 963 <div class="refsect3">
jpayne@68 964 <a name="cairo-rectangle.parameters"></a><h4>Parameters</h4>
jpayne@68 965 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 966 <colgroup>
jpayne@68 967 <col width="150px" class="parameters_name">
jpayne@68 968 <col class="parameters_description">
jpayne@68 969 <col width="200px" class="parameters_annotations">
jpayne@68 970 </colgroup>
jpayne@68 971 <tbody>
jpayne@68 972 <tr>
jpayne@68 973 <td class="parameter_name"><p>cr</p></td>
jpayne@68 974 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 975 <td class="parameter_annotations"> </td>
jpayne@68 976 </tr>
jpayne@68 977 <tr>
jpayne@68 978 <td class="parameter_name"><p>x</p></td>
jpayne@68 979 <td class="parameter_description"><p>the X coordinate of the top left corner of the rectangle</p></td>
jpayne@68 980 <td class="parameter_annotations"> </td>
jpayne@68 981 </tr>
jpayne@68 982 <tr>
jpayne@68 983 <td class="parameter_name"><p>y</p></td>
jpayne@68 984 <td class="parameter_description"><p>the Y coordinate to the top left corner of the rectangle</p></td>
jpayne@68 985 <td class="parameter_annotations"> </td>
jpayne@68 986 </tr>
jpayne@68 987 <tr>
jpayne@68 988 <td class="parameter_name"><p>width</p></td>
jpayne@68 989 <td class="parameter_description"><p>the width of the rectangle</p></td>
jpayne@68 990 <td class="parameter_annotations"> </td>
jpayne@68 991 </tr>
jpayne@68 992 <tr>
jpayne@68 993 <td class="parameter_name"><p>height</p></td>
jpayne@68 994 <td class="parameter_description"><p>the height of the rectangle</p></td>
jpayne@68 995 <td class="parameter_annotations"> </td>
jpayne@68 996 </tr>
jpayne@68 997 </tbody>
jpayne@68 998 </table></div>
jpayne@68 999 </div>
jpayne@68 1000 <p class="since">Since: 1.0</p>
jpayne@68 1001 </div>
jpayne@68 1002 <hr>
jpayne@68 1003 <div class="refsect2">
jpayne@68 1004 <a name="cairo-glyph-path"></a><h3>cairo_glyph_path ()</h3>
jpayne@68 1005 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 1006 cairo_glyph_path (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 1007 <em class="parameter"><code>const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t"><span class="type">cairo_glyph_t</span></a> *glyphs</code></em>,
jpayne@68 1008 <em class="parameter"><code><span class="type">int</span> num_glyphs</code></em>);</pre>
jpayne@68 1009 <p>Adds closed paths for the glyphs to the current path. The generated
jpayne@68 1010 path if filled, achieves an effect similar to that of
jpayne@68 1011 <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a>.</p>
jpayne@68 1012 <div class="refsect3">
jpayne@68 1013 <a name="cairo-glyph-path.parameters"></a><h4>Parameters</h4>
jpayne@68 1014 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 1015 <colgroup>
jpayne@68 1016 <col width="150px" class="parameters_name">
jpayne@68 1017 <col class="parameters_description">
jpayne@68 1018 <col width="200px" class="parameters_annotations">
jpayne@68 1019 </colgroup>
jpayne@68 1020 <tbody>
jpayne@68 1021 <tr>
jpayne@68 1022 <td class="parameter_name"><p>cr</p></td>
jpayne@68 1023 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 1024 <td class="parameter_annotations"> </td>
jpayne@68 1025 </tr>
jpayne@68 1026 <tr>
jpayne@68 1027 <td class="parameter_name"><p>glyphs</p></td>
jpayne@68 1028 <td class="parameter_description"><p>array of glyphs to show</p></td>
jpayne@68 1029 <td class="parameter_annotations"> </td>
jpayne@68 1030 </tr>
jpayne@68 1031 <tr>
jpayne@68 1032 <td class="parameter_name"><p>num_glyphs</p></td>
jpayne@68 1033 <td class="parameter_description"><p>number of glyphs to show</p></td>
jpayne@68 1034 <td class="parameter_annotations"> </td>
jpayne@68 1035 </tr>
jpayne@68 1036 </tbody>
jpayne@68 1037 </table></div>
jpayne@68 1038 </div>
jpayne@68 1039 <p class="since">Since: 1.0</p>
jpayne@68 1040 </div>
jpayne@68 1041 <hr>
jpayne@68 1042 <div class="refsect2">
jpayne@68 1043 <a name="cairo-text-path"></a><h3>cairo_text_path ()</h3>
jpayne@68 1044 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 1045 cairo_text_path (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 1046 <em class="parameter"><code>const <span class="type">char</span> *utf8</code></em>);</pre>
jpayne@68 1047 <p>Adds closed paths for text to the current path. The generated
jpayne@68 1048 path if filled, achieves an effect similar to that of
jpayne@68 1049 <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>.</p>
jpayne@68 1050 <p>Text conversion and positioning is done similar to <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>.</p>
jpayne@68 1051 <p>Like <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>, After this call the current point is
jpayne@68 1052 moved to the origin of where the next glyph would be placed in
jpayne@68 1053 this same progression. That is, the current point will be at
jpayne@68 1054 the origin of the final glyph offset by its advance values.
jpayne@68 1055 This allows for chaining multiple calls to to <a class="link" href="cairo-Paths.html#cairo-text-path" title="cairo_text_path ()"><code class="function">cairo_text_path()</code></a>
jpayne@68 1056 without having to set current point in between.</p>
jpayne@68 1057 <p>Note: The <a class="link" href="cairo-Paths.html#cairo-text-path" title="cairo_text_path ()"><code class="function">cairo_text_path()</code></a> function call is part of what the cairo
jpayne@68 1058 designers call the "toy" text API. It is convenient for short demos
jpayne@68 1059 and simple programs, but it is not expected to be adequate for
jpayne@68 1060 serious text-using applications. See <a class="link" href="cairo-Paths.html#cairo-glyph-path" title="cairo_glyph_path ()"><code class="function">cairo_glyph_path()</code></a> for the
jpayne@68 1061 "real" text path API in cairo.</p>
jpayne@68 1062 <div class="refsect3">
jpayne@68 1063 <a name="cairo-text-path.parameters"></a><h4>Parameters</h4>
jpayne@68 1064 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 1065 <colgroup>
jpayne@68 1066 <col width="150px" class="parameters_name">
jpayne@68 1067 <col class="parameters_description">
jpayne@68 1068 <col width="200px" class="parameters_annotations">
jpayne@68 1069 </colgroup>
jpayne@68 1070 <tbody>
jpayne@68 1071 <tr>
jpayne@68 1072 <td class="parameter_name"><p>cr</p></td>
jpayne@68 1073 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 1074 <td class="parameter_annotations"> </td>
jpayne@68 1075 </tr>
jpayne@68 1076 <tr>
jpayne@68 1077 <td class="parameter_name"><p>utf8</p></td>
jpayne@68 1078 <td class="parameter_description"><p>a NUL-terminated string of text encoded in UTF-8, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
jpayne@68 1079 <td class="parameter_annotations"> </td>
jpayne@68 1080 </tr>
jpayne@68 1081 </tbody>
jpayne@68 1082 </table></div>
jpayne@68 1083 </div>
jpayne@68 1084 <p class="since">Since: 1.0</p>
jpayne@68 1085 </div>
jpayne@68 1086 <hr>
jpayne@68 1087 <div class="refsect2">
jpayne@68 1088 <a name="cairo-rel-curve-to"></a><h3>cairo_rel_curve_to ()</h3>
jpayne@68 1089 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 1090 cairo_rel_curve_to (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 1091 <em class="parameter"><code><span class="type">double</span> dx1</code></em>,
jpayne@68 1092 <em class="parameter"><code><span class="type">double</span> dy1</code></em>,
jpayne@68 1093 <em class="parameter"><code><span class="type">double</span> dx2</code></em>,
jpayne@68 1094 <em class="parameter"><code><span class="type">double</span> dy2</code></em>,
jpayne@68 1095 <em class="parameter"><code><span class="type">double</span> dx3</code></em>,
jpayne@68 1096 <em class="parameter"><code><span class="type">double</span> dy3</code></em>);</pre>
jpayne@68 1097 <p>Relative-coordinate version of <a class="link" href="cairo-Paths.html#cairo-curve-to" title="cairo_curve_to ()"><code class="function">cairo_curve_to()</code></a>. All offsets are
jpayne@68 1098 relative to the current point. Adds a cubic Bézier spline to the
jpayne@68 1099 path from the current point to a point offset from the current
jpayne@68 1100 point by (<em class="parameter"><code>dx3</code></em>
jpayne@68 1101 , <em class="parameter"><code>dy3</code></em>
jpayne@68 1102 ), using points offset by (<em class="parameter"><code>dx1</code></em>
jpayne@68 1103 , <em class="parameter"><code>dy1</code></em>
jpayne@68 1104 ) and
jpayne@68 1105 (<em class="parameter"><code>dx2</code></em>
jpayne@68 1106 , <em class="parameter"><code>dy2</code></em>
jpayne@68 1107 ) as the control points. After this call the current
jpayne@68 1108 point will be offset by (<em class="parameter"><code>dx3</code></em>
jpayne@68 1109 , <em class="parameter"><code>dy3</code></em>
jpayne@68 1110 ).</p>
jpayne@68 1111 <p>Given a current point of (x, y), cairo_rel_curve_to(<em class="parameter"><code>cr</code></em>
jpayne@68 1112 , <em class="parameter"><code>dx1</code></em>
jpayne@68 1113 ,
jpayne@68 1114 <em class="parameter"><code>dy1</code></em>
jpayne@68 1115 , <em class="parameter"><code>dx2</code></em>
jpayne@68 1116 , <em class="parameter"><code>dy2</code></em>
jpayne@68 1117 , <em class="parameter"><code>dx3</code></em>
jpayne@68 1118 , <em class="parameter"><code>dy3</code></em>
jpayne@68 1119 ) is logically equivalent to
jpayne@68 1120 cairo_curve_to(<em class="parameter"><code>cr</code></em>
jpayne@68 1121 , x+<em class="parameter"><code>dx1</code></em>
jpayne@68 1122 , y+<em class="parameter"><code>dy1</code></em>
jpayne@68 1123 , x+<em class="parameter"><code>dx2</code></em>
jpayne@68 1124 , y+<em class="parameter"><code>dy2</code></em>
jpayne@68 1125 , x+<em class="parameter"><code>dx3</code></em>
jpayne@68 1126 , y+<em class="parameter"><code>dy3</code></em>
jpayne@68 1127 ).</p>
jpayne@68 1128 <p>It is an error to call this function with no current point. Doing
jpayne@68 1129 so will cause <em class="parameter"><code>cr</code></em>
jpayne@68 1130 to shutdown with a status of
jpayne@68 1131 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-CURRENT-POINT:CAPS"><code class="literal">CAIRO_STATUS_NO_CURRENT_POINT</code></a>.</p>
jpayne@68 1132 <div class="refsect3">
jpayne@68 1133 <a name="cairo-rel-curve-to.parameters"></a><h4>Parameters</h4>
jpayne@68 1134 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 1135 <colgroup>
jpayne@68 1136 <col width="150px" class="parameters_name">
jpayne@68 1137 <col class="parameters_description">
jpayne@68 1138 <col width="200px" class="parameters_annotations">
jpayne@68 1139 </colgroup>
jpayne@68 1140 <tbody>
jpayne@68 1141 <tr>
jpayne@68 1142 <td class="parameter_name"><p>cr</p></td>
jpayne@68 1143 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 1144 <td class="parameter_annotations"> </td>
jpayne@68 1145 </tr>
jpayne@68 1146 <tr>
jpayne@68 1147 <td class="parameter_name"><p>dx1</p></td>
jpayne@68 1148 <td class="parameter_description"><p>the X offset to the first control point</p></td>
jpayne@68 1149 <td class="parameter_annotations"> </td>
jpayne@68 1150 </tr>
jpayne@68 1151 <tr>
jpayne@68 1152 <td class="parameter_name"><p>dy1</p></td>
jpayne@68 1153 <td class="parameter_description"><p>the Y offset to the first control point</p></td>
jpayne@68 1154 <td class="parameter_annotations"> </td>
jpayne@68 1155 </tr>
jpayne@68 1156 <tr>
jpayne@68 1157 <td class="parameter_name"><p>dx2</p></td>
jpayne@68 1158 <td class="parameter_description"><p>the X offset to the second control point</p></td>
jpayne@68 1159 <td class="parameter_annotations"> </td>
jpayne@68 1160 </tr>
jpayne@68 1161 <tr>
jpayne@68 1162 <td class="parameter_name"><p>dy2</p></td>
jpayne@68 1163 <td class="parameter_description"><p>the Y offset to the second control point</p></td>
jpayne@68 1164 <td class="parameter_annotations"> </td>
jpayne@68 1165 </tr>
jpayne@68 1166 <tr>
jpayne@68 1167 <td class="parameter_name"><p>dx3</p></td>
jpayne@68 1168 <td class="parameter_description"><p>the X offset to the end of the curve</p></td>
jpayne@68 1169 <td class="parameter_annotations"> </td>
jpayne@68 1170 </tr>
jpayne@68 1171 <tr>
jpayne@68 1172 <td class="parameter_name"><p>dy3</p></td>
jpayne@68 1173 <td class="parameter_description"><p>the Y offset to the end of the curve</p></td>
jpayne@68 1174 <td class="parameter_annotations"> </td>
jpayne@68 1175 </tr>
jpayne@68 1176 </tbody>
jpayne@68 1177 </table></div>
jpayne@68 1178 </div>
jpayne@68 1179 <p class="since">Since: 1.0</p>
jpayne@68 1180 </div>
jpayne@68 1181 <hr>
jpayne@68 1182 <div class="refsect2">
jpayne@68 1183 <a name="cairo-rel-line-to"></a><h3>cairo_rel_line_to ()</h3>
jpayne@68 1184 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 1185 cairo_rel_line_to (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 1186 <em class="parameter"><code><span class="type">double</span> dx</code></em>,
jpayne@68 1187 <em class="parameter"><code><span class="type">double</span> dy</code></em>);</pre>
jpayne@68 1188 <p>Relative-coordinate version of <a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>. Adds a line to the
jpayne@68 1189 path from the current point to a point that is offset from the
jpayne@68 1190 current point by (<em class="parameter"><code>dx</code></em>
jpayne@68 1191 , <em class="parameter"><code>dy</code></em>
jpayne@68 1192 ) in user space. After this call the
jpayne@68 1193 current point will be offset by (<em class="parameter"><code>dx</code></em>
jpayne@68 1194 , <em class="parameter"><code>dy</code></em>
jpayne@68 1195 ).</p>
jpayne@68 1196 <p>Given a current point of (x, y), cairo_rel_line_to(<em class="parameter"><code>cr</code></em>
jpayne@68 1197 , <em class="parameter"><code>dx</code></em>
jpayne@68 1198 , <em class="parameter"><code>dy</code></em>
jpayne@68 1199 )
jpayne@68 1200 is logically equivalent to cairo_line_to(<em class="parameter"><code>cr</code></em>
jpayne@68 1201 , x + <em class="parameter"><code>dx</code></em>
jpayne@68 1202 , y + <em class="parameter"><code>dy</code></em>
jpayne@68 1203 ).</p>
jpayne@68 1204 <p>It is an error to call this function with no current point. Doing
jpayne@68 1205 so will cause <em class="parameter"><code>cr</code></em>
jpayne@68 1206 to shutdown with a status of
jpayne@68 1207 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-CURRENT-POINT:CAPS"><code class="literal">CAIRO_STATUS_NO_CURRENT_POINT</code></a>.</p>
jpayne@68 1208 <div class="refsect3">
jpayne@68 1209 <a name="cairo-rel-line-to.parameters"></a><h4>Parameters</h4>
jpayne@68 1210 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 1211 <colgroup>
jpayne@68 1212 <col width="150px" class="parameters_name">
jpayne@68 1213 <col class="parameters_description">
jpayne@68 1214 <col width="200px" class="parameters_annotations">
jpayne@68 1215 </colgroup>
jpayne@68 1216 <tbody>
jpayne@68 1217 <tr>
jpayne@68 1218 <td class="parameter_name"><p>cr</p></td>
jpayne@68 1219 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 1220 <td class="parameter_annotations"> </td>
jpayne@68 1221 </tr>
jpayne@68 1222 <tr>
jpayne@68 1223 <td class="parameter_name"><p>dx</p></td>
jpayne@68 1224 <td class="parameter_description"><p>the X offset to the end of the new line</p></td>
jpayne@68 1225 <td class="parameter_annotations"> </td>
jpayne@68 1226 </tr>
jpayne@68 1227 <tr>
jpayne@68 1228 <td class="parameter_name"><p>dy</p></td>
jpayne@68 1229 <td class="parameter_description"><p>the Y offset to the end of the new line</p></td>
jpayne@68 1230 <td class="parameter_annotations"> </td>
jpayne@68 1231 </tr>
jpayne@68 1232 </tbody>
jpayne@68 1233 </table></div>
jpayne@68 1234 </div>
jpayne@68 1235 <p class="since">Since: 1.0</p>
jpayne@68 1236 </div>
jpayne@68 1237 <hr>
jpayne@68 1238 <div class="refsect2">
jpayne@68 1239 <a name="cairo-rel-move-to"></a><h3>cairo_rel_move_to ()</h3>
jpayne@68 1240 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 1241 cairo_rel_move_to (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 1242 <em class="parameter"><code><span class="type">double</span> dx</code></em>,
jpayne@68 1243 <em class="parameter"><code><span class="type">double</span> dy</code></em>);</pre>
jpayne@68 1244 <p>Begin a new sub-path. After this call the current point will offset
jpayne@68 1245 by (<em class="parameter"><code>x</code></em>
jpayne@68 1246 , <em class="parameter"><code>y</code></em>
jpayne@68 1247 ).</p>
jpayne@68 1248 <p>Given a current point of (x, y), cairo_rel_move_to(<em class="parameter"><code>cr</code></em>
jpayne@68 1249 , <em class="parameter"><code>dx</code></em>
jpayne@68 1250 , <em class="parameter"><code>dy</code></em>
jpayne@68 1251 )
jpayne@68 1252 is logically equivalent to cairo_move_to(<em class="parameter"><code>cr</code></em>
jpayne@68 1253 , x + <em class="parameter"><code>dx</code></em>
jpayne@68 1254 , y + <em class="parameter"><code>dy</code></em>
jpayne@68 1255 ).</p>
jpayne@68 1256 <p>It is an error to call this function with no current point. Doing
jpayne@68 1257 so will cause <em class="parameter"><code>cr</code></em>
jpayne@68 1258 to shutdown with a status of
jpayne@68 1259 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-CURRENT-POINT:CAPS"><code class="literal">CAIRO_STATUS_NO_CURRENT_POINT</code></a>.</p>
jpayne@68 1260 <div class="refsect3">
jpayne@68 1261 <a name="cairo-rel-move-to.parameters"></a><h4>Parameters</h4>
jpayne@68 1262 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 1263 <colgroup>
jpayne@68 1264 <col width="150px" class="parameters_name">
jpayne@68 1265 <col class="parameters_description">
jpayne@68 1266 <col width="200px" class="parameters_annotations">
jpayne@68 1267 </colgroup>
jpayne@68 1268 <tbody>
jpayne@68 1269 <tr>
jpayne@68 1270 <td class="parameter_name"><p>cr</p></td>
jpayne@68 1271 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 1272 <td class="parameter_annotations"> </td>
jpayne@68 1273 </tr>
jpayne@68 1274 <tr>
jpayne@68 1275 <td class="parameter_name"><p>dx</p></td>
jpayne@68 1276 <td class="parameter_description"><p>the X offset</p></td>
jpayne@68 1277 <td class="parameter_annotations"> </td>
jpayne@68 1278 </tr>
jpayne@68 1279 <tr>
jpayne@68 1280 <td class="parameter_name"><p>dy</p></td>
jpayne@68 1281 <td class="parameter_description"><p>the Y offset</p></td>
jpayne@68 1282 <td class="parameter_annotations"> </td>
jpayne@68 1283 </tr>
jpayne@68 1284 </tbody>
jpayne@68 1285 </table></div>
jpayne@68 1286 </div>
jpayne@68 1287 <p class="since">Since: 1.0</p>
jpayne@68 1288 </div>
jpayne@68 1289 <hr>
jpayne@68 1290 <div class="refsect2">
jpayne@68 1291 <a name="cairo-path-extents"></a><h3>cairo_path_extents ()</h3>
jpayne@68 1292 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 1293 cairo_path_extents (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
jpayne@68 1294 <em class="parameter"><code><span class="type">double</span> *x1</code></em>,
jpayne@68 1295 <em class="parameter"><code><span class="type">double</span> *y1</code></em>,
jpayne@68 1296 <em class="parameter"><code><span class="type">double</span> *x2</code></em>,
jpayne@68 1297 <em class="parameter"><code><span class="type">double</span> *y2</code></em>);</pre>
jpayne@68 1298 <p>Computes a bounding box in user-space coordinates covering the
jpayne@68 1299 points on the current path. If the current path is empty, returns
jpayne@68 1300 an empty rectangle ((0,0), (0,0)). Stroke parameters, fill rule,
jpayne@68 1301 surface dimensions and clipping are not taken into account.</p>
jpayne@68 1302 <p>Contrast with <a class="link" href="cairo-cairo-t.html#cairo-fill-extents" title="cairo_fill_extents ()"><code class="function">cairo_fill_extents()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> which
jpayne@68 1303 return the extents of only the area that would be "inked" by
jpayne@68 1304 the corresponding drawing operations.</p>
jpayne@68 1305 <p>The result of <a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> is defined as equivalent to the
jpayne@68 1306 limit of <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> with <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> as the
jpayne@68 1307 line width approaches 0.0, (but never reaching the empty-rectangle
jpayne@68 1308 returned by <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> for a line width of 0.0).</p>
jpayne@68 1309 <p>Specifically, this means that zero-area sub-paths such as
jpayne@68 1310 <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>;<a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a> segments, (even degenerate cases
jpayne@68 1311 where the coordinates to both calls are identical), will be
jpayne@68 1312 considered as contributing to the extents. However, a lone
jpayne@68 1313 <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a> will not contribute to the results of
jpayne@68 1314 <a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a>.</p>
jpayne@68 1315 <div class="refsect3">
jpayne@68 1316 <a name="cairo-path-extents.parameters"></a><h4>Parameters</h4>
jpayne@68 1317 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 1318 <colgroup>
jpayne@68 1319 <col width="150px" class="parameters_name">
jpayne@68 1320 <col class="parameters_description">
jpayne@68 1321 <col width="200px" class="parameters_annotations">
jpayne@68 1322 </colgroup>
jpayne@68 1323 <tbody>
jpayne@68 1324 <tr>
jpayne@68 1325 <td class="parameter_name"><p>cr</p></td>
jpayne@68 1326 <td class="parameter_description"><p>a cairo context</p></td>
jpayne@68 1327 <td class="parameter_annotations"> </td>
jpayne@68 1328 </tr>
jpayne@68 1329 <tr>
jpayne@68 1330 <td class="parameter_name"><p>x1</p></td>
jpayne@68 1331 <td class="parameter_description"><p>left of the resulting extents</p></td>
jpayne@68 1332 <td class="parameter_annotations"> </td>
jpayne@68 1333 </tr>
jpayne@68 1334 <tr>
jpayne@68 1335 <td class="parameter_name"><p>y1</p></td>
jpayne@68 1336 <td class="parameter_description"><p>top of the resulting extents</p></td>
jpayne@68 1337 <td class="parameter_annotations"> </td>
jpayne@68 1338 </tr>
jpayne@68 1339 <tr>
jpayne@68 1340 <td class="parameter_name"><p>x2</p></td>
jpayne@68 1341 <td class="parameter_description"><p>right of the resulting extents</p></td>
jpayne@68 1342 <td class="parameter_annotations"> </td>
jpayne@68 1343 </tr>
jpayne@68 1344 <tr>
jpayne@68 1345 <td class="parameter_name"><p>y2</p></td>
jpayne@68 1346 <td class="parameter_description"><p>bottom of the resulting extents</p></td>
jpayne@68 1347 <td class="parameter_annotations"> </td>
jpayne@68 1348 </tr>
jpayne@68 1349 </tbody>
jpayne@68 1350 </table></div>
jpayne@68 1351 </div>
jpayne@68 1352 <p class="since">Since: 1.6</p>
jpayne@68 1353 </div>
jpayne@68 1354 </div>
jpayne@68 1355 <div class="refsect1">
jpayne@68 1356 <a name="cairo-Paths.other_details"></a><h2>Types and Values</h2>
jpayne@68 1357 <div class="refsect2">
jpayne@68 1358 <a name="cairo-path-t"></a><h3>cairo_path_t</h3>
jpayne@68 1359 <pre class="programlisting">typedef struct {
jpayne@68 1360 cairo_status_t status;
jpayne@68 1361 cairo_path_data_t *data;
jpayne@68 1362 int num_data;
jpayne@68 1363 } cairo_path_t;
jpayne@68 1364 </pre>
jpayne@68 1365 <p>A data structure for holding a path. This data structure serves as
jpayne@68 1366 the return value for <a class="link" href="cairo-Paths.html#cairo-copy-path" title="cairo_copy_path ()"><code class="function">cairo_copy_path()</code></a> and
jpayne@68 1367 <a class="link" href="cairo-Paths.html#cairo-copy-path-flat" title="cairo_copy_path_flat ()"><code class="function">cairo_copy_path_flat()</code></a> as well the input value for
jpayne@68 1368 <a class="link" href="cairo-Paths.html#cairo-append-path" title="cairo_append_path ()"><code class="function">cairo_append_path()</code></a>.</p>
jpayne@68 1369 <p>See <a class="link" href="cairo-Paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> for hints on how to iterate over the
jpayne@68 1370 actual data within the path.</p>
jpayne@68 1371 <p>The num_data member gives the number of elements in the data
jpayne@68 1372 array. This number is larger than the number of independent path
jpayne@68 1373 portions (defined in <a class="link" href="cairo-Paths.html#cairo-path-data-type-t" title="enum cairo_path_data_type_t"><span class="type">cairo_path_data_type_t</span></a>), since the data
jpayne@68 1374 includes both headers and coordinates for each portion.</p>
jpayne@68 1375 <div class="refsect3">
jpayne@68 1376 <a name="cairo-path-t.members"></a><h4>Members</h4>
jpayne@68 1377 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 1378 <colgroup>
jpayne@68 1379 <col width="300px" class="struct_members_name">
jpayne@68 1380 <col class="struct_members_description">
jpayne@68 1381 <col width="200px" class="struct_members_annotations">
jpayne@68 1382 </colgroup>
jpayne@68 1383 <tbody>
jpayne@68 1384 <tr>
jpayne@68 1385 <td class="struct_member_name"><p><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a> <em class="structfield"><code><a name="cairo-path-t.status"></a>status</code></em>;</p></td>
jpayne@68 1386 <td class="struct_member_description"><p>the current error status</p></td>
jpayne@68 1387 <td class="struct_member_annotations"> </td>
jpayne@68 1388 </tr>
jpayne@68 1389 <tr>
jpayne@68 1390 <td class="struct_member_name"><p><a class="link" href="cairo-Paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> *<em class="structfield"><code><a name="cairo-path-t.data"></a>data</code></em>;</p></td>
jpayne@68 1391 <td class="struct_member_description"><p>the elements in the path</p></td>
jpayne@68 1392 <td class="struct_member_annotations"> </td>
jpayne@68 1393 </tr>
jpayne@68 1394 <tr>
jpayne@68 1395 <td class="struct_member_name"><p><span class="type">int</span> <em class="structfield"><code><a name="cairo-path-t.num-data"></a>num_data</code></em>;</p></td>
jpayne@68 1396 <td class="struct_member_description"><p>the number of elements in the data array</p></td>
jpayne@68 1397 <td class="struct_member_annotations"> </td>
jpayne@68 1398 </tr>
jpayne@68 1399 </tbody>
jpayne@68 1400 </table></div>
jpayne@68 1401 </div>
jpayne@68 1402 <p class="since">Since: 1.0</p>
jpayne@68 1403 </div>
jpayne@68 1404 <hr>
jpayne@68 1405 <div class="refsect2">
jpayne@68 1406 <a name="cairo-path-data-t"></a><h3>union cairo_path_data_t</h3>
jpayne@68 1407 <p><a class="link" href="cairo-Paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> is used to represent the path data inside a
jpayne@68 1408 <a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a>.</p>
jpayne@68 1409 <p>The data structure is designed to try to balance the demands of
jpayne@68 1410 efficiency and ease-of-use. A path is represented as an array of
jpayne@68 1411 <a class="link" href="cairo-Paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a>, which is a union of headers and points.</p>
jpayne@68 1412 <p>Each portion of the path is represented by one or more elements in
jpayne@68 1413 the array, (one header followed by 0 or more points). The length
jpayne@68 1414 value of the header is the number of array elements for the current
jpayne@68 1415 portion including the header, (ie. length == 1 + # of points), and
jpayne@68 1416 where the number of points for each element type is as follows:</p>
jpayne@68 1417 <pre class="programlisting">
jpayne@68 1418 %CAIRO_PATH_MOVE_TO: 1 point
jpayne@68 1419 %CAIRO_PATH_LINE_TO: 1 point
jpayne@68 1420 %CAIRO_PATH_CURVE_TO: 3 points
jpayne@68 1421 %CAIRO_PATH_CLOSE_PATH: 0 points
jpayne@68 1422 </pre>
jpayne@68 1423 <p>The semantics and ordering of the coordinate values are consistent
jpayne@68 1424 with <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>, <a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>, <a class="link" href="cairo-Paths.html#cairo-curve-to" title="cairo_curve_to ()"><code class="function">cairo_curve_to()</code></a>, and
jpayne@68 1425 <a class="link" href="cairo-Paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a>.</p>
jpayne@68 1426 <p>Here is sample code for iterating through a <a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a>:</p>
jpayne@68 1427 <div class="informalexample">
jpayne@68 1428 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
jpayne@68 1429 <tbody>
jpayne@68 1430 <tr>
jpayne@68 1431 <td class="listing_lines" align="right"><pre>1
jpayne@68 1432 2
jpayne@68 1433 3
jpayne@68 1434 4
jpayne@68 1435 5
jpayne@68 1436 6
jpayne@68 1437 7
jpayne@68 1438 8
jpayne@68 1439 9
jpayne@68 1440 10
jpayne@68 1441 11
jpayne@68 1442 12
jpayne@68 1443 13
jpayne@68 1444 14
jpayne@68 1445 15
jpayne@68 1446 16
jpayne@68 1447 17
jpayne@68 1448 18
jpayne@68 1449 19
jpayne@68 1450 20
jpayne@68 1451 21
jpayne@68 1452 22
jpayne@68 1453 23
jpayne@68 1454 24
jpayne@68 1455 25
jpayne@68 1456 26</pre></td>
jpayne@68 1457 <td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">int</span> i<span class="gtkdoc opt">;</span>
jpayne@68 1458 cairo_path_t <span class="gtkdoc opt">*</span>path<span class="gtkdoc opt">;</span>
jpayne@68 1459 cairo_path_data_t <span class="gtkdoc opt">*</span>data<span class="gtkdoc opt">;</span>
jpayne@68 1460  
jpayne@68 1461 path <span class="gtkdoc opt">=</span> <span class="function"><a href="cairo-Paths.html#cairo-copy-path">cairo_copy_path</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">);</span>
jpayne@68 1462  
jpayne@68 1463 <span class="keyword">for</span> <span class="gtkdoc opt">(</span>i<span class="gtkdoc opt">=</span><span class="number">0</span><span class="gtkdoc opt">;</span> i <span class="gtkdoc opt">&lt;</span> path<span class="gtkdoc opt">-&gt;</span>num_data<span class="gtkdoc opt">;</span> i <span class="gtkdoc opt">+=</span> path<span class="gtkdoc opt">-&gt;</span>data<span class="gtkdoc opt">[</span>i<span class="gtkdoc opt">].</span>header<span class="gtkdoc opt">.</span>length<span class="gtkdoc opt">) {</span>
jpayne@68 1464 data <span class="gtkdoc opt">= &amp;</span>path<span class="gtkdoc opt">-&gt;</span>data<span class="gtkdoc opt">[</span>i<span class="gtkdoc opt">];</span>
jpayne@68 1465 <span class="keyword">switch</span> <span class="gtkdoc opt">(</span>data<span class="gtkdoc opt">-&gt;</span>header<span class="gtkdoc opt">.</span>type<span class="gtkdoc opt">) {</span>
jpayne@68 1466 <span class="keyword">case</span> CAIRO_PATH_MOVE_TO<span class="gtkdoc opt">:</span>
jpayne@68 1467 <span class="function">do_move_to_things</span> <span class="gtkdoc opt">(</span>data<span class="gtkdoc opt">[</span><span class="number">1</span><span class="gtkdoc opt">].</span>point<span class="gtkdoc opt">.</span>x<span class="gtkdoc opt">,</span> data<span class="gtkdoc opt">[</span><span class="number">1</span><span class="gtkdoc opt">].</span>point<span class="gtkdoc opt">.</span>y<span class="gtkdoc opt">);</span>
jpayne@68 1468 <span class="keyword">break</span><span class="gtkdoc opt">;</span>
jpayne@68 1469 <span class="keyword">case</span> CAIRO_PATH_LINE_TO<span class="gtkdoc opt">:</span>
jpayne@68 1470 <span class="function">do_line_to_things</span> <span class="gtkdoc opt">(</span>data<span class="gtkdoc opt">[</span><span class="number">1</span><span class="gtkdoc opt">].</span>point<span class="gtkdoc opt">.</span>x<span class="gtkdoc opt">,</span> data<span class="gtkdoc opt">[</span><span class="number">1</span><span class="gtkdoc opt">].</span>point<span class="gtkdoc opt">.</span>y<span class="gtkdoc opt">);</span>
jpayne@68 1471 <span class="keyword">break</span><span class="gtkdoc opt">;</span>
jpayne@68 1472 <span class="keyword">case</span> CAIRO_PATH_CURVE_TO<span class="gtkdoc opt">:</span>
jpayne@68 1473 <span class="function">do_curve_to_things</span> <span class="gtkdoc opt">(</span>data<span class="gtkdoc opt">[</span><span class="number">1</span><span class="gtkdoc opt">].</span>point<span class="gtkdoc opt">.</span>x<span class="gtkdoc opt">,</span> data<span class="gtkdoc opt">[</span><span class="number">1</span><span class="gtkdoc opt">].</span>point<span class="gtkdoc opt">.</span>y<span class="gtkdoc opt">,</span>
jpayne@68 1474 data<span class="gtkdoc opt">[</span><span class="number">2</span><span class="gtkdoc opt">].</span>point<span class="gtkdoc opt">.</span>x<span class="gtkdoc opt">,</span> data<span class="gtkdoc opt">[</span><span class="number">2</span><span class="gtkdoc opt">].</span>point<span class="gtkdoc opt">.</span>y<span class="gtkdoc opt">,</span>
jpayne@68 1475 data<span class="gtkdoc opt">[</span><span class="number">3</span><span class="gtkdoc opt">].</span>point<span class="gtkdoc opt">.</span>x<span class="gtkdoc opt">,</span> data<span class="gtkdoc opt">[</span><span class="number">3</span><span class="gtkdoc opt">].</span>point<span class="gtkdoc opt">.</span>y<span class="gtkdoc opt">);</span>
jpayne@68 1476 <span class="keyword">break</span><span class="gtkdoc opt">;</span>
jpayne@68 1477 <span class="keyword">case</span> CAIRO_PATH_CLOSE_PATH<span class="gtkdoc opt">:</span>
jpayne@68 1478 <span class="function">do_close_path_things</span> <span class="gtkdoc opt">();</span>
jpayne@68 1479 <span class="keyword">break</span><span class="gtkdoc opt">;</span>
jpayne@68 1480 <span class="gtkdoc opt">}</span>
jpayne@68 1481 <span class="gtkdoc opt">}</span>
jpayne@68 1482 <span class="function"><a href="cairo-Paths.html#cairo-path-destroy">cairo_path_destroy</a></span> <span class="gtkdoc opt">(</span>path<span class="gtkdoc opt">);</span></pre></td>
jpayne@68 1483 </tr>
jpayne@68 1484 </tbody>
jpayne@68 1485 </table>
jpayne@68 1486 </div>
jpayne@68 1487
jpayne@68 1488 <p>As of cairo 1.4, cairo does not mind if there are more elements in
jpayne@68 1489 a portion of the path than needed. Such elements can be used by
jpayne@68 1490 users of the cairo API to hold extra values in the path data
jpayne@68 1491 structure. For this reason, it is recommended that applications
jpayne@68 1492 always use <code class="literal">data-&gt;header.length</code> to
jpayne@68 1493 iterate over the path data, instead of hardcoding the number of
jpayne@68 1494 elements for each element type.</p>
jpayne@68 1495 <p class="since">Since: 1.0</p>
jpayne@68 1496 </div>
jpayne@68 1497 <hr>
jpayne@68 1498 <div class="refsect2">
jpayne@68 1499 <a name="cairo-path-data-type-t"></a><h3>enum cairo_path_data_type_t</h3>
jpayne@68 1500 <p><a class="link" href="cairo-Paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> is used to describe the type of one portion
jpayne@68 1501 of a path when represented as a <a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a>.
jpayne@68 1502 See <a class="link" href="cairo-Paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> for details.</p>
jpayne@68 1503 <div class="refsect3">
jpayne@68 1504 <a name="cairo-path-data-type-t.members"></a><h4>Members</h4>
jpayne@68 1505 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 1506 <colgroup>
jpayne@68 1507 <col width="300px" class="enum_members_name">
jpayne@68 1508 <col class="enum_members_description">
jpayne@68 1509 <col width="200px" class="enum_members_annotations">
jpayne@68 1510 </colgroup>
jpayne@68 1511 <tbody>
jpayne@68 1512 <tr>
jpayne@68 1513 <td class="enum_member_name"><p><a name="CAIRO-PATH-MOVE-TO:CAPS"></a>CAIRO_PATH_MOVE_TO</p></td>
jpayne@68 1514 <td class="enum_member_description">
jpayne@68 1515 <p>A move-to operation, since 1.0</p>
jpayne@68 1516 </td>
jpayne@68 1517 <td class="enum_member_annotations"> </td>
jpayne@68 1518 </tr>
jpayne@68 1519 <tr>
jpayne@68 1520 <td class="enum_member_name"><p><a name="CAIRO-PATH-LINE-TO:CAPS"></a>CAIRO_PATH_LINE_TO</p></td>
jpayne@68 1521 <td class="enum_member_description">
jpayne@68 1522 <p>A line-to operation, since 1.0</p>
jpayne@68 1523 </td>
jpayne@68 1524 <td class="enum_member_annotations"> </td>
jpayne@68 1525 </tr>
jpayne@68 1526 <tr>
jpayne@68 1527 <td class="enum_member_name"><p><a name="CAIRO-PATH-CURVE-TO:CAPS"></a>CAIRO_PATH_CURVE_TO</p></td>
jpayne@68 1528 <td class="enum_member_description">
jpayne@68 1529 <p>A curve-to operation, since 1.0</p>
jpayne@68 1530 </td>
jpayne@68 1531 <td class="enum_member_annotations"> </td>
jpayne@68 1532 </tr>
jpayne@68 1533 <tr>
jpayne@68 1534 <td class="enum_member_name"><p><a name="CAIRO-PATH-CLOSE-PATH:CAPS"></a>CAIRO_PATH_CLOSE_PATH</p></td>
jpayne@68 1535 <td class="enum_member_description">
jpayne@68 1536 <p>A close-path operation, since 1.0</p>
jpayne@68 1537 </td>
jpayne@68 1538 <td class="enum_member_annotations"> </td>
jpayne@68 1539 </tr>
jpayne@68 1540 </tbody>
jpayne@68 1541 </table></div>
jpayne@68 1542 </div>
jpayne@68 1543 <p class="since">Since: 1.0</p>
jpayne@68 1544 </div>
jpayne@68 1545 </div>
jpayne@68 1546 </div>
jpayne@68 1547 <div class="footer">
jpayne@68 1548 <hr>Generated by GTK-Doc V1.27</div>
jpayne@68 1549 </body>
jpayne@68 1550 </html>