comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 68:5028fdace37b
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>SVG Surfaces: Cairo: A Vector Graphics Library</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8 <link rel="up" href="cairo-surfaces.html" title="Surfaces">
9 <link rel="prev" href="cairo-Win32-Surfaces.html" title="Win32 Surfaces">
10 <link rel="next" href="cairo-Quartz-Surfaces.html" title="Quartz Surfaces">
11 <meta name="generator" content="GTK-Doc V1.27 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18 <a href="#cairo-SVG-Surfaces.description" class="shortcut">Description</a></span>
19 </td>
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21 <td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="cairo-Win32-Surfaces.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="cairo-Quartz-Surfaces.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24 </tr></table>
25 <div class="refentry">
26 <a name="cairo-SVG-Surfaces"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
29 <h2><span class="refentrytitle"><a name="cairo-SVG-Surfaces.top_of_page"></a>SVG Surfaces</span></h2>
30 <p>SVG Surfaces — Rendering SVG documents</p>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
34 <div class="refsect1">
35 <a name="cairo-SVG-Surfaces.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table class="informaltable" width="100%" border="0">
37 <colgroup>
38 <col width="150px" class="functions_return">
39 <col class="functions_name">
40 </colgroup>
41 <tbody>
42 <tr>
43 <td class="function_type">
44 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
45 </td>
46 <td class="function_name">
47 <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-surface-create" title="cairo_svg_surface_create ()">cairo_svg_surface_create</a> <span class="c_punctuation">()</span>
48 </td>
49 </tr>
50 <tr>
51 <td class="function_type">
52 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
53 </td>
54 <td class="function_name">
55 <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-surface-create-for-stream" title="cairo_svg_surface_create_for_stream ()">cairo_svg_surface_create_for_stream</a> <span class="c_punctuation">()</span>
56 </td>
57 </tr>
58 <tr>
59 <td class="function_type">
60 <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-unit-t" title="enum cairo_svg_unit_t"><span class="returnvalue">cairo_svg_unit_t</span></a>
61 </td>
62 <td class="function_name">
63 <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-surface-get-document-unit" title="cairo_svg_surface_get_document_unit ()">cairo_svg_surface_get_document_unit</a> <span class="c_punctuation">()</span>
64 </td>
65 </tr>
66 <tr>
67 <td class="function_type">
68 <span class="returnvalue">void</span>
69 </td>
70 <td class="function_name">
71 <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-surface-set-document-unit" title="cairo_svg_surface_set_document_unit ()">cairo_svg_surface_set_document_unit</a> <span class="c_punctuation">()</span>
72 </td>
73 </tr>
74 <tr>
75 <td class="function_type">
76 <span class="returnvalue">void</span>
77 </td>
78 <td class="function_name">
79 <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-surface-restrict-to-version" title="cairo_svg_surface_restrict_to_version ()">cairo_svg_surface_restrict_to_version</a> <span class="c_punctuation">()</span>
80 </td>
81 </tr>
82 <tr>
83 <td class="function_type">
84 <span class="returnvalue">void</span>
85 </td>
86 <td class="function_name">
87 <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-get-versions" title="cairo_svg_get_versions ()">cairo_svg_get_versions</a> <span class="c_punctuation">()</span>
88 </td>
89 </tr>
90 <tr>
91 <td class="function_type">const <span class="returnvalue">char</span> *
92 </td>
93 <td class="function_name">
94 <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-to-string" title="cairo_svg_version_to_string ()">cairo_svg_version_to_string</a> <span class="c_punctuation">()</span>
95 </td>
96 </tr>
97 </tbody>
98 </table></div>
99 </div>
100 <div class="refsect1">
101 <a name="cairo-SVG-Surfaces.other"></a><h2>Types and Values</h2>
102 <div class="informaltable"><table class="informaltable" width="100%" border="0">
103 <colgroup>
104 <col width="150px" class="name">
105 <col class="description">
106 </colgroup>
107 <tbody>
108 <tr>
109 <td class="define_keyword">#define</td>
110 <td class="function_name"><a class="link" href="cairo-SVG-Surfaces.html#CAIRO-HAS-SVG-SURFACE:CAPS" title="CAIRO_HAS_SVG_SURFACE">CAIRO_HAS_SVG_SURFACE</a></td>
111 </tr>
112 <tr>
113 <td class="datatype_keyword">enum</td>
114 <td class="function_name"><a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a></td>
115 </tr>
116 <tr>
117 <td class="datatype_keyword">enum</td>
118 <td class="function_name"><a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-unit-t" title="enum cairo_svg_unit_t">cairo_svg_unit_t</a></td>
119 </tr>
120 </tbody>
121 </table></div>
122 </div>
123 <div class="refsect1">
124 <a name="cairo-SVG-Surfaces.description"></a><h2>Description</h2>
125 <p>The SVG surface is used to render cairo graphics to
126 SVG files and is a multi-page vector surface backend.</p>
127 </div>
128 <div class="refsect1">
129 <a name="cairo-SVG-Surfaces.functions_details"></a><h2>Functions</h2>
130 <div class="refsect2">
131 <a name="cairo-svg-surface-create"></a><h3>cairo_svg_surface_create ()</h3>
132 <pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
133 cairo_svg_surface_create (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
134 <em class="parameter"><code><span class="type">double</span> width_in_points</code></em>,
135 <em class="parameter"><code><span class="type">double</span> height_in_points</code></em>);</pre>
136 <p>Creates a SVG surface of the specified size in points to be written
137 to <em class="parameter"><code>filename</code></em>
138 .</p>
139 <p>The SVG surface backend recognizes the following MIME types for the
140 data attached to a surface (see <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-set-mime-data" title="cairo_surface_set_mime_data ()"><code class="function">cairo_surface_set_mime_data()</code></a>) when
141 it is used as a source pattern for drawing on this surface:
142 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JPEG:CAPS" title="CAIRO_MIME_TYPE_JPEG"><code class="literal">CAIRO_MIME_TYPE_JPEG</code></a>, <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-PNG:CAPS" title="CAIRO_MIME_TYPE_PNG"><code class="literal">CAIRO_MIME_TYPE_PNG</code></a>,
143 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-URI:CAPS" title="CAIRO_MIME_TYPE_URI"><code class="literal">CAIRO_MIME_TYPE_URI</code></a>. If any of them is specified, the SVG backend
144 emits a href with the content of MIME data instead of a surface
145 snapshot (PNG, Base64-encoded) in the corresponding image tag.</p>
146 <p>The unofficial MIME type <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-URI:CAPS" title="CAIRO_MIME_TYPE_URI"><code class="literal">CAIRO_MIME_TYPE_URI</code></a> is examined
147 first. If present, the URI is emitted as is: assuring the
148 correctness of URI is left to the client code.</p>
149 <p>If <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-URI:CAPS" title="CAIRO_MIME_TYPE_URI"><code class="literal">CAIRO_MIME_TYPE_URI</code></a> is not present, but <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JPEG:CAPS" title="CAIRO_MIME_TYPE_JPEG"><code class="literal">CAIRO_MIME_TYPE_JPEG</code></a>
150 or <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-PNG:CAPS" title="CAIRO_MIME_TYPE_PNG"><code class="literal">CAIRO_MIME_TYPE_PNG</code></a> is specified, the corresponding data is
151 Base64-encoded and emitted.</p>
152 <p>If <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-UNIQUE-ID:CAPS" title="CAIRO_MIME_TYPE_UNIQUE_ID"><code class="literal">CAIRO_MIME_TYPE_UNIQUE_ID</code></a> is present, all surfaces with the same
153 unique identifier will only be embedded once.</p>
154 <div class="refsect3">
155 <a name="cairo-svg-surface-create.parameters"></a><h4>Parameters</h4>
156 <div class="informaltable"><table class="informaltable" width="100%" border="0">
157 <colgroup>
158 <col width="150px" class="parameters_name">
159 <col class="parameters_description">
160 <col width="200px" class="parameters_annotations">
161 </colgroup>
162 <tbody>
163 <tr>
164 <td class="parameter_name"><p>filename</p></td>
165 <td class="parameter_description"><p>a filename for the SVG output (must be writable), <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> may be
166 used to specify no output. This will generate a SVG surface that
167 may be queried and used as a source, without generating a
168 temporary file.</p></td>
169 <td class="parameter_annotations"> </td>
170 </tr>
171 <tr>
172 <td class="parameter_name"><p>width_in_points</p></td>
173 <td class="parameter_description"><p>width of the surface, in points (1 point == 1/72.0 inch)</p></td>
174 <td class="parameter_annotations"> </td>
175 </tr>
176 <tr>
177 <td class="parameter_name"><p>height_in_points</p></td>
178 <td class="parameter_description"><p>height of the surface, in points (1 point == 1/72.0 inch)</p></td>
179 <td class="parameter_annotations"> </td>
180 </tr>
181 </tbody>
182 </table></div>
183 </div>
184 <div class="refsect3">
185 <a name="cairo-svg-surface-create.returns"></a><h4>Returns</h4>
186 <p> a pointer to the newly created surface. The caller
187 owns the surface and should call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
188 with it.</p>
189 <p>This function always returns a valid pointer, but it will return a
190 pointer to a "nil" surface if an error such as out of memory
191 occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a> to check for this.</p>
192 </div>
193 <p class="since">Since: 1.2</p>
194 </div>
195 <hr>
196 <div class="refsect2">
197 <a name="cairo-svg-surface-create-for-stream"></a><h3>cairo_svg_surface_create_for_stream ()</h3>
198 <pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
199 cairo_svg_surface_create_for_stream (<em class="parameter"><code><a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> write_func</code></em>,
200 <em class="parameter"><code><span class="type">void</span> *closure</code></em>,
201 <em class="parameter"><code><span class="type">double</span> width_in_points</code></em>,
202 <em class="parameter"><code><span class="type">double</span> height_in_points</code></em>);</pre>
203 <p>Creates a SVG surface of the specified size in points to be written
204 incrementally to the stream represented by <em class="parameter"><code>write_func</code></em>
205 and <em class="parameter"><code>closure</code></em>
206 .</p>
207 <div class="refsect3">
208 <a name="cairo-svg-surface-create-for-stream.parameters"></a><h4>Parameters</h4>
209 <div class="informaltable"><table class="informaltable" width="100%" border="0">
210 <colgroup>
211 <col width="150px" class="parameters_name">
212 <col class="parameters_description">
213 <col width="200px" class="parameters_annotations">
214 </colgroup>
215 <tbody>
216 <tr>
217 <td class="parameter_name"><p>write_func</p></td>
218 <td class="parameter_description"><p>a <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> to accept the output data, may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
219 to indicate a no-op <em class="parameter"><code>write_func</code></em>
220 . With a no-op <em class="parameter"><code>write_func</code></em>
221 ,
222 the surface may be queried or used as a source without
223 generating any temporary files.</p></td>
224 <td class="parameter_annotations"> </td>
225 </tr>
226 <tr>
227 <td class="parameter_name"><p>closure</p></td>
228 <td class="parameter_description"><p>the closure argument for <em class="parameter"><code>write_func</code></em>
229 </p></td>
230 <td class="parameter_annotations"> </td>
231 </tr>
232 <tr>
233 <td class="parameter_name"><p>width_in_points</p></td>
234 <td class="parameter_description"><p>width of the surface, in points (1 point == 1/72.0 inch)</p></td>
235 <td class="parameter_annotations"> </td>
236 </tr>
237 <tr>
238 <td class="parameter_name"><p>height_in_points</p></td>
239 <td class="parameter_description"><p>height of the surface, in points (1 point == 1/72.0 inch)</p></td>
240 <td class="parameter_annotations"> </td>
241 </tr>
242 </tbody>
243 </table></div>
244 </div>
245 <div class="refsect3">
246 <a name="cairo-svg-surface-create-for-stream.returns"></a><h4>Returns</h4>
247 <p> a pointer to the newly created surface. The caller
248 owns the surface and should call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
249 with it.</p>
250 <p>This function always returns a valid pointer, but it will return a
251 pointer to a "nil" surface if an error such as out of memory
252 occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a> to check for this.</p>
253 </div>
254 <p class="since">Since: 1.2</p>
255 </div>
256 <hr>
257 <div class="refsect2">
258 <a name="cairo-svg-surface-get-document-unit"></a><h3>cairo_svg_surface_get_document_unit ()</h3>
259 <pre class="programlisting"><a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-unit-t" title="enum cairo_svg_unit_t"><span class="returnvalue">cairo_svg_unit_t</span></a>
260 cairo_svg_surface_get_document_unit (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
261 <p>Get the unit of the SVG surface.</p>
262 <p>If the surface passed as an argument is not a SVG surface, the function
263 sets the error status to CAIRO_STATUS_SURFACE_TYPE_MISMATCH and returns
264 CAIRO_SVG_UNIT_USER.</p>
265 <div class="refsect3">
266 <a name="cairo-svg-surface-get-document-unit.parameters"></a><h4>Parameters</h4>
267 <div class="informaltable"><table class="informaltable" width="100%" border="0">
268 <colgroup>
269 <col width="150px" class="parameters_name">
270 <col class="parameters_description">
271 <col width="200px" class="parameters_annotations">
272 </colgroup>
273 <tbody><tr>
274 <td class="parameter_name"><p>surface</p></td>
275 <td class="parameter_description"><p>a SVG <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p></td>
276 <td class="parameter_annotations"> </td>
277 </tr></tbody>
278 </table></div>
279 </div>
280 <div class="refsect3">
281 <a name="cairo-svg-surface-get-document-unit.returns"></a><h4>Returns</h4>
282 <p> the SVG unit of the SVG surface.</p>
283 </div>
284 <p class="since">Since: 1.16</p>
285 </div>
286 <hr>
287 <div class="refsect2">
288 <a name="cairo-svg-surface-set-document-unit"></a><h3>cairo_svg_surface_set_document_unit ()</h3>
289 <pre class="programlisting"><span class="returnvalue">void</span>
290 cairo_svg_surface_set_document_unit (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
291 <em class="parameter"><code><a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-unit-t" title="enum cairo_svg_unit_t"><span class="type">cairo_svg_unit_t</span></a> unit</code></em>);</pre>
292 <p>Use the specified unit for the width and height of the generated SVG file.
293 See <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-unit-t" title="enum cairo_svg_unit_t"><span class="type">cairo_svg_unit_t</span></a> for a list of available unit values that can be used
294 here.</p>
295 <p>This function can be called at any time before generating the SVG file.</p>
296 <p>However to minimize the risk of ambiguities it's recommended to call it
297 before any drawing operations have been performed on the given surface, to
298 make it clearer what the unit used in the drawing operations is.</p>
299 <p>The simplest way to do this is to call this function immediately after
300 creating the SVG surface.</p>
301 <p>Note if this function is never called, the default unit for SVG documents
302 generated by cairo will be "pt". This is for historical reasons.</p>
303 <div class="refsect3">
304 <a name="cairo-svg-surface-set-document-unit.parameters"></a><h4>Parameters</h4>
305 <div class="informaltable"><table class="informaltable" width="100%" border="0">
306 <colgroup>
307 <col width="150px" class="parameters_name">
308 <col class="parameters_description">
309 <col width="200px" class="parameters_annotations">
310 </colgroup>
311 <tbody>
312 <tr>
313 <td class="parameter_name"><p>surface</p></td>
314 <td class="parameter_description"><p>a SVG <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p></td>
315 <td class="parameter_annotations"> </td>
316 </tr>
317 <tr>
318 <td class="parameter_name"><p>unit</p></td>
319 <td class="parameter_description"><p>SVG unit</p></td>
320 <td class="parameter_annotations"> </td>
321 </tr>
322 </tbody>
323 </table></div>
324 </div>
325 <p class="since">Since: 1.16</p>
326 </div>
327 <hr>
328 <div class="refsect2">
329 <a name="cairo-svg-surface-restrict-to-version"></a><h3>cairo_svg_surface_restrict_to_version ()</h3>
330 <pre class="programlisting"><span class="returnvalue">void</span>
331 cairo_svg_surface_restrict_to_version (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
332 <em class="parameter"><code><a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t"><span class="type">cairo_svg_version_t</span></a> version</code></em>);</pre>
333 <p>Restricts the generated SVG file to <em class="parameter"><code>version</code></em>
334 . See <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-get-versions" title="cairo_svg_get_versions ()"><code class="function">cairo_svg_get_versions()</code></a>
335 for a list of available version values that can be used here.</p>
336 <p>This function should only be called before any drawing operations
337 have been performed on the given surface. The simplest way to do
338 this is to call this function immediately after creating the
339 surface.</p>
340 <div class="refsect3">
341 <a name="cairo-svg-surface-restrict-to-version.parameters"></a><h4>Parameters</h4>
342 <div class="informaltable"><table class="informaltable" width="100%" border="0">
343 <colgroup>
344 <col width="150px" class="parameters_name">
345 <col class="parameters_description">
346 <col width="200px" class="parameters_annotations">
347 </colgroup>
348 <tbody>
349 <tr>
350 <td class="parameter_name"><p>surface</p></td>
351 <td class="parameter_description"><p>a SVG <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p></td>
352 <td class="parameter_annotations"> </td>
353 </tr>
354 <tr>
355 <td class="parameter_name"><p>version</p></td>
356 <td class="parameter_description"><p>SVG version</p></td>
357 <td class="parameter_annotations"> </td>
358 </tr>
359 </tbody>
360 </table></div>
361 </div>
362 <p class="since">Since: 1.2</p>
363 </div>
364 <hr>
365 <div class="refsect2">
366 <a name="cairo-svg-get-versions"></a><h3>cairo_svg_get_versions ()</h3>
367 <pre class="programlisting"><span class="returnvalue">void</span>
368 cairo_svg_get_versions (<em class="parameter"><code><a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t"><span class="type">cairo_svg_version_t</span></a> const **versions</code></em>,
369 <em class="parameter"><code><span class="type">int</span> *num_versions</code></em>);</pre>
370 <p>Used to retrieve the list of supported versions. See
371 <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-surface-restrict-to-version" title="cairo_svg_surface_restrict_to_version ()"><code class="function">cairo_svg_surface_restrict_to_version()</code></a>.</p>
372 <div class="refsect3">
373 <a name="cairo-svg-get-versions.parameters"></a><h4>Parameters</h4>
374 <div class="informaltable"><table class="informaltable" width="100%" border="0">
375 <colgroup>
376 <col width="150px" class="parameters_name">
377 <col class="parameters_description">
378 <col width="200px" class="parameters_annotations">
379 </colgroup>
380 <tbody>
381 <tr>
382 <td class="parameter_name"><p>versions</p></td>
383 <td class="parameter_description"><p>supported version list</p></td>
384 <td class="parameter_annotations"> </td>
385 </tr>
386 <tr>
387 <td class="parameter_name"><p>num_versions</p></td>
388 <td class="parameter_description"><p>list length</p></td>
389 <td class="parameter_annotations"> </td>
390 </tr>
391 </tbody>
392 </table></div>
393 </div>
394 <p class="since">Since: 1.2</p>
395 </div>
396 <hr>
397 <div class="refsect2">
398 <a name="cairo-svg-version-to-string"></a><h3>cairo_svg_version_to_string ()</h3>
399 <pre class="programlisting">const <span class="returnvalue">char</span> *
400 cairo_svg_version_to_string (<em class="parameter"><code><a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t"><span class="type">cairo_svg_version_t</span></a> version</code></em>);</pre>
401 <p>Get the string representation of the given <em class="parameter"><code>version</code></em>
402 id. This function
403 will return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>version</code></em>
404 isn't valid. See <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-get-versions" title="cairo_svg_get_versions ()"><code class="function">cairo_svg_get_versions()</code></a>
405 for a way to get the list of valid version ids.</p>
406 <div class="refsect3">
407 <a name="cairo-svg-version-to-string.parameters"></a><h4>Parameters</h4>
408 <div class="informaltable"><table class="informaltable" width="100%" border="0">
409 <colgroup>
410 <col width="150px" class="parameters_name">
411 <col class="parameters_description">
412 <col width="200px" class="parameters_annotations">
413 </colgroup>
414 <tbody><tr>
415 <td class="parameter_name"><p>version</p></td>
416 <td class="parameter_description"><p>a version id</p></td>
417 <td class="parameter_annotations"> </td>
418 </tr></tbody>
419 </table></div>
420 </div>
421 <div class="refsect3">
422 <a name="cairo-svg-version-to-string.returns"></a><h4>Returns</h4>
423 <p> the string associated to given version.</p>
424 </div>
425 <p class="since">Since: 1.2</p>
426 </div>
427 </div>
428 <div class="refsect1">
429 <a name="cairo-SVG-Surfaces.other_details"></a><h2>Types and Values</h2>
430 <div class="refsect2">
431 <a name="CAIRO-HAS-SVG-SURFACE:CAPS"></a><h3>CAIRO_HAS_SVG_SURFACE</h3>
432 <pre class="programlisting">#define CAIRO_HAS_SVG_SURFACE 1
433 </pre>
434 <p>Defined if the SVG surface backend is available.
435 This macro can be used to conditionally compile backend-specific code.</p>
436 <p class="since">Since: 1.2</p>
437 </div>
438 <hr>
439 <div class="refsect2">
440 <a name="cairo-svg-version-t"></a><h3>enum cairo_svg_version_t</h3>
441 <p><a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t"><span class="type">cairo_svg_version_t</span></a> is used to describe the version number of the SVG
442 specification that a generated SVG file will conform to.</p>
443 <div class="refsect3">
444 <a name="cairo-svg-version-t.members"></a><h4>Members</h4>
445 <div class="informaltable"><table class="informaltable" width="100%" border="0">
446 <colgroup>
447 <col width="300px" class="enum_members_name">
448 <col class="enum_members_description">
449 <col width="200px" class="enum_members_annotations">
450 </colgroup>
451 <tbody>
452 <tr>
453 <td class="enum_member_name"><p><a name="CAIRO-SVG-VERSION-1-1:CAPS"></a>CAIRO_SVG_VERSION_1_1</p></td>
454 <td class="enum_member_description">
455 <p>The version 1.1 of the SVG specification. (Since 1.2)</p>
456 </td>
457 <td class="enum_member_annotations"> </td>
458 </tr>
459 <tr>
460 <td class="enum_member_name"><p><a name="CAIRO-SVG-VERSION-1-2:CAPS"></a>CAIRO_SVG_VERSION_1_2</p></td>
461 <td class="enum_member_description">
462 <p>The version 1.2 of the SVG specification. (Since 1.2)</p>
463 </td>
464 <td class="enum_member_annotations"> </td>
465 </tr>
466 </tbody>
467 </table></div>
468 </div>
469 <p class="since">Since: 1.2</p>
470 </div>
471 <hr>
472 <div class="refsect2">
473 <a name="cairo-svg-unit-t"></a><h3>enum cairo_svg_unit_t</h3>
474 <p><em class="parameter"><code>CAIRO_SVG_UNIT_USER</code></em>
475 : User unit, a value in the current coordinate system.
476 If used in the root element for the initial coordinate systems it
477 corresponds to pixels. (Since 1.16)
478 <em class="parameter"><code>CAIRO_SVG_UNIT_EM</code></em>
479 : The size of the element's font. (Since 1.16)
480 <em class="parameter"><code>CAIRO_SVG_UNIT_EX</code></em>
481 : The x-height of the element’s font. (Since 1.16)
482 <em class="parameter"><code>CAIRO_SVG_UNIT_PX</code></em>
483 : Pixels (1px = 1/96th of 1in). (Since 1.16)
484 <em class="parameter"><code>CAIRO_SVG_UNIT_IN</code></em>
485 : Inches (1in = 2.54cm = 96px). (Since 1.16)
486 <em class="parameter"><code>CAIRO_SVG_UNIT_CM</code></em>
487 : Centimeters (1cm = 96px/2.54). (Since 1.16)
488 <em class="parameter"><code>CAIRO_SVG_UNIT_MM</code></em>
489 : Millimeters (1mm = 1/10th of 1cm). (Since 1.16)
490 <em class="parameter"><code>CAIRO_SVG_UNIT_PT</code></em>
491 : Points (1pt = 1/72th of 1in). (Since 1.16)
492 <em class="parameter"><code>CAIRO_SVG_UNIT_PC</code></em>
493 : Picas (1pc = 1/6th of 1in). (Since 1.16)
494 <em class="parameter"><code>CAIRO_SVG_UNIT_PERCENT</code></em>
495 : Percent, a value that is some fraction of another
496 reference value. (Since 1.16)</p>
497 <p><a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-unit-t" title="enum cairo_svg_unit_t"><span class="type">cairo_svg_unit_t</span></a> is used to describe the units valid for coordinates and
498 lengths in the SVG specification.</p>
499 <p>See also:
500 https://www.w3.org/TR/SVG/coords.html<span class="type">Units</span>
501 https://www.w3.org/TR/SVG/types.html<span class="type">DataTypeLength</span>
502 https://www.w3.org/TR/css-values-3/<span class="type">lengths</span></p>
503 <div class="refsect3">
504 <a name="cairo-svg-unit-t.members"></a><h4>Members</h4>
505 <div class="informaltable"><table class="informaltable" width="100%" border="0">
506 <colgroup>
507 <col width="300px" class="enum_members_name">
508 <col class="enum_members_description">
509 <col width="200px" class="enum_members_annotations">
510 </colgroup>
511 <tbody>
512 <tr>
513 <td class="enum_member_name"><p><a name="CAIRO-SVG-UNIT-USER:CAPS"></a>CAIRO_SVG_UNIT_USER</p></td>
514 <td> </td>
515 <td> </td>
516 </tr>
517 <tr>
518 <td class="enum_member_name"><p><a name="CAIRO-SVG-UNIT-EM:CAPS"></a>CAIRO_SVG_UNIT_EM</p></td>
519 <td> </td>
520 <td> </td>
521 </tr>
522 <tr>
523 <td class="enum_member_name"><p><a name="CAIRO-SVG-UNIT-EX:CAPS"></a>CAIRO_SVG_UNIT_EX</p></td>
524 <td> </td>
525 <td> </td>
526 </tr>
527 <tr>
528 <td class="enum_member_name"><p><a name="CAIRO-SVG-UNIT-PX:CAPS"></a>CAIRO_SVG_UNIT_PX</p></td>
529 <td> </td>
530 <td> </td>
531 </tr>
532 <tr>
533 <td class="enum_member_name"><p><a name="CAIRO-SVG-UNIT-IN:CAPS"></a>CAIRO_SVG_UNIT_IN</p></td>
534 <td> </td>
535 <td> </td>
536 </tr>
537 <tr>
538 <td class="enum_member_name"><p><a name="CAIRO-SVG-UNIT-CM:CAPS"></a>CAIRO_SVG_UNIT_CM</p></td>
539 <td> </td>
540 <td> </td>
541 </tr>
542 <tr>
543 <td class="enum_member_name"><p><a name="CAIRO-SVG-UNIT-MM:CAPS"></a>CAIRO_SVG_UNIT_MM</p></td>
544 <td> </td>
545 <td> </td>
546 </tr>
547 <tr>
548 <td class="enum_member_name"><p><a name="CAIRO-SVG-UNIT-PT:CAPS"></a>CAIRO_SVG_UNIT_PT</p></td>
549 <td> </td>
550 <td> </td>
551 </tr>
552 <tr>
553 <td class="enum_member_name"><p><a name="CAIRO-SVG-UNIT-PC:CAPS"></a>CAIRO_SVG_UNIT_PC</p></td>
554 <td> </td>
555 <td> </td>
556 </tr>
557 <tr>
558 <td class="enum_member_name"><p><a name="CAIRO-SVG-UNIT-PERCENT:CAPS"></a>CAIRO_SVG_UNIT_PERCENT</p></td>
559 <td> </td>
560 <td> </td>
561 </tr>
562 </tbody>
563 </table></div>
564 </div>
565 <p class="since">Since: 1.16</p>
566 </div>
567 </div>
568 <div class="refsect1">
569 <a name="cairo-SVG-Surfaces.see-also"></a><h2>See Also</h2>
570 <p><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p>
571 </div>
572 </div>
573 <div class="footer">
574 <hr>Generated by GTK-Doc V1.27</div>
575 </body>
576 </html>