cairo 1.14.1-x64-mingw32 → 1.14.2-x64-mingw32
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.
- checksums.yaml +4 -4
- data/NEWS +21 -0
- data/Rakefile +17 -6
- data/ext/cairo/cairo.def +1 -0
- data/ext/cairo/extconf.rb +23 -10
- data/ext/cairo/rb_cairo.c +3 -0
- data/ext/cairo/rb_cairo.h +3 -3
- data/ext/cairo/rb_cairo_context.c +1 -1
- data/ext/cairo/rb_cairo_io.c +4 -0
- data/ext/cairo/rb_cairo_io.h +2 -0
- data/ext/cairo/rb_cairo_pattern.c +4 -4
- data/ext/cairo/rb_cairo_private.h +2 -0
- data/ext/cairo/rb_cairo_surface.c +64 -232
- data/lib/2.0/cairo.so +0 -0
- data/lib/2.1/cairo.so +0 -0
- data/lib/2.2/cairo.so +0 -0
- data/lib/cairo.rb +20 -19
- data/lib/cairo/region.rb +14 -0
- data/test/test_region.rb +26 -0
- data/vendor/local/bin/fc-cache.exe +0 -0
- data/vendor/local/bin/fc-cat.exe +0 -0
- data/vendor/local/bin/fc-list.exe +0 -0
- data/vendor/local/bin/fc-match.exe +0 -0
- data/vendor/local/bin/fc-pattern.exe +0 -0
- data/vendor/local/bin/fc-query.exe +0 -0
- data/vendor/local/bin/fc-scan.exe +0 -0
- data/vendor/local/bin/fc-validate.exe +0 -0
- data/vendor/local/bin/freetype-config +2 -2
- data/vendor/local/bin/libcairo-2.dll +0 -0
- data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
- data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
- data/vendor/local/bin/libfontconfig-1.dll +0 -0
- data/vendor/local/bin/libfreetype-6.dll +0 -0
- data/vendor/local/bin/libgcc_s_seh-1.dll +0 -0
- data/vendor/local/bin/libpixman-1-0.dll +0 -0
- data/vendor/local/bin/libpng-config +1 -1
- data/vendor/local/bin/libpng16-16.dll +0 -0
- data/vendor/local/bin/libpng16-config +1 -1
- data/vendor/local/bin/libstdc++-6.dll +0 -0
- data/vendor/local/bin/libwinpthread-1.dll +0 -0
- data/vendor/local/bin/libxml2-2.dll +0 -0
- data/vendor/local/bin/png-fix-itxt.exe +0 -0
- data/vendor/local/bin/pngfix.exe +0 -0
- data/vendor/local/bin/xmlcatalog.exe +0 -0
- data/vendor/local/bin/xmllint.exe +0 -0
- data/vendor/local/bin/zlib1.dll +0 -0
- data/vendor/local/include/cairo/cairo-version.h +1 -1
- data/vendor/local/include/freetype2/config/ftconfig.h +19 -2
- data/vendor/local/include/freetype2/config/ftheader.h +7 -5
- data/vendor/local/include/freetype2/config/ftoption.h +9 -22
- data/vendor/local/include/freetype2/config/ftstdlib.h +2 -3
- data/vendor/local/include/freetype2/freetype.h +38 -17
- data/vendor/local/include/freetype2/ft2build.h +1 -1
- data/vendor/local/include/freetype2/ftadvanc.h +2 -2
- data/vendor/local/include/freetype2/ftautoh.h +50 -2
- data/vendor/local/include/freetype2/ftbbox.h +1 -1
- data/vendor/local/include/freetype2/ftbdf.h +1 -1
- data/vendor/local/include/freetype2/ftbitmap.h +11 -3
- data/vendor/local/include/freetype2/ftbzip2.h +1 -1
- data/vendor/local/include/freetype2/ftcache.h +3 -3
- data/vendor/local/include/freetype2/ftcffdrv.h +1 -1
- data/vendor/local/include/freetype2/ftcid.h +2 -1
- data/vendor/local/include/freetype2/fterrdef.h +1 -1
- data/vendor/local/include/freetype2/fterrors.h +1 -1
- data/vendor/local/include/freetype2/{ftxf86.h → ftfntfmt.h} +22 -14
- data/vendor/local/include/freetype2/ftgasp.h +1 -1
- data/vendor/local/include/freetype2/ftglyph.h +1 -1
- data/vendor/local/include/freetype2/ftgxval.h +1 -1
- data/vendor/local/include/freetype2/ftgzip.h +1 -1
- data/vendor/local/include/freetype2/ftimage.h +7 -13
- data/vendor/local/include/freetype2/ftincrem.h +1 -1
- data/vendor/local/include/freetype2/ftlcdfil.h +2 -2
- data/vendor/local/include/freetype2/ftlist.h +1 -1
- data/vendor/local/include/freetype2/ftlzw.h +1 -1
- data/vendor/local/include/freetype2/ftmac.h +1 -1
- data/vendor/local/include/freetype2/ftmm.h +17 -11
- data/vendor/local/include/freetype2/ftmodapi.h +4 -2
- data/vendor/local/include/freetype2/ftmoderr.h +1 -1
- data/vendor/local/include/freetype2/ftotval.h +1 -1
- data/vendor/local/include/freetype2/ftoutln.h +1 -1
- data/vendor/local/include/freetype2/ftpfr.h +1 -1
- data/vendor/local/include/freetype2/ftrender.h +3 -8
- data/vendor/local/include/freetype2/ftsizes.h +1 -1
- data/vendor/local/include/freetype2/ftsnames.h +1 -1
- data/vendor/local/include/freetype2/ftstroke.h +1 -1
- data/vendor/local/include/freetype2/ftsynth.h +5 -3
- data/vendor/local/include/freetype2/ftsystem.h +10 -1
- data/vendor/local/include/freetype2/fttrigon.h +1 -1
- data/vendor/local/include/freetype2/ftttdrv.h +85 -22
- data/vendor/local/include/freetype2/fttypes.h +1 -1
- data/vendor/local/include/freetype2/ftwinfnt.h +3 -3
- data/vendor/local/include/freetype2/t1tables.h +4 -3
- data/vendor/local/include/freetype2/ttnameid.h +116 -116
- data/vendor/local/include/freetype2/tttables.h +2 -2
- data/vendor/local/include/freetype2/tttags.h +1 -1
- data/vendor/local/include/freetype2/ttunpat.h +1 -1
- data/vendor/local/include/libpng16/png.h +63 -80
- data/vendor/local/include/libpng16/pngconf.h +8 -30
- data/vendor/local/include/libpng16/pnglibconf.h +10 -4
- data/vendor/local/include/png.h +63 -80
- data/vendor/local/include/pngconf.h +8 -30
- data/vendor/local/include/pnglibconf.h +10 -4
- data/vendor/local/lib/libcairo-gobject.a +0 -0
- data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
- data/vendor/local/lib/libcairo-gobject.la +2 -2
- data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
- data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
- data/vendor/local/lib/libcairo-script-interpreter.la +2 -2
- data/vendor/local/lib/libcairo.a +0 -0
- data/vendor/local/lib/libcairo.dll.a +0 -0
- data/vendor/local/lib/libcairo.la +2 -2
- data/vendor/local/lib/libfontconfig.dll.a +0 -0
- data/vendor/local/lib/libfreetype.a +0 -0
- data/vendor/local/lib/libfreetype.dll.a +0 -0
- data/vendor/local/lib/libfreetype.la +4 -4
- data/vendor/local/lib/libpixman-1.a +0 -0
- data/vendor/local/lib/libpixman-1.dll.a +0 -0
- data/vendor/local/lib/libpng.a +0 -0
- data/vendor/local/lib/libpng.dll.a +0 -0
- data/vendor/local/lib/libpng.la +4 -4
- data/vendor/local/lib/libpng16.a +0 -0
- data/vendor/local/lib/libpng16.dll.a +0 -0
- data/vendor/local/lib/libpng16.la +4 -4
- data/vendor/local/lib/libxml2.a +0 -0
- data/vendor/local/lib/libxml2.dll.a +0 -0
- data/vendor/local/lib/libz.a +0 -0
- data/vendor/local/lib/libz.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/cairo-fc.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-ft.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-gobject.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-pdf.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-png.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-ps.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-script.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-svg.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-win32.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo.pc +1 -1
- data/vendor/local/lib/pkgconfig/freetype2.pc +1 -1
- data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
- data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
- data/vendor/local/share/aclocal/freetype2.m4 +1 -1
- data/vendor/local/share/gtk-doc/html/cairo/bindings-errors.html +12 -12
- data/vendor/local/share/gtk-doc/html/cairo/bindings-fonts.html +12 -12
- data/vendor/local/share/gtk-doc/html/cairo/bindings-memory.html +12 -12
- data/vendor/local/share/gtk-doc/html/cairo/bindings-overloading.html +13 -13
- data/vendor/local/share/gtk-doc/html/cairo/bindings-path.html +12 -12
- data/vendor/local/share/gtk-doc/html/cairo/bindings-patterns.html +35 -35
- data/vendor/local/share/gtk-doc/html/cairo/bindings-return-values.html +10 -10
- data/vendor/local/share/gtk-doc/html/cairo/bindings-streams.html +11 -11
- data/vendor/local/share/gtk-doc/html/cairo/bindings-surfaces.html +13 -13
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Error-handling.html +294 -225
- data/vendor/local/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +387 -269
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +432 -302
- data/vendor/local/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +325 -217
- data/vendor/local/share/gtk-doc/html/cairo/cairo-PNG-Support.html +298 -193
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Paths.html +1121 -812
- data/vendor/local/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +513 -383
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Quartz-(CGFont)-Fonts.html +126 -83
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Quartz-Surfaces.html +172 -119
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Raster-Sources.html +581 -372
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Recording-Surfaces.html +179 -130
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Regions.html +888 -539
- data/vendor/local/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +287 -192
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Script-Surfaces.html +374 -231
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Transformations.html +395 -219
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Types.html +125 -75
- data/vendor/local/share/gtk-doc/html/cairo/cairo-User-Fonts.html +630 -464
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Version-Information.html +225 -200
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +336 -214
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +277 -186
- data/vendor/local/share/gtk-doc/html/cairo/cairo-XCB-Surfaces.html +495 -350
- data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +557 -362
- data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-XRender-Backend.html +158 -111
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-device-t.html +655 -441
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +389 -280
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-options-t.html +667 -451
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-matrix-t.html +579 -351
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html +2006 -1545
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html +892 -618
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +1624 -1188
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-t.html +2903 -2104
- data/vendor/local/share/gtk-doc/html/cairo/cairo-drawing.html +13 -13
- data/vendor/local/share/gtk-doc/html/cairo/cairo-fonts.html +13 -13
- data/vendor/local/share/gtk-doc/html/cairo/cairo-support.html +13 -13
- data/vendor/local/share/gtk-doc/html/cairo/cairo-surfaces.html +13 -13
- data/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +1115 -758
- data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp2 +419 -604
- data/vendor/local/share/gtk-doc/html/cairo/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/cairo/index-1.10.html +56 -56
- data/vendor/local/share/gtk-doc/html/cairo/index-1.12.html +70 -70
- data/vendor/local/share/gtk-doc/html/cairo/index-1.2.html +58 -58
- data/vendor/local/share/gtk-doc/html/cairo/index-1.4.html +39 -39
- data/vendor/local/share/gtk-doc/html/cairo/index-1.6.html +30 -30
- data/vendor/local/share/gtk-doc/html/cairo/index-1.8.html +38 -38
- data/vendor/local/share/gtk-doc/html/cairo/index-all.html +426 -426
- data/vendor/local/share/gtk-doc/html/cairo/index.html +6 -6
- data/vendor/local/share/gtk-doc/html/cairo/index.sgml +234 -325
- data/vendor/local/share/gtk-doc/html/cairo/language-bindings.html +12 -12
- data/vendor/local/share/gtk-doc/html/cairo/left-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/cairo/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/cairo/right-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/cairo/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/cairo/style.css +221 -26
- data/vendor/local/share/gtk-doc/html/cairo/up-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/cairo/up.png +0 -0
- data/vendor/local/share/license/cairo/README +1 -1
- data/vendor/local/share/license/freetype/README +6 -6
- data/vendor/local/share/license/freetype/README.git +1 -1
- data/vendor/local/share/license/libpng/README +2 -2
- data/vendor/local/share/man/man1/freetype-config.1 +1 -1
- data/vendor/local/share/man/man3/libpng.3 +85 -92
- data/vendor/local/share/man/man3/libpngpf.3 +2 -2
- data/vendor/local/share/man/man5/png.5 +1 -1
- metadata +23 -19
@@ -2,30 +2,27 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
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.
|
5
|
+
<title>Cairo: A Vector Graphics Library: PNG Support</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
7
7
|
<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
8
|
<link rel="up" href="cairo-surfaces.html" title="Surfaces">
|
9
9
|
<link rel="prev" href="cairo-PDF-Surfaces.html" title="PDF Surfaces">
|
10
10
|
<link rel="next" href="cairo-PostScript-Surfaces.html" title="PostScript Surfaces">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.
|
11
|
+
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
|
12
12
|
<link rel="stylesheet" href="style.css" type="text/css">
|
13
13
|
</head>
|
14
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="
|
16
|
-
<
|
17
|
-
<
|
18
|
-
<
|
19
|
-
<
|
20
|
-
|
21
|
-
<td><a accesskey="
|
22
|
-
|
23
|
-
<
|
24
|
-
<a href="
|
25
|
-
|
26
|
-
<a href="#cairo-PNG-Support.description" class="shortcut">Description</a>
|
27
|
-
</td></tr>
|
28
|
-
</table>
|
15
|
+
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><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-PNG-Support.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
|
19
|
+
<a href="#cairo-PNG-Support.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
|
20
|
+
</td>
|
21
|
+
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
22
|
+
<td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
23
|
+
<td><a accesskey="p" href="cairo-PDF-Surfaces.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
24
|
+
<td><a accesskey="n" href="cairo-PostScript-Surfaces.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
25
|
+
</tr></table>
|
29
26
|
<div class="refentry">
|
30
27
|
<a name="cairo-PNG-Support"></a><div class="titlepage"></div>
|
31
28
|
<div class="refnamediv"><table width="100%"><tr>
|
@@ -33,283 +30,391 @@
|
|
33
30
|
<h2><span class="refentrytitle"><a name="cairo-PNG-Support.top_of_page"></a>PNG Support</span></h2>
|
34
31
|
<p>PNG Support — Reading and writing PNG images</p>
|
35
32
|
</td>
|
36
|
-
<td valign="top" align="right"></td>
|
33
|
+
<td class="gallery_image" valign="top" align="right"></td>
|
37
34
|
</tr></table></div>
|
38
|
-
<div class="
|
39
|
-
<a name="cairo-PNG-Support.
|
40
|
-
<
|
41
|
-
<
|
42
|
-
<
|
43
|
-
|
44
|
-
|
45
|
-
<
|
46
|
-
|
47
|
-
|
48
|
-
<a class="link" href="cairo-
|
49
|
-
|
50
|
-
<
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
35
|
+
<div class="refsect1">
|
36
|
+
<a name="cairo-PNG-Support.functions"></a><h2>Functions</h2>
|
37
|
+
<div class="informaltable"><table width="100%" border="0">
|
38
|
+
<colgroup>
|
39
|
+
<col width="150px" class="functions_return">
|
40
|
+
<col class="functions_name">
|
41
|
+
</colgroup>
|
42
|
+
<tbody>
|
43
|
+
<tr>
|
44
|
+
<td class="function_type">
|
45
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
|
46
|
+
</td>
|
47
|
+
<td class="function_name">
|
48
|
+
<a class="link" href="cairo-PNG-Support.html#cairo-image-surface-create-from-png" title="cairo_image_surface_create_from_png ()">cairo_image_surface_create_from_png</a> <span class="c_punctuation">()</span>
|
49
|
+
</td>
|
50
|
+
</tr>
|
51
|
+
<tr>
|
52
|
+
<td class="function_type">
|
53
|
+
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
54
|
+
</td>
|
55
|
+
<td class="function_name">
|
56
|
+
<span class="c_punctuation">(</span><a class="link" href="cairo-PNG-Support.html#cairo-read-func-t" title="cairo_read_func_t ()">*cairo_read_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
|
57
|
+
</td>
|
58
|
+
</tr>
|
59
|
+
<tr>
|
60
|
+
<td class="function_type">
|
61
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
|
62
|
+
</td>
|
63
|
+
<td class="function_name">
|
64
|
+
<a class="link" href="cairo-PNG-Support.html#cairo-image-surface-create-from-png-stream" title="cairo_image_surface_create_from_png_stream ()">cairo_image_surface_create_from_png_stream</a> <span class="c_punctuation">()</span>
|
65
|
+
</td>
|
66
|
+
</tr>
|
67
|
+
<tr>
|
68
|
+
<td class="function_type">
|
69
|
+
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
70
|
+
</td>
|
71
|
+
<td class="function_name">
|
72
|
+
<a class="link" href="cairo-PNG-Support.html#cairo-surface-write-to-png" title="cairo_surface_write_to_png ()">cairo_surface_write_to_png</a> <span class="c_punctuation">()</span>
|
73
|
+
</td>
|
74
|
+
</tr>
|
75
|
+
<tr>
|
76
|
+
<td class="function_type">
|
77
|
+
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
78
|
+
</td>
|
79
|
+
<td class="function_name">
|
80
|
+
<span class="c_punctuation">(</span><a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()">*cairo_write_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
|
81
|
+
</td>
|
82
|
+
</tr>
|
83
|
+
<tr>
|
84
|
+
<td class="function_type">
|
85
|
+
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
86
|
+
</td>
|
87
|
+
<td class="function_name">
|
88
|
+
<a class="link" href="cairo-PNG-Support.html#cairo-surface-write-to-png-stream" title="cairo_surface_write_to_png_stream ()">cairo_surface_write_to_png_stream</a> <span class="c_punctuation">()</span>
|
89
|
+
</td>
|
90
|
+
</tr>
|
91
|
+
</tbody>
|
92
|
+
</table></div>
|
93
|
+
</div>
|
94
|
+
<div class="refsect1">
|
95
|
+
<a name="cairo-PNG-Support.other"></a><h2>Types and Values</h2>
|
96
|
+
<div class="informaltable"><table width="100%" border="0">
|
97
|
+
<colgroup>
|
98
|
+
<col width="150px" class="name">
|
99
|
+
<col class="description">
|
100
|
+
</colgroup>
|
101
|
+
<tbody><tr>
|
102
|
+
<td class="define_keyword">#define</td>
|
103
|
+
<td class="function_name"><a class="link" href="cairo-PNG-Support.html#CAIRO-HAS-PNG-FUNCTIONS:CAPS" title="CAIRO_HAS_PNG_FUNCTIONS">CAIRO_HAS_PNG_FUNCTIONS</a></td>
|
104
|
+
</tr></tbody>
|
105
|
+
</table></div>
|
106
|
+
</div>
|
107
|
+
<div class="refsect1">
|
108
|
+
<a name="cairo-PNG-Support.object-hierarchy"></a><h2>Object Hierarchy</h2>
|
109
|
+
<pre class="screen">
|
56
110
|
</pre>
|
57
111
|
</div>
|
58
112
|
<div class="refsect1">
|
59
113
|
<a name="cairo-PNG-Support.description"></a><h2>Description</h2>
|
60
|
-
<p>
|
61
|
-
|
62
|
-
|
63
|
-
</p>
|
64
|
-
<p>
|
65
|
-
It is a toy API. It only offers very simple support for reading and
|
114
|
+
<p>The PNG functions allow reading PNG images into image surfaces, and writing
|
115
|
+
any surface to a PNG file.</p>
|
116
|
+
<p>It is a toy API. It only offers very simple support for reading and
|
66
117
|
writing PNG files, which is sufficient for testing and
|
67
118
|
demonstration purposes. Applications which need more control over
|
68
119
|
the generated PNG file should access the pixel data directly, using
|
69
|
-
<a class="link" href="cairo-Image-Surfaces.html#cairo-image-surface-get-data" title="cairo_image_surface_get_data
|
120
|
+
<a class="link" href="cairo-Image-Surfaces.html#cairo-image-surface-get-data" title="cairo_image_surface_get_data ()"><code class="function">cairo_image_surface_get_data()</code></a> or a backend-specific access
|
70
121
|
function, and process it with another library, e.g. gdk-pixbuf or
|
71
|
-
libpng
|
72
|
-
</p>
|
122
|
+
libpng.</p>
|
73
123
|
</div>
|
74
124
|
<div class="refsect1">
|
75
|
-
<a name="cairo-PNG-Support.
|
125
|
+
<a name="cairo-PNG-Support.functions_details"></a><h2>Functions</h2>
|
76
126
|
<div class="refsect2">
|
77
|
-
<a name="
|
78
|
-
<pre class="programlisting"
|
79
|
-
</pre>
|
80
|
-
<p>
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<
|
127
|
+
<a name="cairo-image-surface-create-from-png"></a><h3>cairo_image_surface_create_from_png ()</h3>
|
128
|
+
<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> *
|
129
|
+
cairo_image_surface_create_from_png (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
|
130
|
+
<p>Creates a new image surface and initializes the contents to the
|
131
|
+
given PNG file.</p>
|
132
|
+
<div class="refsect3">
|
133
|
+
<a name="id-1.5.6.7.2.5"></a><h4>Parameters</h4>
|
134
|
+
<div class="informaltable"><table width="100%" border="0">
|
135
|
+
<colgroup>
|
136
|
+
<col width="150px" class="parameters_name">
|
137
|
+
<col class="parameters_description">
|
138
|
+
<col width="200px" class="parameters_annotations">
|
139
|
+
</colgroup>
|
140
|
+
<tbody><tr>
|
141
|
+
<td class="parameter_name"><p>filename</p></td>
|
142
|
+
<td class="parameter_description"><p>name of PNG file to load</p></td>
|
143
|
+
<td class="parameter_annotations"> </td>
|
144
|
+
</tr></tbody>
|
145
|
+
</table></div>
|
86
146
|
</div>
|
87
|
-
<
|
88
|
-
<
|
89
|
-
<a
|
90
|
-
<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> * cairo_image_surface_create_from_png (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
|
91
|
-
<p>
|
92
|
-
Creates a new image surface and initializes the contents to the
|
93
|
-
given PNG file.
|
94
|
-
</p>
|
95
|
-
<div class="variablelist"><table border="0">
|
96
|
-
<col align="left" valign="top">
|
97
|
-
<tbody>
|
98
|
-
<tr>
|
99
|
-
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
100
|
-
<td>name of PNG file to load</td>
|
101
|
-
</tr>
|
102
|
-
<tr>
|
103
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
104
|
-
<td>a new <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> initialized with the contents
|
147
|
+
<div class="refsect3">
|
148
|
+
<a name="id-1.5.6.7.2.6"></a><h4>Returns</h4>
|
149
|
+
<p> a new <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> initialized with the contents
|
105
150
|
of the PNG file, or a "nil" surface if any error occurred. A nil
|
106
151
|
surface can be checked for with cairo_surface_status(surface) which
|
107
|
-
may return one of the following values
|
108
|
-
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>
|
152
|
+
may return one of the following values:</p>
|
153
|
+
<p><a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>
|
109
154
|
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-FILE-NOT-FOUND:CAPS"><code class="literal">CAIRO_STATUS_FILE_NOT_FOUND</code></a>
|
110
|
-
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a>
|
111
|
-
Alternatively, you can allow errors to propagate through the drawing
|
155
|
+
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a></p>
|
156
|
+
<p>Alternatively, you can allow errors to propagate through the drawing
|
112
157
|
operations and check the status on the context upon completion
|
113
|
-
using <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status
|
114
|
-
|
115
|
-
</
|
116
|
-
</table></div>
|
158
|
+
using <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a>.</p>
|
159
|
+
<p></p>
|
160
|
+
</div>
|
117
161
|
<p class="since">Since 1.0</p>
|
118
162
|
</div>
|
119
163
|
<hr>
|
120
164
|
<div class="refsect2">
|
121
|
-
<a name="cairo-read-func-t"></a><h3>cairo_read_func_t
|
122
|
-
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
123
|
-
|
124
|
-
|
125
|
-
<
|
126
|
-
<a class="link" href="cairo-PNG-Support.html#cairo-read-func-t" title="cairo_read_func_t
|
165
|
+
<a name="cairo-read-func-t"></a><h3>cairo_read_func_t ()</h3>
|
166
|
+
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
167
|
+
<span class="c_punctuation">(</span>*cairo_read_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *closure</code></em>,
|
168
|
+
<em class="parameter"><code>unsigned <span class="type">char</span> *data</code></em>,
|
169
|
+
<em class="parameter"><code>unsigned <span class="type">int</span> length</code></em>);</pre>
|
170
|
+
<p><a class="link" href="cairo-PNG-Support.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
171
|
backend needs to read data from an input stream. It is passed the
|
128
172
|
closure which was specified by the user at the time the read
|
129
173
|
function was registered, the buffer to read the data into and the
|
130
174
|
length of the data in bytes. The read function should return
|
131
175
|
<a class="link" href="cairo-Error-handling.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-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a> otherwise
|
133
|
-
|
134
|
-
<
|
135
|
-
<
|
176
|
+
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a> otherwise.</p>
|
177
|
+
<div class="refsect3">
|
178
|
+
<a name="id-1.5.6.7.3.5"></a><h4>Parameters</h4>
|
179
|
+
<div class="informaltable"><table width="100%" border="0">
|
180
|
+
<colgroup>
|
181
|
+
<col width="150px" class="parameters_name">
|
182
|
+
<col class="parameters_description">
|
183
|
+
<col width="200px" class="parameters_annotations">
|
184
|
+
</colgroup>
|
136
185
|
<tbody>
|
137
186
|
<tr>
|
138
|
-
<td
|
139
|
-
<td>the input closure</td>
|
140
|
-
</
|
141
|
-
<tr>
|
142
|
-
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
143
|
-
<td>the buffer into which to read the data</td>
|
187
|
+
<td class="parameter_name"><p>closure</p></td>
|
188
|
+
<td class="parameter_description"><p>the input closure</p></td>
|
189
|
+
<td class="parameter_annotations"> </td>
|
144
190
|
</tr>
|
145
191
|
<tr>
|
146
|
-
<td
|
147
|
-
<td>the
|
192
|
+
<td class="parameter_name"><p>data</p></td>
|
193
|
+
<td class="parameter_description"><p>the buffer into which to read the data</p></td>
|
194
|
+
<td class="parameter_annotations"> </td>
|
148
195
|
</tr>
|
149
196
|
<tr>
|
150
|
-
<td
|
151
|
-
<td>the
|
197
|
+
<td class="parameter_name"><p>length</p></td>
|
198
|
+
<td class="parameter_description"><p>the amount of data to read</p></td>
|
199
|
+
<td class="parameter_annotations"> </td>
|
152
200
|
</tr>
|
153
201
|
</tbody>
|
154
202
|
</table></div>
|
203
|
+
</div>
|
204
|
+
<div class="refsect3">
|
205
|
+
<a name="id-1.5.6.7.3.6"></a><h4>Returns</h4>
|
206
|
+
<p> the status code of the read operation</p>
|
207
|
+
<p></p>
|
208
|
+
</div>
|
155
209
|
<p class="since">Since 1.0</p>
|
156
210
|
</div>
|
157
211
|
<hr>
|
158
212
|
<div class="refsect2">
|
159
|
-
<a name="cairo-image-surface-create-from-png-stream"></a><h3>cairo_image_surface_create_from_png_stream
|
160
|
-
<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>
|
161
|
-
|
162
|
-
|
163
|
-
<
|
164
|
-
Creates a new image surface from PNG data read incrementally
|
165
|
-
via the <em class="parameter"><code>read_func</code></em>
|
166
|
-
|
167
|
-
<div class="
|
168
|
-
<
|
213
|
+
<a name="cairo-image-surface-create-from-png-stream"></a><h3>cairo_image_surface_create_from_png_stream ()</h3>
|
214
|
+
<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> *
|
215
|
+
cairo_image_surface_create_from_png_stream
|
216
|
+
(<em class="parameter"><code><a class="link" href="cairo-PNG-Support.html#cairo-read-func-t" title="cairo_read_func_t ()"><span class="type">cairo_read_func_t</span></a> read_func</code></em>,
|
217
|
+
<em class="parameter"><code><span class="type">void</span> *closure</code></em>);</pre>
|
218
|
+
<p>Creates a new image surface from PNG data read incrementally
|
219
|
+
via the <em class="parameter"><code>read_func</code></em>
|
220
|
+
function.</p>
|
221
|
+
<div class="refsect3">
|
222
|
+
<a name="id-1.5.6.7.4.5"></a><h4>Parameters</h4>
|
223
|
+
<div class="informaltable"><table width="100%" border="0">
|
224
|
+
<colgroup>
|
225
|
+
<col width="150px" class="parameters_name">
|
226
|
+
<col class="parameters_description">
|
227
|
+
<col width="200px" class="parameters_annotations">
|
228
|
+
</colgroup>
|
169
229
|
<tbody>
|
170
230
|
<tr>
|
171
|
-
<td
|
172
|
-
<td>function called to read the data of the file</td>
|
231
|
+
<td class="parameter_name"><p>read_func</p></td>
|
232
|
+
<td class="parameter_description"><p>function called to read the data of the file</p></td>
|
233
|
+
<td class="parameter_annotations"> </td>
|
173
234
|
</tr>
|
174
235
|
<tr>
|
175
|
-
<td
|
176
|
-
<td>data to pass to <em class="parameter"><code>read_func</code></em
|
236
|
+
<td class="parameter_name"><p>closure</p></td>
|
237
|
+
<td class="parameter_description"><p>data to pass to <em class="parameter"><code>read_func</code></em>
|
238
|
+
.</p></td>
|
239
|
+
<td class="parameter_annotations"> </td>
|
177
240
|
</tr>
|
178
|
-
|
179
|
-
|
180
|
-
|
241
|
+
</tbody>
|
242
|
+
</table></div>
|
243
|
+
</div>
|
244
|
+
<div class="refsect3">
|
245
|
+
<a name="id-1.5.6.7.4.6"></a><h4>Returns</h4>
|
246
|
+
<p> a new <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> initialized with the contents
|
181
247
|
of the PNG file or a "nil" surface if the data read is not a valid PNG image
|
182
248
|
or memory could not be allocated for the operation. A nil
|
183
249
|
surface can be checked for with cairo_surface_status(surface) which
|
184
|
-
may return one of the following values
|
185
|
-
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>
|
186
|
-
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a>
|
187
|
-
Alternatively, you can allow errors to propagate through the drawing
|
250
|
+
may return one of the following values:</p>
|
251
|
+
<p><a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>
|
252
|
+
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a></p>
|
253
|
+
<p>Alternatively, you can allow errors to propagate through the drawing
|
188
254
|
operations and check the status on the context upon completion
|
189
|
-
using <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status
|
190
|
-
|
191
|
-
</
|
192
|
-
</table></div>
|
255
|
+
using <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a>.</p>
|
256
|
+
<p></p>
|
257
|
+
</div>
|
193
258
|
<p class="since">Since 1.0</p>
|
194
259
|
</div>
|
195
260
|
<hr>
|
196
261
|
<div class="refsect2">
|
197
|
-
<a name="cairo-surface-write-to-png"></a><h3>cairo_surface_write_to_png
|
198
|
-
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
199
|
-
|
200
|
-
<
|
201
|
-
Writes the contents of <em class="parameter"><code>surface</code></em>
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
<
|
262
|
+
<a name="cairo-surface-write-to-png"></a><h3>cairo_surface_write_to_png ()</h3>
|
263
|
+
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
264
|
+
cairo_surface_write_to_png (<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>,
|
265
|
+
<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
|
266
|
+
<p>Writes the contents of <em class="parameter"><code>surface</code></em>
|
267
|
+
to a new file <em class="parameter"><code>filename</code></em>
|
268
|
+
as a PNG
|
269
|
+
image.</p>
|
270
|
+
<div class="refsect3">
|
271
|
+
<a name="id-1.5.6.7.5.5"></a><h4>Parameters</h4>
|
272
|
+
<div class="informaltable"><table width="100%" border="0">
|
273
|
+
<colgroup>
|
274
|
+
<col width="150px" class="parameters_name">
|
275
|
+
<col class="parameters_description">
|
276
|
+
<col width="200px" class="parameters_annotations">
|
277
|
+
</colgroup>
|
206
278
|
<tbody>
|
207
279
|
<tr>
|
208
|
-
<td
|
209
|
-
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> with pixel contents</td>
|
280
|
+
<td class="parameter_name"><p>surface</p></td>
|
281
|
+
<td class="parameter_description"><p>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> with pixel contents</p></td>
|
282
|
+
<td class="parameter_annotations"> </td>
|
210
283
|
</tr>
|
211
284
|
<tr>
|
212
|
-
<td
|
213
|
-
<td>the name of a file to write to</td>
|
285
|
+
<td class="parameter_name"><p>filename</p></td>
|
286
|
+
<td class="parameter_description"><p>the name of a file to write to</p></td>
|
287
|
+
<td class="parameter_annotations"> </td>
|
214
288
|
</tr>
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
<
|
289
|
+
</tbody>
|
290
|
+
</table></div>
|
291
|
+
</div>
|
292
|
+
<div class="refsect3">
|
293
|
+
<a name="id-1.5.6.7.5.6"></a><h4>Returns</h4>
|
294
|
+
<p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if the PNG file was written
|
219
295
|
successfully. Otherwise, <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if memory could not
|
220
296
|
be allocated for the operation or
|
221
297
|
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_SURFACE_TYPE_MISMATCH</code></a> if the surface does not have
|
222
298
|
pixel contents, or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-WRITE-ERROR:CAPS"><code class="literal">CAIRO_STATUS_WRITE_ERROR</code></a> if an I/O error occurs
|
223
|
-
while attempting to write the file.</
|
224
|
-
|
225
|
-
</
|
226
|
-
</table></div>
|
299
|
+
while attempting to write the file.</p>
|
300
|
+
<p></p>
|
301
|
+
</div>
|
227
302
|
<p class="since">Since 1.0</p>
|
228
303
|
</div>
|
229
304
|
<hr>
|
230
305
|
<div class="refsect2">
|
231
|
-
<a name="cairo-write-func-t"></a><h3>cairo_write_func_t
|
232
|
-
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
233
|
-
|
234
|
-
|
235
|
-
<
|
236
|
-
<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t
|
306
|
+
<a name="cairo-write-func-t"></a><h3>cairo_write_func_t ()</h3>
|
307
|
+
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
308
|
+
<span class="c_punctuation">(</span>*cairo_write_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *closure</code></em>,
|
309
|
+
<em class="parameter"><code>const unsigned <span class="type">char</span> *data</code></em>,
|
310
|
+
<em class="parameter"><code>unsigned <span class="type">int</span> length</code></em>);</pre>
|
311
|
+
<p><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> is the type of function which is called when a
|
237
312
|
backend needs to write data to an output stream. It is passed the
|
238
313
|
closure which was specified by the user at the time the write
|
239
314
|
function was registered, the data to write and the length of the
|
240
315
|
data in bytes. The write function should return
|
241
316
|
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if all the data was successfully written,
|
242
|
-
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-WRITE-ERROR:CAPS"><code class="literal">CAIRO_STATUS_WRITE_ERROR</code></a> otherwise
|
243
|
-
|
244
|
-
<
|
245
|
-
<
|
317
|
+
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-WRITE-ERROR:CAPS"><code class="literal">CAIRO_STATUS_WRITE_ERROR</code></a> otherwise.</p>
|
318
|
+
<div class="refsect3">
|
319
|
+
<a name="id-1.5.6.7.6.5"></a><h4>Parameters</h4>
|
320
|
+
<div class="informaltable"><table width="100%" border="0">
|
321
|
+
<colgroup>
|
322
|
+
<col width="150px" class="parameters_name">
|
323
|
+
<col class="parameters_description">
|
324
|
+
<col width="200px" class="parameters_annotations">
|
325
|
+
</colgroup>
|
246
326
|
<tbody>
|
247
327
|
<tr>
|
248
|
-
<td
|
249
|
-
<td>the output closure</td>
|
250
|
-
</
|
251
|
-
<tr>
|
252
|
-
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
253
|
-
<td>the buffer containing the data to write</td>
|
328
|
+
<td class="parameter_name"><p>closure</p></td>
|
329
|
+
<td class="parameter_description"><p>the output closure</p></td>
|
330
|
+
<td class="parameter_annotations"> </td>
|
254
331
|
</tr>
|
255
332
|
<tr>
|
256
|
-
<td
|
257
|
-
<td>the
|
333
|
+
<td class="parameter_name"><p>data</p></td>
|
334
|
+
<td class="parameter_description"><p>the buffer containing the data to write</p></td>
|
335
|
+
<td class="parameter_annotations"> </td>
|
258
336
|
</tr>
|
259
337
|
<tr>
|
260
|
-
<td
|
261
|
-
<td>the
|
338
|
+
<td class="parameter_name"><p>length</p></td>
|
339
|
+
<td class="parameter_description"><p>the amount of data to write</p></td>
|
340
|
+
<td class="parameter_annotations"> </td>
|
262
341
|
</tr>
|
263
342
|
</tbody>
|
264
343
|
</table></div>
|
344
|
+
</div>
|
345
|
+
<div class="refsect3">
|
346
|
+
<a name="id-1.5.6.7.6.6"></a><h4>Returns</h4>
|
347
|
+
<p> the status code of the write operation</p>
|
348
|
+
<p></p>
|
349
|
+
</div>
|
265
350
|
<p class="since">Since 1.0</p>
|
266
351
|
</div>
|
267
352
|
<hr>
|
268
353
|
<div class="refsect2">
|
269
|
-
<a name="cairo-surface-write-to-png-stream"></a><h3>cairo_surface_write_to_png_stream
|
270
|
-
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
271
|
-
|
272
|
-
|
273
|
-
<
|
274
|
-
Writes the image surface to the write function
|
275
|
-
|
276
|
-
<
|
277
|
-
<
|
354
|
+
<a name="cairo-surface-write-to-png-stream"></a><h3>cairo_surface_write_to_png_stream ()</h3>
|
355
|
+
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
|
356
|
+
cairo_surface_write_to_png_stream (<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>,
|
357
|
+
<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>,
|
358
|
+
<em class="parameter"><code><span class="type">void</span> *closure</code></em>);</pre>
|
359
|
+
<p>Writes the image surface to the write function.</p>
|
360
|
+
<div class="refsect3">
|
361
|
+
<a name="id-1.5.6.7.7.5"></a><h4>Parameters</h4>
|
362
|
+
<div class="informaltable"><table width="100%" border="0">
|
363
|
+
<colgroup>
|
364
|
+
<col width="150px" class="parameters_name">
|
365
|
+
<col class="parameters_description">
|
366
|
+
<col width="200px" class="parameters_annotations">
|
367
|
+
</colgroup>
|
278
368
|
<tbody>
|
279
369
|
<tr>
|
280
|
-
<td
|
281
|
-
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> with pixel contents</td>
|
370
|
+
<td class="parameter_name"><p>surface</p></td>
|
371
|
+
<td class="parameter_description"><p>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> with pixel contents</p></td>
|
372
|
+
<td class="parameter_annotations"> </td>
|
282
373
|
</tr>
|
283
374
|
<tr>
|
284
|
-
<td
|
285
|
-
<td>a <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t
|
286
|
-
</td>
|
375
|
+
<td class="parameter_name"><p>write_func</p></td>
|
376
|
+
<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></p></td>
|
377
|
+
<td class="parameter_annotations"> </td>
|
287
378
|
</tr>
|
288
379
|
<tr>
|
289
|
-
<td
|
290
|
-
<td>closure data for the write function</td>
|
380
|
+
<td class="parameter_name"><p>closure</p></td>
|
381
|
+
<td class="parameter_description"><p>closure data for the write function</p></td>
|
382
|
+
<td class="parameter_annotations"> </td>
|
291
383
|
</tr>
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
<
|
384
|
+
</tbody>
|
385
|
+
</table></div>
|
386
|
+
</div>
|
387
|
+
<div class="refsect3">
|
388
|
+
<a name="id-1.5.6.7.7.6"></a><h4>Returns</h4>
|
389
|
+
<p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if the PNG file was written
|
296
390
|
successfully. Otherwise, <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> is returned if
|
297
391
|
memory could not be allocated for the operation,
|
298
392
|
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_SURFACE_TYPE_MISMATCH</code></a> if the surface does not have
|
299
|
-
pixel contents.</
|
300
|
-
|
301
|
-
</
|
302
|
-
</
|
393
|
+
pixel contents.</p>
|
394
|
+
<p></p>
|
395
|
+
</div>
|
396
|
+
<p class="since">Since 1.0</p>
|
397
|
+
</div>
|
398
|
+
</div>
|
399
|
+
<div class="refsect1">
|
400
|
+
<a name="cairo-PNG-Support.other_details"></a><h2>Types and Values</h2>
|
401
|
+
<div class="refsect2">
|
402
|
+
<a name="CAIRO-HAS-PNG-FUNCTIONS:CAPS"></a><h3>CAIRO_HAS_PNG_FUNCTIONS</h3>
|
403
|
+
<pre class="programlisting">#define CAIRO_HAS_PNG_FUNCTIONS 1
|
404
|
+
</pre>
|
405
|
+
<p>Defined if the PNG functions are available.
|
406
|
+
This macro can be used to conditionally compile code using the cairo
|
407
|
+
PNG functions.</p>
|
303
408
|
<p class="since">Since 1.0</p>
|
304
409
|
</div>
|
305
410
|
</div>
|
306
411
|
<div class="refsect1">
|
307
412
|
<a name="cairo-PNG-Support.see-also"></a><h2>See Also</h2>
|
308
|
-
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
413
|
+
<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>
|
309
414
|
</div>
|
310
415
|
</div>
|
311
416
|
<div class="footer">
|
312
417
|
<hr>
|
313
|
-
Generated by GTK-Doc V1.
|
418
|
+
Generated by GTK-Doc V1.20</div>
|
314
419
|
</body>
|
315
420
|
</html>
|