cairo 1.7.0-x86-mswin32 → 1.8.0-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cairo might be problematic. Click here for more details.
- data/ChangeLog +32 -0
- data/NEWS +9 -1
- data/README +1 -0
- data/Rakefile +2 -2
- data/cairo/DLL_FAQ.txt +397 -0
- data/cairo/README.txt +53 -0
- data/cairo/USAGE.txt +94 -0
- data/cairo/bin/libcairo-2.dll +0 -0
- data/cairo/bin/libpng12-0.dll +0 -0
- data/cairo/bin/zlib1.dll +0 -0
- data/cairo/include/cairo/cairo-deprecated.h +0 -4
- data/cairo/include/cairo/cairo-features.h +7 -22
- data/cairo/include/cairo/cairo-pdf.h +1 -1
- data/cairo/include/cairo/cairo-ps.h +1 -1
- data/cairo/include/cairo/cairo-svg.h +1 -1
- data/cairo/include/cairo/cairo-version.h +8 -0
- data/cairo/include/cairo/cairo-win32.h +9 -1
- data/cairo/include/cairo/cairo.h +420 -32
- data/cairo/include/libpng12/png.h +3592 -0
- data/cairo/include/libpng12/pngconf.h +1481 -0
- data/cairo/include/png.h +36 -13
- data/cairo/include/pngconf.h +3 -3
- data/cairo/include/zconf.h +332 -0
- data/cairo/include/zlib.h +1357 -0
- data/cairo/lib/cairo.def +22 -0
- data/cairo/lib/cairo.lib +0 -0
- data/cairo/lib/libcairo.dll.a +0 -0
- data/cairo/lib/libpng.def +1 -0
- data/cairo/lib/libpng.lib +0 -0
- data/cairo/lib/libpng12.dll.a +0 -0
- data/cairo/lib/pkgconfig/cairo-pdf.pc +5 -5
- data/cairo/lib/pkgconfig/cairo-png.pc +5 -5
- data/cairo/lib/pkgconfig/cairo-ps.pc +5 -5
- data/cairo/lib/pkgconfig/cairo-svg.pc +4 -4
- data/cairo/lib/pkgconfig/cairo-win32-font.pc +4 -4
- data/cairo/lib/pkgconfig/cairo-win32.pc +4 -4
- data/cairo/lib/pkgconfig/cairo.pc +4 -4
- data/cairo/lib/pkgconfig/libpng.pc +3 -2
- data/cairo/lib/pkgconfig/libpng12.pc +3 -2
- data/cairo/lib/zdll.exp +0 -0
- data/cairo/lib/zdll.lib +0 -0
- data/cairo/lib/zlib.def +60 -0
- data/cairo/manifest/cairo-dev_1.8.0-1_win32.mft +76 -0
- data/cairo/manifest/cairo_1.8.0-1_win32.mft +5 -0
- data/cairo/manifest/{libpng-dev-1.2.29.mft → libpng-dev_1.2.32-1_win32.mft} +5 -2
- data/cairo/manifest/libpng_1.2.32-1_win32.mft +2 -0
- data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING +0 -0
- data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING-LGPL-2.1 +0 -0
- data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING-MPL-1.1 +0 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-errors.html +15 -11
- data/cairo/share/gtk-doc/html/cairo/bindings-fonts.html +15 -11
- data/cairo/share/gtk-doc/html/cairo/bindings-memory.html +20 -16
- data/cairo/share/gtk-doc/html/cairo/bindings-overloading.html +16 -12
- data/cairo/share/gtk-doc/html/cairo/bindings-path.html +17 -13
- data/cairo/share/gtk-doc/html/cairo/bindings-patterns.html +25 -21
- data/cairo/share/gtk-doc/html/cairo/bindings-return-values.html +17 -13
- data/cairo/share/gtk-doc/html/cairo/bindings-streams.html +14 -10
- data/cairo/share/gtk-doc/html/cairo/bindings-surfaces.html +19 -15
- data/cairo/share/gtk-doc/html/cairo/cairo-context.html +2721 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-drawing.html +57 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-error-status.html +361 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-font-face.html +418 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-font-options.html +695 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-fonts.html +63 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-ft-font.html +318 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-image-surface.html +486 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-cairo-matrix-t.html → cairo-matrix.html} +137 -156
- data/cairo/share/gtk-doc/html/cairo/{cairo-Paths.html → cairo-paths.html} +275 -306
- data/cairo/share/gtk-doc/html/cairo/cairo-pattern.html +1524 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-PDF-Surfaces.html → cairo-pdf-surface.html} +60 -70
- data/cairo/share/gtk-doc/html/cairo/cairo-png-functions.html +332 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-PostScript-Surfaces.html → cairo-ps-surface.html} +131 -150
- data/cairo/share/gtk-doc/html/cairo/cairo-quartz-font.html +153 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-Quartz-Surfaces.html → cairo-quartz-surface.html} +53 -62
- data/cairo/share/gtk-doc/html/cairo/cairo-scaled-font.html +1051 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-support.html +54 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-surface.html +1064 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-surfaces.html +69 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-svg-surface.html +324 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-text.html +1264 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-Transformations.html → cairo-transformations.html} +98 -115
- data/cairo/share/gtk-doc/html/cairo/cairo-types.html +134 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-user-font.html +769 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-version-info.html +355 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-win32-font.html +366 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-win32-surface.html +321 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-XLib-Surfaces.html → cairo-xlib-surface.html} +104 -121
- data/cairo/share/gtk-doc/html/cairo/cairo.devhelp +390 -405
- data/cairo/share/gtk-doc/html/cairo/cairo.devhelp2 +390 -405
- data/cairo/share/gtk-doc/html/cairo/index-1.2.html +63 -59
- data/cairo/share/gtk-doc/html/cairo/index-1.4.html +45 -41
- data/cairo/share/gtk-doc/html/cairo/index-1.6.html +29 -23
- data/cairo/share/gtk-doc/html/cairo/index-1.8.html +107 -0
- data/cairo/share/gtk-doc/html/cairo/index-all.html +759 -0
- data/cairo/share/gtk-doc/html/cairo/index.html +51 -41
- data/cairo/share/gtk-doc/html/cairo/index.sgml +478 -466
- data/cairo/share/gtk-doc/html/cairo/language-bindings.html +22 -18
- data/cairo/share/gtk-doc/html/cairo/style.css +14 -2
- data/cairo/share/man/man3/libpng.3 +443 -17
- data/cairo/share/man/man3/libpngpf.3 +618 -102
- data/cairo/share/man/man5/png.5 +1 -1
- data/cairo/src/tml/make/cairo_1.8.0-1_win32.log +1021 -0
- data/cairo/src/tml/make/cairo_1.8.0-1_win32.sh +68 -0
- data/cairo/src/tml/make/libpng_1.2.32-1_win32.log +269 -0
- data/cairo/src/tml/make/libpng_1.2.32-1_win32.sh +63 -0
- data/cairo/test/example_d.exe +0 -0
- data/cairo/test/minigzip_d.exe +0 -0
- data/cairo/test/testzlib_d.exe +0 -0
- data/cairo/test/untgz_d.exe +0 -0
- data/doc/en/cairo-context.html +81 -91
- data/doc/en/cairo-font-options.html +11 -26
- data/doc/en/cairo-text-cluster-flag.html +35 -0
- data/doc/en/cairo-user-font-face-text-to-glyphs-data.html +3 -3
- data/doc/en/cairo.html +38 -42
- data/doc/en/index.html +129 -142
- data/doc/ja/cairo-font-options.html +3 -25
- data/doc/ja/cairo-text-cluster-flag.html +46 -0
- data/doc/ja/cairo-user-font-face-text-to-glyphs-data.html +16 -15
- data/doc/ja/cairo.html +3 -7
- data/doc/ja/index.html +9 -17
- data/src/cairo.def +1 -1
- data/src/cairo.so +0 -0
- data/src/lib/cairo/constants.rb +3 -1
- data/src/libruby-cairo.a +0 -0
- data/src/rb_cairo.c +2 -2
- data/src/rb_cairo.h +5 -5
- data/src/rb_cairo_constants.c +12 -19
- data/src/rb_cairo_context.c +25 -21
- data/src/rb_cairo_font_face.c +44 -29
- data/src/rb_cairo_font_options.c +1 -23
- data/src/rb_cairo_scaled_font.c +5 -5
- data/test/test_constants.rb +6 -9
- data/test/test_context.rb +0 -12
- data/test/test_font_face.rb +7 -7
- data/test/test_font_options.rb +2 -21
- data/test/test_scaled_font.rb +3 -3
- data/test/test_text_to_glyphs_data.rb +19 -15
- metadata +68 -45
- data/cairo/make/cairo-1.6.4-2.sh +0 -55
- data/cairo/make/libpng-1.2.29.sh +0 -35
- data/cairo/manifest/cairo-1.6.4-2.mft +0 -6
- data/cairo/manifest/cairo-dev-1.6.4-2.mft +0 -72
- data/cairo/manifest/libpng-1.2.29.mft +0 -2
- data/cairo/share/gtk-doc/html/cairo/Drawing.html +0 -53
- data/cairo/share/gtk-doc/html/cairo/Fonts.html +0 -56
- data/cairo/share/gtk-doc/html/cairo/Support.html +0 -50
- data/cairo/share/gtk-doc/html/cairo/Surfaces.html +0 -65
- data/cairo/share/gtk-doc/html/cairo/cairo-Error-Handling.html +0 -328
- data/cairo/share/gtk-doc/html/cairo/cairo-Font-Options.html +0 -720
- data/cairo/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +0 -297
- data/cairo/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +0 -484
- data/cairo/share/gtk-doc/html/cairo/cairo-PNG-Support.html +0 -345
- data/cairo/share/gtk-doc/html/cairo/cairo-Patterns.html +0 -1560
- data/cairo/share/gtk-doc/html/cairo/cairo-Quartz-Fonts.html +0 -161
- data/cairo/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +0 -337
- data/cairo/share/gtk-doc/html/cairo/cairo-Scaled-Fonts.html +0 -823
- data/cairo/share/gtk-doc/html/cairo/cairo-Text.html +0 -836
- data/cairo/share/gtk-doc/html/cairo/cairo-Types.html +0 -143
- data/cairo/share/gtk-doc/html/cairo/cairo-Version-Information.html +0 -325
- data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +0 -381
- data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +0 -331
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +0 -427
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +0 -995
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-t.html +0 -2795
- data/cairo/share/gtk-doc/html/cairo/ix01.html +0 -693
- data/doc/en/cairo-lcd-filter.html +0 -39
- data/doc/ja/cairo-lcd-filter.html +0 -63
@@ -1,81 +1,76 @@
|
|
1
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
5
|
<title>PDF Surfaces</title>
|
6
6
|
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
7
|
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
-
<link rel="up" href="
|
9
|
-
<link rel="prev" href="cairo-
|
10
|
-
<link rel="next" href="cairo-
|
11
|
-
<meta name="generator" content="GTK-Doc V1.
|
8
|
+
<link rel="up" href="cairo-surfaces.html" title="Surfaces">
|
9
|
+
<link rel="prev" href="cairo-image-surface.html" title="Image Surfaces">
|
10
|
+
<link rel="next" href="cairo-png-functions.html" title="PNG Support">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
|
12
12
|
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
-
<link rel="chapter" href="
|
14
|
-
<link rel="chapter" href="
|
15
|
-
<link rel="chapter" href="
|
16
|
-
<link rel="chapter" href="
|
17
|
-
<link rel="index" href="
|
13
|
+
<link rel="chapter" href="cairo-drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="cairo-fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="cairo-support.html" title="Utilities">
|
17
|
+
<link rel="index" href="index-all.html" title="Index">
|
18
18
|
<link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
|
19
19
|
<link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
|
20
20
|
<link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
|
21
|
-
<link rel="
|
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">
|
22
23
|
</head>
|
23
24
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
24
25
|
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
|
25
26
|
<tr valign="middle">
|
26
|
-
<td><a accesskey="p" href="cairo-
|
27
|
-
<td><a accesskey="u" href="
|
27
|
+
<td><a accesskey="p" href="cairo-image-surface.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
28
|
+
<td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
|
28
29
|
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
29
30
|
<th width="100%" align="center">Cairo: A Vector Graphics Library</th>
|
30
|
-
<td><a accesskey="n" href="cairo-
|
31
|
+
<td><a accesskey="n" href="cairo-png-functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
31
32
|
</tr>
|
32
|
-
<tr><td colspan="5" class="shortcuts"><nobr><a href="#
|
33
|
-
|
34
|
-
<a href="#
|
33
|
+
<tr><td colspan="5" class="shortcuts"><nobr><a href="#cairo-pdf-surface.synopsis" class="shortcut">Top</a>
|
34
|
+
|
|
35
|
+
<a href="#cairo-pdf-surface.description" class="shortcut">Description</a></nobr></td></tr>
|
35
36
|
</table>
|
36
37
|
<div class="refentry" lang="en">
|
37
|
-
<a name="cairo-
|
38
|
+
<a name="cairo-pdf-surface"></a><div class="titlepage"></div>
|
38
39
|
<div class="refnamediv"><table width="100%"><tr>
|
39
40
|
<td valign="top">
|
40
|
-
<h2>
|
41
|
-
<
|
42
|
-
</h2>
|
43
|
-
<p>PDF Surfaces — Rendering PDF documents</p>
|
41
|
+
<h2><span class="refentrytitle"><a name="cairo-pdf-surface.top_of_page"></a>PDF Surfaces</span></h2>
|
42
|
+
<p>PDF Surfaces — Rendering PDF documents</p>
|
44
43
|
</td>
|
45
44
|
<td valign="top" align="right"></td>
|
46
45
|
</tr></table></div>
|
47
46
|
<div class="refsynopsisdiv">
|
48
|
-
<h2>Synopsis</h2>
|
47
|
+
<a name="cairo-pdf-surface.synopsis"></a><h2>Synopsis</h2>
|
49
48
|
<pre class="synopsis">
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
#define <a class="link" href="cairo-PDF-Surfaces.html#CAIRO-HAS-PDF-SURFACE:CAPS">CAIRO_HAS_PDF_SURFACE</a>
|
54
|
-
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-create">cairo_pdf_surface_create</a> (const char *filename,
|
49
|
+
#define <a class="link" href="cairo-pdf-surface.html#CAIRO-HAS-PDF-SURFACE:CAPS" title="CAIRO_HAS_PDF_SURFACE">CAIRO_HAS_PDF_SURFACE</a>
|
50
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* <a class="link" href="cairo-pdf-surface.html#cairo-pdf-surface-create" title="cairo_pdf_surface_create ()">cairo_pdf_surface_create</a> (const char *filename,
|
55
51
|
double width_in_points,
|
56
52
|
double height_in_points);
|
57
|
-
<a class="link" href="cairo-
|
53
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* <a class="link" href="cairo-pdf-surface.html#cairo-pdf-surface-create-for-stream" title="cairo_pdf_surface_create_for_stream ()">cairo_pdf_surface_create_for_stream</a> (<a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()">cairo_write_func_t</a> write_func,
|
58
54
|
void *closure,
|
59
55
|
double width_in_points,
|
60
56
|
double height_in_points);
|
61
|
-
void <a class="link" href="cairo-
|
57
|
+
void <a class="link" href="cairo-pdf-surface.html#cairo-pdf-surface-set-size" title="cairo_pdf_surface_set_size ()">cairo_pdf_surface_set_size</a> (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
62
58
|
double width_in_points,
|
63
59
|
double height_in_points);
|
64
60
|
</pre>
|
65
61
|
</div>
|
66
62
|
<div class="refsect1" lang="en">
|
67
|
-
<a name="
|
63
|
+
<a name="cairo-pdf-surface.description"></a><h2>Description</h2>
|
68
64
|
<p>
|
69
65
|
The PDF surface is used to render cairo graphics to Adobe
|
70
66
|
PDF files and is a multi-page vector surface backend.
|
71
67
|
</p>
|
72
68
|
</div>
|
73
69
|
<div class="refsect1" lang="en">
|
74
|
-
<a name="
|
70
|
+
<a name="cairo-pdf-surface.details"></a><h2>Details</h2>
|
75
71
|
<div class="refsect2" lang="en">
|
76
|
-
<a name="
|
77
|
-
<
|
78
|
-
<a class="indexterm" name="id2659387"></a><pre class="programlisting">#define CAIRO_HAS_PDF_SURFACE 1
|
72
|
+
<a name="CAIRO-HAS-PDF-SURFACE:CAPS"></a><h3>CAIRO_HAS_PDF_SURFACE</h3>
|
73
|
+
<pre class="programlisting">#define CAIRO_HAS_PDF_SURFACE 1
|
79
74
|
</pre>
|
80
75
|
<p>
|
81
76
|
Defined if the PDF surface backend is available.
|
@@ -84,9 +79,8 @@ This macro can be used to conditionally compile backend-specific code.
|
|
84
79
|
</div>
|
85
80
|
<hr>
|
86
81
|
<div class="refsect2" lang="en">
|
87
|
-
<a name="
|
88
|
-
<a
|
89
|
-
<a class="indexterm" name="id2659418"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_pdf_surface_create (const char *filename,
|
82
|
+
<a name="cairo-pdf-surface-create"></a><h3>cairo_pdf_surface_create ()</h3>
|
83
|
+
<pre class="programlisting"><a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* cairo_pdf_surface_create (const char *filename,
|
90
84
|
double width_in_points,
|
91
85
|
double height_in_points);</pre>
|
92
86
|
<p>
|
@@ -99,29 +93,29 @@ to <em class="parameter"><code>filename</code></em>.</p>
|
|
99
93
|
<col align="left" valign="top">
|
100
94
|
<tbody>
|
101
95
|
<tr>
|
102
|
-
<td><p><span class="term"><em class="parameter"><code>filename</code></em
|
96
|
+
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
103
97
|
<td> a filename for the PDF output (must be writable)
|
104
98
|
</td>
|
105
99
|
</tr>
|
106
100
|
<tr>
|
107
|
-
<td><p><span class="term"><em class="parameter"><code>width_in_points</code></em
|
101
|
+
<td><p><span class="term"><em class="parameter"><code>width_in_points</code></em> :</span></p></td>
|
108
102
|
<td> width of the surface, in points (1 point == 1/72.0 inch)
|
109
103
|
</td>
|
110
104
|
</tr>
|
111
105
|
<tr>
|
112
|
-
<td><p><span class="term"><em class="parameter"><code>height_in_points</code></em
|
106
|
+
<td><p><span class="term"><em class="parameter"><code>height_in_points</code></em> :</span></p></td>
|
113
107
|
<td> height of the surface, in points (1 point == 1/72.0 inch)
|
114
108
|
</td>
|
115
109
|
</tr>
|
116
110
|
<tr>
|
117
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span
|
111
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
118
112
|
<td> a pointer to the newly created surface. The caller
|
119
|
-
owns the surface and should call <a class="link" href="cairo-
|
113
|
+
owns the surface and should call <a class="link" href="cairo-surface.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
|
120
114
|
with it.
|
121
115
|
|
122
116
|
This function always returns a valid pointer, but it will return a
|
123
117
|
pointer to a "nil" surface if an error such as out of memory
|
124
|
-
occurs. You can use <a class="link" href="cairo-
|
118
|
+
occurs. You can use <a class="link" href="cairo-surface.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a> to check for this.
|
125
119
|
|
126
120
|
</td>
|
127
121
|
</tr>
|
@@ -132,9 +126,8 @@ occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surfa
|
|
132
126
|
</div>
|
133
127
|
<hr>
|
134
128
|
<div class="refsect2" lang="en">
|
135
|
-
<a name="
|
136
|
-
<a
|
137
|
-
<a class="indexterm" name="id2660518"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_pdf_surface_create_for_stream (<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">cairo_write_func_t</a> write_func,
|
129
|
+
<a name="cairo-pdf-surface-create-for-stream"></a><h3>cairo_pdf_surface_create_for_stream ()</h3>
|
130
|
+
<pre class="programlisting"><a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* cairo_pdf_surface_create_for_stream (<a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()">cairo_write_func_t</a> write_func,
|
138
131
|
void *closure,
|
139
132
|
double width_in_points,
|
140
133
|
double height_in_points);</pre>
|
@@ -148,34 +141,34 @@ incrementally to the stream represented by <em class="parameter"><code>write_fun
|
|
148
141
|
<col align="left" valign="top">
|
149
142
|
<tbody>
|
150
143
|
<tr>
|
151
|
-
<td><p><span class="term"><em class="parameter"><code>write_func</code></em
|
152
|
-
<td> a <a class="link" href="cairo-
|
144
|
+
<td><p><span class="term"><em class="parameter"><code>write_func</code></em> :</span></p></td>
|
145
|
+
<td> a <a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> to accept the output data
|
153
146
|
</td>
|
154
147
|
</tr>
|
155
148
|
<tr>
|
156
|
-
<td><p><span class="term"><em class="parameter"><code>closure</code></em
|
149
|
+
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
|
157
150
|
<td> the closure argument for <em class="parameter"><code>write_func</code></em>
|
158
151
|
</td>
|
159
152
|
</tr>
|
160
153
|
<tr>
|
161
|
-
<td><p><span class="term"><em class="parameter"><code>width_in_points</code></em
|
154
|
+
<td><p><span class="term"><em class="parameter"><code>width_in_points</code></em> :</span></p></td>
|
162
155
|
<td> width of the surface, in points (1 point == 1/72.0 inch)
|
163
156
|
</td>
|
164
157
|
</tr>
|
165
158
|
<tr>
|
166
|
-
<td><p><span class="term"><em class="parameter"><code>height_in_points</code></em
|
159
|
+
<td><p><span class="term"><em class="parameter"><code>height_in_points</code></em> :</span></p></td>
|
167
160
|
<td> height of the surface, in points (1 point == 1/72.0 inch)
|
168
161
|
</td>
|
169
162
|
</tr>
|
170
163
|
<tr>
|
171
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span
|
164
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
172
165
|
<td> a pointer to the newly created surface. The caller
|
173
|
-
owns the surface and should call <a class="link" href="cairo-
|
166
|
+
owns the surface and should call <a class="link" href="cairo-surface.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
|
174
167
|
with it.
|
175
168
|
|
176
169
|
This function always returns a valid pointer, but it will return a
|
177
170
|
pointer to a "nil" surface if an error such as out of memory
|
178
|
-
occurs. You can use <a class="link" href="cairo-
|
171
|
+
occurs. You can use <a class="link" href="cairo-surface.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a> to check for this.
|
179
172
|
|
180
173
|
</td>
|
181
174
|
</tr>
|
@@ -186,9 +179,8 @@ occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surfa
|
|
186
179
|
</div>
|
187
180
|
<hr>
|
188
181
|
<div class="refsect2" lang="en">
|
189
|
-
<a name="
|
190
|
-
<a
|
191
|
-
<a class="indexterm" name="id2658553"></a><pre class="programlisting">void cairo_pdf_surface_set_size (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface,
|
182
|
+
<a name="cairo-pdf-surface-set-size"></a><h3>cairo_pdf_surface_set_size ()</h3>
|
183
|
+
<pre class="programlisting">void cairo_pdf_surface_set_size (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
192
184
|
double width_in_points,
|
193
185
|
double height_in_points);</pre>
|
194
186
|
<p>
|
@@ -200,7 +192,7 @@ This function should only be called before any drawing operations
|
|
200
192
|
have been performed on the current page. The simplest way to do
|
201
193
|
this is to call this function immediately after creating the
|
202
194
|
surface or immediately after completing a page with either
|
203
|
-
<a class="link" href="cairo-
|
195
|
+
<a class="link" href="cairo-context.html#cairo-show-page" title="cairo_show_page ()"><code class="function">cairo_show_page()</code></a> or <a class="link" href="cairo-context.html#cairo-copy-page" title="cairo_copy_page ()"><code class="function">cairo_copy_page()</code></a>.</p>
|
204
196
|
<p>
|
205
197
|
|
206
198
|
</p>
|
@@ -208,17 +200,17 @@ surface or immediately after completing a page with either
|
|
208
200
|
<col align="left" valign="top">
|
209
201
|
<tbody>
|
210
202
|
<tr>
|
211
|
-
<td><p><span class="term"><em class="parameter"><code>surface</code></em
|
212
|
-
<td> a PDF <a class="link" href="cairo-
|
203
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
204
|
+
<td> a PDF <a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
213
205
|
</td>
|
214
206
|
</tr>
|
215
207
|
<tr>
|
216
|
-
<td><p><span class="term"><em class="parameter"><code>width_in_points</code></em
|
208
|
+
<td><p><span class="term"><em class="parameter"><code>width_in_points</code></em> :</span></p></td>
|
217
209
|
<td> new surface width, in points (1 point == 1/72.0 inch)
|
218
210
|
</td>
|
219
211
|
</tr>
|
220
212
|
<tr>
|
221
|
-
<td><p><span class="term"><em class="parameter"><code>height_in_points</code></em
|
213
|
+
<td><p><span class="term"><em class="parameter"><code>height_in_points</code></em> :</span></p></td>
|
222
214
|
<td> new surface height, in points (1 point == 1/72.0 inch)
|
223
215
|
</td>
|
224
216
|
</tr>
|
@@ -229,18 +221,16 @@ surface or immediately after completing a page with either
|
|
229
221
|
</div>
|
230
222
|
</div>
|
231
223
|
<div class="refsect1" lang="en">
|
232
|
-
<a name="
|
224
|
+
<a name="cairo-pdf-surface.see-also"></a><h2>See Also</h2>
|
233
225
|
<p>
|
234
226
|
</p>
|
235
|
-
<div class="itemizedlist"><ul type="disc"><li><a class="link" href="cairo-
|
227
|
+
<div class="itemizedlist"><ul type="disc"><li><a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></li></ul></div>
|
236
228
|
<p>
|
237
229
|
</p>
|
238
230
|
</div>
|
239
|
-
<div class="refsect1" lang="en">
|
240
|
-
<a name="id2661068"></a><div class="refsect2" lang="en"><a name="id2661070"></a></div>
|
241
|
-
<hr>
|
242
|
-
<div class="refsect2" lang="en"><a name="id2661071"></a></div>
|
243
|
-
</div>
|
244
231
|
</div>
|
232
|
+
<div class="footer">
|
233
|
+
<hr>
|
234
|
+
Generated by GTK-Doc V1.10</div>
|
245
235
|
</body>
|
246
236
|
</html>
|
@@ -0,0 +1,332 @@
|
|
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>PNG Support</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
|
+
<link rel="start" 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-pdf-surface.html" title="PDF Surfaces">
|
10
|
+
<link rel="next" href="cairo-ps-surface.html" title="PostScript 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="cairo-drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="cairo-fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="cairo-support.html" title="Utilities">
|
17
|
+
<link rel="index" href="index-all.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-pdf-surface.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
28
|
+
<td><a accesskey="u" href="cairo-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-ps-surface.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-png-functions.synopsis" class="shortcut">Top</a>
|
34
|
+
|
|
35
|
+
<a href="#cairo-png-functions.description" class="shortcut">Description</a></nobr></td></tr>
|
36
|
+
</table>
|
37
|
+
<div class="refentry" lang="en">
|
38
|
+
<a name="cairo-png-functions"></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-png-functions.top_of_page"></a>PNG Support</span></h2>
|
42
|
+
<p>PNG Support — Reading and writing PNG images</p>
|
43
|
+
</td>
|
44
|
+
<td valign="top" align="right"></td>
|
45
|
+
</tr></table></div>
|
46
|
+
<div class="refsynopsisdiv">
|
47
|
+
<a name="cairo-png-functions.synopsis"></a><h2>Synopsis</h2>
|
48
|
+
<pre class="synopsis">
|
49
|
+
#define <a class="link" href="cairo-png-functions.html#CAIRO-HAS-PNG-FUNCTIONS:CAPS" title="CAIRO_HAS_PNG_FUNCTIONS">CAIRO_HAS_PNG_FUNCTIONS</a>
|
50
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* <a class="link" href="cairo-png-functions.html#cairo-image-surface-create-from-png" title="cairo_image_surface_create_from_png ()">cairo_image_surface_create_from_png</a> (const char *filename);
|
51
|
+
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (<a class="link" href="cairo-png-functions.html#cairo-read-func-t" title="cairo_read_func_t ()">*cairo_read_func_t</a>) (void *closure,
|
52
|
+
unsigned char *data,
|
53
|
+
unsigned int length);
|
54
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* <a class="link" href="cairo-png-functions.html#cairo-image-surface-create-from-png-stream" title="cairo_image_surface_create_from_png_stream ()">cairo_image_surface_create_from_png_stream</a>
|
55
|
+
(<a class="link" href="cairo-png-functions.html#cairo-read-func-t" title="cairo_read_func_t ()">cairo_read_func_t</a> read_func,
|
56
|
+
void *closure);
|
57
|
+
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> <a class="link" href="cairo-png-functions.html#cairo-surface-write-to-png" title="cairo_surface_write_to_png ()">cairo_surface_write_to_png</a> (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
58
|
+
const char *filename);
|
59
|
+
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (<a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()">*cairo_write_func_t</a>) (void *closure,
|
60
|
+
unsigned char *data,
|
61
|
+
unsigned int length);
|
62
|
+
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> <a class="link" href="cairo-png-functions.html#cairo-surface-write-to-png-stream" title="cairo_surface_write_to_png_stream ()">cairo_surface_write_to_png_stream</a> (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
63
|
+
<a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()">cairo_write_func_t</a> write_func,
|
64
|
+
void *closure);
|
65
|
+
</pre>
|
66
|
+
</div>
|
67
|
+
<div class="refsect1" lang="en">
|
68
|
+
<a name="cairo-png-functions.description"></a><h2>Description</h2>
|
69
|
+
<p>
|
70
|
+
The PNG functions allow reading PNG images into image surfaces, and writing
|
71
|
+
any surface to a PNG file.
|
72
|
+
</p>
|
73
|
+
</div>
|
74
|
+
<div class="refsect1" lang="en">
|
75
|
+
<a name="cairo-png-functions.details"></a><h2>Details</h2>
|
76
|
+
<div class="refsect2" lang="en">
|
77
|
+
<a name="CAIRO-HAS-PNG-FUNCTIONS:CAPS"></a><h3>CAIRO_HAS_PNG_FUNCTIONS</h3>
|
78
|
+
<pre class="programlisting">#define CAIRO_HAS_PNG_FUNCTIONS 1
|
79
|
+
</pre>
|
80
|
+
<p>
|
81
|
+
Defined if the PNG functions are available.
|
82
|
+
This macro can be used to conditionally compile code using the cairo
|
83
|
+
PNG functions.
|
84
|
+
</p>
|
85
|
+
</div>
|
86
|
+
<hr>
|
87
|
+
<div class="refsect2" lang="en">
|
88
|
+
<a name="cairo-image-surface-create-from-png"></a><h3>cairo_image_surface_create_from_png ()</h3>
|
89
|
+
<pre class="programlisting"><a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* cairo_image_surface_create_from_png (const char *filename);</pre>
|
90
|
+
<p>
|
91
|
+
Creates a new image surface and initializes the contents to the
|
92
|
+
given PNG file.</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> name of PNG file to load
|
102
|
+
</td>
|
103
|
+
</tr>
|
104
|
+
<tr>
|
105
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
106
|
+
<td> a new <a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> initialized with the contents
|
107
|
+
of the PNG file, or a "nil" surface if any error occurred. A nil
|
108
|
+
surface can be checked for with cairo_surface_status(surface) which
|
109
|
+
may return one of the following values:
|
110
|
+
|
111
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>
|
112
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-FILE-NOT-FOUND:CAPS"><code class="literal">CAIRO_STATUS_FILE_NOT_FOUND</code></a>
|
113
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a>
|
114
|
+
</td>
|
115
|
+
</tr>
|
116
|
+
</tbody>
|
117
|
+
</table></div>
|
118
|
+
</div>
|
119
|
+
<hr>
|
120
|
+
<div class="refsect2" lang="en">
|
121
|
+
<a name="cairo-read-func-t"></a><h3>cairo_read_func_t ()</h3>
|
122
|
+
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (*cairo_read_func_t) (void *closure,
|
123
|
+
unsigned char *data,
|
124
|
+
unsigned int length);</pre>
|
125
|
+
<p>
|
126
|
+
<a class="link" href="cairo-png-functions.html#cairo-read-func-t" title="cairo_read_func_t ()"><span class="type">cairo_read_func_t</span></a> is the type of function which is called when a
|
127
|
+
backend needs to read data from an input stream. It is passed the
|
128
|
+
closure which was specified by the user at the time the read
|
129
|
+
function was registered, the buffer to read the data into and the
|
130
|
+
length of the data in bytes. The read function should return
|
131
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if all the data was successfully read,
|
132
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a> otherwise.</p>
|
133
|
+
<p>
|
134
|
+
|
135
|
+
</p>
|
136
|
+
<div class="variablelist"><table border="0">
|
137
|
+
<col align="left" valign="top">
|
138
|
+
<tbody>
|
139
|
+
<tr>
|
140
|
+
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
|
141
|
+
<td> the input closure
|
142
|
+
</td>
|
143
|
+
</tr>
|
144
|
+
<tr>
|
145
|
+
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
146
|
+
<td> the buffer into which to read the data
|
147
|
+
</td>
|
148
|
+
</tr>
|
149
|
+
<tr>
|
150
|
+
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
|
151
|
+
<td> the amount of data to read
|
152
|
+
</td>
|
153
|
+
</tr>
|
154
|
+
<tr>
|
155
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
156
|
+
<td> the status code of the read operation
|
157
|
+
</td>
|
158
|
+
</tr>
|
159
|
+
</tbody>
|
160
|
+
</table></div>
|
161
|
+
</div>
|
162
|
+
<hr>
|
163
|
+
<div class="refsect2" lang="en">
|
164
|
+
<a name="cairo-image-surface-create-from-png-stream"></a><h3>cairo_image_surface_create_from_png_stream ()</h3>
|
165
|
+
<pre class="programlisting"><a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* cairo_image_surface_create_from_png_stream
|
166
|
+
(<a class="link" href="cairo-png-functions.html#cairo-read-func-t" title="cairo_read_func_t ()">cairo_read_func_t</a> read_func,
|
167
|
+
void *closure);</pre>
|
168
|
+
<p>
|
169
|
+
Creates a new image surface from PNG data read incrementally
|
170
|
+
via the <em class="parameter"><code>read_func</code></em> function.</p>
|
171
|
+
<p>
|
172
|
+
|
173
|
+
</p>
|
174
|
+
<div class="variablelist"><table border="0">
|
175
|
+
<col align="left" valign="top">
|
176
|
+
<tbody>
|
177
|
+
<tr>
|
178
|
+
<td><p><span class="term"><em class="parameter"><code>read_func</code></em> :</span></p></td>
|
179
|
+
<td> function called to read the data of the file
|
180
|
+
</td>
|
181
|
+
</tr>
|
182
|
+
<tr>
|
183
|
+
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
|
184
|
+
<td> data to pass to <em class="parameter"><code>read_func</code></em>.
|
185
|
+
</td>
|
186
|
+
</tr>
|
187
|
+
<tr>
|
188
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
189
|
+
<td> a new <a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> initialized with the contents
|
190
|
+
of the PNG file or <code class="literal">NULL</code> if the data read is not a valid PNG image or
|
191
|
+
memory could not be allocated for the operation.
|
192
|
+
</td>
|
193
|
+
</tr>
|
194
|
+
</tbody>
|
195
|
+
</table></div>
|
196
|
+
</div>
|
197
|
+
<hr>
|
198
|
+
<div class="refsect2" lang="en">
|
199
|
+
<a name="cairo-surface-write-to-png"></a><h3>cairo_surface_write_to_png ()</h3>
|
200
|
+
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> cairo_surface_write_to_png (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
201
|
+
const char *filename);</pre>
|
202
|
+
<p>
|
203
|
+
Writes the contents of <em class="parameter"><code>surface</code></em> to a new file <em class="parameter"><code>filename</code></em> as a PNG
|
204
|
+
image.</p>
|
205
|
+
<p>
|
206
|
+
|
207
|
+
</p>
|
208
|
+
<div class="variablelist"><table border="0">
|
209
|
+
<col align="left" valign="top">
|
210
|
+
<tbody>
|
211
|
+
<tr>
|
212
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
213
|
+
<td> a <a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> with pixel contents
|
214
|
+
</td>
|
215
|
+
</tr>
|
216
|
+
<tr>
|
217
|
+
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
218
|
+
<td> the name of a file to write to
|
219
|
+
</td>
|
220
|
+
</tr>
|
221
|
+
<tr>
|
222
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
223
|
+
<td> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if the PNG file was written
|
224
|
+
successfully. Otherwise, <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if memory could not
|
225
|
+
be allocated for the operation or
|
226
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_SURFACE_TYPE_MISMATCH</code></a> if the surface does not have
|
227
|
+
pixel contents, or <a class="link" href="cairo-error-status.html#CAIRO-STATUS-WRITE-ERROR:CAPS"><code class="literal">CAIRO_STATUS_WRITE_ERROR</code></a> if an I/O error occurs
|
228
|
+
while attempting to write the file.
|
229
|
+
</td>
|
230
|
+
</tr>
|
231
|
+
</tbody>
|
232
|
+
</table></div>
|
233
|
+
</div>
|
234
|
+
<hr>
|
235
|
+
<div class="refsect2" lang="en">
|
236
|
+
<a name="cairo-write-func-t"></a><h3>cairo_write_func_t ()</h3>
|
237
|
+
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (*cairo_write_func_t) (void *closure,
|
238
|
+
unsigned char *data,
|
239
|
+
unsigned int length);</pre>
|
240
|
+
<p>
|
241
|
+
<a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> is the type of function which is called when a
|
242
|
+
backend needs to write data to an output stream. It is passed the
|
243
|
+
closure which was specified by the user at the time the write
|
244
|
+
function was registered, the data to write and the length of the
|
245
|
+
data in bytes. The write function should return
|
246
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if all the data was successfully written,
|
247
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-WRITE-ERROR:CAPS"><code class="literal">CAIRO_STATUS_WRITE_ERROR</code></a> otherwise.</p>
|
248
|
+
<p>
|
249
|
+
|
250
|
+
</p>
|
251
|
+
<div class="variablelist"><table border="0">
|
252
|
+
<col align="left" valign="top">
|
253
|
+
<tbody>
|
254
|
+
<tr>
|
255
|
+
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
|
256
|
+
<td> the output closure
|
257
|
+
</td>
|
258
|
+
</tr>
|
259
|
+
<tr>
|
260
|
+
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
261
|
+
<td> the buffer containing the data to write
|
262
|
+
</td>
|
263
|
+
</tr>
|
264
|
+
<tr>
|
265
|
+
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
|
266
|
+
<td> the amount of data to write
|
267
|
+
</td>
|
268
|
+
</tr>
|
269
|
+
<tr>
|
270
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
271
|
+
<td> the status code of the write operation
|
272
|
+
</td>
|
273
|
+
</tr>
|
274
|
+
</tbody>
|
275
|
+
</table></div>
|
276
|
+
</div>
|
277
|
+
<hr>
|
278
|
+
<div class="refsect2" lang="en">
|
279
|
+
<a name="cairo-surface-write-to-png-stream"></a><h3>cairo_surface_write_to_png_stream ()</h3>
|
280
|
+
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> cairo_surface_write_to_png_stream (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
281
|
+
<a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()">cairo_write_func_t</a> write_func,
|
282
|
+
void *closure);</pre>
|
283
|
+
<p>
|
284
|
+
Writes the image surface to the write function.</p>
|
285
|
+
<p>
|
286
|
+
|
287
|
+
</p>
|
288
|
+
<div class="variablelist"><table border="0">
|
289
|
+
<col align="left" valign="top">
|
290
|
+
<tbody>
|
291
|
+
<tr>
|
292
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
293
|
+
<td> a <a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> with pixel contents
|
294
|
+
</td>
|
295
|
+
</tr>
|
296
|
+
<tr>
|
297
|
+
<td><p><span class="term"><em class="parameter"><code>write_func</code></em> :</span></p></td>
|
298
|
+
<td> a <a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a>
|
299
|
+
</td>
|
300
|
+
</tr>
|
301
|
+
<tr>
|
302
|
+
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
|
303
|
+
<td> closure data for the write function
|
304
|
+
</td>
|
305
|
+
</tr>
|
306
|
+
<tr>
|
307
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
308
|
+
<td> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if the PNG file was written
|
309
|
+
successfully. Otherwise, <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> is returned if
|
310
|
+
memory could not be allocated for the operation,
|
311
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_SURFACE_TYPE_MISMATCH</code></a> if the surface does not have
|
312
|
+
pixel contents.
|
313
|
+
</td>
|
314
|
+
</tr>
|
315
|
+
</tbody>
|
316
|
+
</table></div>
|
317
|
+
</div>
|
318
|
+
</div>
|
319
|
+
<div class="refsect1" lang="en">
|
320
|
+
<a name="cairo-png-functions.see-also"></a><h2>See Also</h2>
|
321
|
+
<p>
|
322
|
+
</p>
|
323
|
+
<div class="itemizedlist"><ul type="disc"><li><a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></li></ul></div>
|
324
|
+
<p>
|
325
|
+
</p>
|
326
|
+
</div>
|
327
|
+
</div>
|
328
|
+
<div class="footer">
|
329
|
+
<hr>
|
330
|
+
Generated by GTK-Doc V1.10</div>
|
331
|
+
</body>
|
332
|
+
</html>
|