~ubuntu-branches/ubuntu/intrepid/cairo/intrepid-updates

« back to all changes in this revision

Viewing changes to doc/public/html/cairo-SVG-Surfaces.html

  • Committer: Bazaar Package Importer
  • Author(s): Fabien Tassin
  • Date: 2008-09-25 16:22:33 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080925162233-btx61ymk181i7mcc
Tags: 1.7.6-0ubuntu1
* New upstream version. Most noticable changes are:
  - some API changes with especially the removal of
    cairo_font_options_set_lcd_filter and cairo_font_options_get_lcd_filter
  - xlib: Faster bookkeeping
  - PS: Fix gradients with non-constant alpha
  - Fix deadlock in user-font code
* debian/patches/00list: Remove 03_from_git_fix_lcd_filter_default.dpatch,
  add debian/patches/03_fix_ftbfs_withing_xcb.dpatch
* debian/libcairo2.symbols, debian/libcairo-directfb2.symbols: update
  list of symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
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</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
7
 
<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8
 
<link rel="up" href="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.10 (XML mode)">
12
 
<link rel="stylesheet" href="style.css" type="text/css">
13
 
<link rel="chapter" href="Drawing.html" title="Drawing">
14
 
<link rel="chapter" href="Fonts.html" title="Fonts">
15
 
<link rel="chapter" href="Surfaces.html" title="Surfaces">
16
 
<link rel="chapter" href="Support.html" title="Utilities">
17
 
<link rel="index" href="ix01.html" title="Index">
18
 
<link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
19
 
<link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
20
 
<link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
21
 
<link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
22
 
<link rel="appendix" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
23
 
</head>
24
 
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
 
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
26
 
<tr valign="middle">
27
 
<td><a accesskey="p" href="cairo-Win32-Surfaces.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
28
 
<td><a accesskey="u" href="Surfaces.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
29
 
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
30
 
<th width="100%" align="center">Cairo: A Vector Graphics Library</th>
31
 
<td><a accesskey="n" href="cairo-Quartz-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
32
 
</tr>
33
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#cairo-SVG-Surfaces.synopsis" class="shortcut">Top</a>
34
 
                   | 
35
 
                  <a href="#cairo-SVG-Surfaces.description" class="shortcut">Description</a></nobr></td></tr>
36
 
</table>
37
 
<div class="refentry" lang="en">
38
 
<a name="cairo-SVG-Surfaces"></a><div class="titlepage"></div>
39
 
<div class="refnamediv"><table width="100%"><tr>
40
 
<td valign="top">
41
 
<h2><span class="refentrytitle"><a name="cairo-SVG-Surfaces.top_of_page"></a>SVG Surfaces</span></h2>
42
 
<p>SVG Surfaces — Rendering SVG documents</p>
43
 
</td>
44
 
<td valign="top" align="right"></td>
45
 
</tr></table></div>
46
 
<div class="refsynopsisdiv">
47
 
<a name="cairo-SVG-Surfaces.synopsis"></a><h2>Synopsis</h2>
48
 
<pre class="synopsis">
49
 
#define             <a class="link" href="cairo-SVG-Surfaces.html#CAIRO-HAS-SVG-SURFACE:CAPS" title="CAIRO_HAS_SVG_SURFACE">CAIRO_HAS_SVG_SURFACE</a>
50
 
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>*    <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-surface-create" title="cairo_svg_surface_create ()">cairo_svg_surface_create</a>            (const char *filename,
51
 
                                                         double width_in_points,
52
 
                                                         double height_in_points);
53
 
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>*    <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> (<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()">cairo_write_func_t</a> write_func,
54
 
                                                         void *closure,
55
 
                                                         double width_in_points,
56
 
                                                         double height_in_points);
57
 
void                <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>
58
 
                                                        (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
59
 
                                                         <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> version);
60
 
enum                <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a>;
61
 
void                <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-get-versions" title="cairo_svg_get_versions ()">cairo_svg_get_versions</a>              (<a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> const **versions,
62
 
                                                         int *num_versions);
63
 
const char*         <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>         (<a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> version);
64
 
</pre>
65
 
</div>
66
 
<div class="refsect1" lang="en">
67
 
<a name="cairo-SVG-Surfaces.description"></a><h2>Description</h2>
68
 
<p>
69
 
The SVG surface is used to render cairo graphics to
70
 
SVG files and is a multi-page vector surface backend.
71
 
</p>
72
 
</div>
73
 
<div class="refsect1" lang="en">
74
 
<a name="cairo-SVG-Surfaces.details"></a><h2>Details</h2>
75
 
<div class="refsect2" lang="en">
76
 
<a name="CAIRO-HAS-SVG-SURFACE:CAPS"></a><h3>CAIRO_HAS_SVG_SURFACE</h3>
77
 
<pre class="programlisting">#define CAIRO_HAS_SVG_SURFACE 1
78
 
</pre>
79
 
<p>
80
 
Defined if the SVG surface backend is available.
81
 
This macro can be used to conditionally compile backend-specific code.
82
 
</p>
83
 
</div>
84
 
<hr>
85
 
<div class="refsect2" lang="en">
86
 
<a name="cairo-svg-surface-create"></a><h3>cairo_svg_surface_create ()</h3>
87
 
<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>*    cairo_svg_surface_create            (const char *filename,
88
 
                                                         double width_in_points,
89
 
                                                         double height_in_points);</pre>
90
 
<p>
91
 
Creates a SVG surface of the specified size in points to be written
92
 
to <em class="parameter"><code>filename</code></em>.</p>
93
 
<p>
94
 
 
95
 
</p>
96
 
<div class="variablelist"><table border="0">
97
 
<col align="left" valign="top">
98
 
<tbody>
99
 
<tr>
100
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
101
 
<td> a filename for the SVG output (must be writable)
102
 
</td>
103
 
</tr>
104
 
<tr>
105
 
<td><p><span class="term"><em class="parameter"><code>width_in_points</code></em> :</span></p></td>
106
 
<td> width of the surface, in points (1 point == 1/72.0 inch)
107
 
</td>
108
 
</tr>
109
 
<tr>
110
 
<td><p><span class="term"><em class="parameter"><code>height_in_points</code></em> :</span></p></td>
111
 
<td> height of the surface, in points (1 point == 1/72.0 inch)
112
 
</td>
113
 
</tr>
114
 
<tr>
115
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
116
 
<td> a pointer to the newly created surface. The caller
117
 
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
118
 
with it.
119
 
 
120
 
This function always returns a valid pointer, but it will return a
121
 
pointer to a "nil" surface if an error such as out of memory
122
 
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.
123
 
 
124
 
</td>
125
 
</tr>
126
 
</tbody>
127
 
</table></div>
128
 
<p class="since">Since  1.2
129
 
</p>
130
 
</div>
131
 
<hr>
132
 
<div class="refsect2" lang="en">
133
 
<a name="cairo-svg-surface-create-for-stream"></a><h3>cairo_svg_surface_create_for_stream ()</h3>
134
 
<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>*    cairo_svg_surface_create_for_stream (<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()">cairo_write_func_t</a> write_func,
135
 
                                                         void *closure,
136
 
                                                         double width_in_points,
137
 
                                                         double height_in_points);</pre>
138
 
<p>
139
 
Creates a SVG surface of the specified size in points to be written
140
 
incrementally to the stream represented by <em class="parameter"><code>write_func</code></em> and <em class="parameter"><code>closure</code></em>.</p>
141
 
<p>
142
 
 
143
 
</p>
144
 
<div class="variablelist"><table border="0">
145
 
<col align="left" valign="top">
146
 
<tbody>
147
 
<tr>
148
 
<td><p><span class="term"><em class="parameter"><code>write_func</code></em> :</span></p></td>
149
 
<td> 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
150
 
</td>
151
 
</tr>
152
 
<tr>
153
 
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
154
 
<td> the closure argument for <em class="parameter"><code>write_func</code></em>
155
 
</td>
156
 
</tr>
157
 
<tr>
158
 
<td><p><span class="term"><em class="parameter"><code>width_in_points</code></em> :</span></p></td>
159
 
<td> width of the surface, in points (1 point == 1/72.0 inch)
160
 
</td>
161
 
</tr>
162
 
<tr>
163
 
<td><p><span class="term"><em class="parameter"><code>height_in_points</code></em> :</span></p></td>
164
 
<td> height of the surface, in points (1 point == 1/72.0 inch)
165
 
</td>
166
 
</tr>
167
 
<tr>
168
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
169
 
<td> a pointer to the newly created surface. The caller
170
 
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
171
 
with it.
172
 
 
173
 
This function always returns a valid pointer, but it will return a
174
 
pointer to a "nil" surface if an error such as out of memory
175
 
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.
176
 
 
177
 
</td>
178
 
</tr>
179
 
</tbody>
180
 
</table></div>
181
 
<p class="since">Since  1.2
182
 
</p>
183
 
</div>
184
 
<hr>
185
 
<div class="refsect2" lang="en">
186
 
<a name="cairo-svg-surface-restrict-to-version"></a><h3>cairo_svg_surface_restrict_to_version ()</h3>
187
 
<pre class="programlisting">void                cairo_svg_surface_restrict_to_version
188
 
                                                        (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
189
 
                                                         <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> version);</pre>
190
 
<p>
191
 
Restricts the generated SVG file to <em class="parameter"><code>version</code></em>. 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>
192
 
for a list of available version values that can be used here.
193
 
</p>
194
 
<p>
195
 
This function should only be called before any drawing operations
196
 
have been performed on the given surface. The simplest way to do
197
 
this is to call this function immediately after creating the
198
 
surface.</p>
199
 
<p>
200
 
 
201
 
</p>
202
 
<div class="variablelist"><table border="0">
203
 
<col align="left" valign="top">
204
 
<tbody>
205
 
<tr>
206
 
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
207
 
<td> 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>
208
 
</td>
209
 
</tr>
210
 
<tr>
211
 
<td><p><span class="term"><em class="parameter"><code>version</code></em> :</span></p></td>
212
 
<td> SVG version
213
 
</td>
214
 
</tr>
215
 
</tbody>
216
 
</table></div>
217
 
<p class="since">Since  1.2
218
 
</p>
219
 
</div>
220
 
<hr>
221
 
<div class="refsect2" lang="en">
222
 
<a name="cairo-svg-version-t"></a><h3>enum cairo_svg_version_t</h3>
223
 
<pre class="programlisting">typedef enum _cairo_svg_version {
224
 
    CAIRO_SVG_VERSION_1_1,
225
 
    CAIRO_SVG_VERSION_1_2
226
 
} cairo_svg_version_t;
227
 
</pre>
228
 
<p>
229
 
<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
230
 
specification that a generated SVG file will conform to.</p>
231
 
<p>
232
 
 
233
 
</p>
234
 
<div class="variablelist"><table border="0">
235
 
<col align="left" valign="top">
236
 
<tbody>
237
 
<tr>
238
 
<td><p><a name="CAIRO-SVG-VERSION-1-1:CAPS"></a><span class="term"><code class="literal">CAIRO_SVG_VERSION_1_1</code></span></p></td>
239
 
<td> The version 1.1 of the SVG specification.
240
 
</td>
241
 
</tr>
242
 
<tr>
243
 
<td><p><a name="CAIRO-SVG-VERSION-1-2:CAPS"></a><span class="term"><code class="literal">CAIRO_SVG_VERSION_1_2</code></span></p></td>
244
 
<td> The version 1.2 of the SVG specification.
245
 
</td>
246
 
</tr>
247
 
</tbody>
248
 
</table></div>
249
 
</div>
250
 
<hr>
251
 
<div class="refsect2" lang="en">
252
 
<a name="cairo-svg-get-versions"></a><h3>cairo_svg_get_versions ()</h3>
253
 
<pre class="programlisting">void                cairo_svg_get_versions              (<a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> const **versions,
254
 
                                                         int *num_versions);</pre>
255
 
<p>
256
 
Used to retrieve the list of supported versions. See
257
 
<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>
258
 
<p>
259
 
 
260
 
</p>
261
 
<div class="variablelist"><table border="0">
262
 
<col align="left" valign="top">
263
 
<tbody>
264
 
<tr>
265
 
<td><p><span class="term"><em class="parameter"><code>versions</code></em> :</span></p></td>
266
 
<td> supported version list
267
 
</td>
268
 
</tr>
269
 
<tr>
270
 
<td><p><span class="term"><em class="parameter"><code>num_versions</code></em> :</span></p></td>
271
 
<td> list length
272
 
</td>
273
 
</tr>
274
 
</tbody>
275
 
</table></div>
276
 
<p class="since">Since  1.2
277
 
</p>
278
 
</div>
279
 
<hr>
280
 
<div class="refsect2" lang="en">
281
 
<a name="cairo-svg-version-to-string"></a><h3>cairo_svg_version_to_string ()</h3>
282
 
<pre class="programlisting">const char*         cairo_svg_version_to_string         (<a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> version);</pre>
283
 
<p>
284
 
Get the string representation of the given <em class="parameter"><code>version</code></em> id. This function
285
 
will return <a
286
 
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
287
 
><code class="literal">NULL</code></a> if <em class="parameter"><code>version</code></em> 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>
288
 
for a way to get the list of valid version ids.</p>
289
 
<p>
290
 
 
291
 
</p>
292
 
<div class="variablelist"><table border="0">
293
 
<col align="left" valign="top">
294
 
<tbody>
295
 
<tr>
296
 
<td><p><span class="term"><em class="parameter"><code>version</code></em> :</span></p></td>
297
 
<td> a version id
298
 
</td>
299
 
</tr>
300
 
<tr>
301
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
302
 
<td> the string associated to given version.
303
 
 
304
 
</td>
305
 
</tr>
306
 
</tbody>
307
 
</table></div>
308
 
<p class="since">Since  1.2
309
 
</p>
310
 
</div>
311
 
</div>
312
 
<div class="refsect1" lang="en">
313
 
<a name="cairo-SVG-Surfaces.see-also"></a><h2>See Also</h2>
314
 
<p>
315
 
</p>
316
 
<div class="itemizedlist"><ul type="disc"><li>#<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><code class="function">cairo_surface_t()</code></a>
317
 
</li></ul></div>
318
 
<p>
319
 
</p>
320
 
</div>
321
 
</div>
322
 
<div class="footer">
323
 
<hr>
324
 
          Generated by GTK-Doc V1.10</div>
325
 
</body>
326
 
</html>