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
@@ -0,0 +1,63 @@
|
|
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>Fonts</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="index.html" title="Cairo: A Vector Graphics Library">
|
9
|
+
<link rel="prev" href="cairo-text.html" title="Text">
|
10
|
+
<link rel="next" href="cairo-font-face.html" title="cairo_font_face_t">
|
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"><tr valign="middle">
|
26
|
+
<td><a accesskey="p" href="cairo-text.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
27
|
+
<td> </td>
|
28
|
+
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
29
|
+
<th width="100%" align="center">Cairo: A Vector Graphics Library</th>
|
30
|
+
<td><a accesskey="n" href="cairo-font-face.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
31
|
+
</tr></table>
|
32
|
+
<div class="chapter" lang="en">
|
33
|
+
<div class="titlepage"><div><div><h2 class="title">
|
34
|
+
<a name="cairo-fonts"></a>Fonts</h2></div></div></div>
|
35
|
+
<div class="toc"><dl>
|
36
|
+
<dt>
|
37
|
+
<span class="refentrytitle"><a href="cairo-font-face.html">cairo_font_face_t</a></span><span class="refpurpose"> — Base class for font faces</span>
|
38
|
+
</dt>
|
39
|
+
<dt>
|
40
|
+
<span class="refentrytitle"><a href="cairo-scaled-font.html">cairo_scaled_font_t</a></span><span class="refpurpose"> — Font face at particular size and options</span>
|
41
|
+
</dt>
|
42
|
+
<dt>
|
43
|
+
<span class="refentrytitle"><a href="cairo-font-options.html">cairo_font_options_t</a></span><span class="refpurpose"> — How a font should be rendered</span>
|
44
|
+
</dt>
|
45
|
+
<dt>
|
46
|
+
<span class="refentrytitle"><a href="cairo-ft-font.html">FreeType Fonts</a></span><span class="refpurpose"> — Font support for FreeType</span>
|
47
|
+
</dt>
|
48
|
+
<dt>
|
49
|
+
<span class="refentrytitle"><a href="cairo-win32-font.html">Win32 Fonts</a></span><span class="refpurpose"> — Font support for Microsoft Windows</span>
|
50
|
+
</dt>
|
51
|
+
<dt>
|
52
|
+
<span class="refentrytitle"><a href="cairo-quartz-font.html">Quartz (CGFont) Fonts</a></span><span class="refpurpose"> — Font support via CGFont on OS X</span>
|
53
|
+
</dt>
|
54
|
+
<dt>
|
55
|
+
<span class="refentrytitle"><a href="cairo-user-font.html">User Fonts</a></span><span class="refpurpose"> — Font support with font data provided by the user</span>
|
56
|
+
</dt>
|
57
|
+
</dl></div>
|
58
|
+
</div>
|
59
|
+
<div class="footer">
|
60
|
+
<hr>
|
61
|
+
Generated by GTK-Doc V1.10</div>
|
62
|
+
</body>
|
63
|
+
</html>
|
@@ -0,0 +1,318 @@
|
|
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>FreeType Fonts</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-fonts.html" title="Fonts">
|
9
|
+
<link rel="prev" href="cairo-font-options.html" title="cairo_font_options_t">
|
10
|
+
<link rel="next" href="cairo-win32-font.html" title="Win32 Fonts">
|
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-font-options.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
28
|
+
<td><a accesskey="u" href="cairo-fonts.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-win32-font.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-ft-font.synopsis" class="shortcut">Top</a>
|
34
|
+
|
|
35
|
+
<a href="#cairo-ft-font.description" class="shortcut">Description</a></nobr></td></tr>
|
36
|
+
</table>
|
37
|
+
<div class="refentry" lang="en">
|
38
|
+
<a name="cairo-ft-font"></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-ft-font.top_of_page"></a>FreeType Fonts</span></h2>
|
42
|
+
<p>FreeType Fonts — Font support for FreeType</p>
|
43
|
+
</td>
|
44
|
+
<td valign="top" align="right"></td>
|
45
|
+
</tr></table></div>
|
46
|
+
<div class="refsynopsisdiv">
|
47
|
+
<a name="cairo-ft-font.synopsis"></a><h2>Synopsis</h2>
|
48
|
+
<pre class="synopsis">
|
49
|
+
#define <a class="link" href="cairo-ft-font.html#CAIRO-HAS-FT-FONT:CAPS" title="CAIRO_HAS_FT_FONT">CAIRO_HAS_FT_FONT</a>
|
50
|
+
<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a>* <a class="link" href="cairo-ft-font.html#cairo-ft-font-face-create-for-ft-face" title="cairo_ft_font_face_create_for_ft_face ()">cairo_ft_font_face_create_for_ft_face</a>
|
51
|
+
(FT_Face face,
|
52
|
+
int load_flags);
|
53
|
+
<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a>* <a class="link" href="cairo-ft-font.html#cairo-ft-font-face-create-for-pattern" title="cairo_ft_font_face_create_for_pattern ()">cairo_ft_font_face_create_for_pattern</a>
|
54
|
+
(FcPattern *pattern);
|
55
|
+
void <a class="link" href="cairo-ft-font.html#cairo-ft-font-options-substitute" title="cairo_ft_font_options_substitute ()">cairo_ft_font_options_substitute</a> (const <a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
|
56
|
+
FcPattern *pattern);
|
57
|
+
FT_Face <a class="link" href="cairo-ft-font.html#cairo-ft-scaled-font-lock-face" title="cairo_ft_scaled_font_lock_face ()">cairo_ft_scaled_font_lock_face</a> (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);
|
58
|
+
void <a class="link" href="cairo-ft-font.html#cairo-ft-scaled-font-unlock-face" title="cairo_ft_scaled_font_unlock_face ()">cairo_ft_scaled_font_unlock_face</a> (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);
|
59
|
+
</pre>
|
60
|
+
</div>
|
61
|
+
<div class="refsect1" lang="en">
|
62
|
+
<a name="cairo-ft-font.description"></a><h2>Description</h2>
|
63
|
+
<p>
|
64
|
+
The FreeType font backend is primarily used to render text on GNU/Linux
|
65
|
+
systems, but can be used on other platforms too.
|
66
|
+
</p>
|
67
|
+
</div>
|
68
|
+
<div class="refsect1" lang="en">
|
69
|
+
<a name="cairo-ft-font.details"></a><h2>Details</h2>
|
70
|
+
<div class="refsect2" lang="en">
|
71
|
+
<a name="CAIRO-HAS-FT-FONT:CAPS"></a><h3>CAIRO_HAS_FT_FONT</h3>
|
72
|
+
<pre class="programlisting">#define CAIRO_HAS_FT_FONT 1
|
73
|
+
</pre>
|
74
|
+
<p>
|
75
|
+
Defined if the FreeType font backend is available.
|
76
|
+
This macro can be used to conditionally compile backend-specific code.
|
77
|
+
</p>
|
78
|
+
</div>
|
79
|
+
<hr>
|
80
|
+
<div class="refsect2" lang="en">
|
81
|
+
<a name="cairo-ft-font-face-create-for-ft-face"></a><h3>cairo_ft_font_face_create_for_ft_face ()</h3>
|
82
|
+
<pre class="programlisting"><a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a>* cairo_ft_font_face_create_for_ft_face
|
83
|
+
(FT_Face face,
|
84
|
+
int load_flags);</pre>
|
85
|
+
<p>
|
86
|
+
Creates a new font face for the FreeType font backend from a
|
87
|
+
pre-opened FreeType face. This font can then be used with
|
88
|
+
<a class="link" href="cairo-text.html#cairo-set-font-face" title="cairo_set_font_face ()"><code class="function">cairo_set_font_face()</code></a> or <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a>. The
|
89
|
+
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> returned from <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a> is
|
90
|
+
also for the FreeType backend and can be used with functions such
|
91
|
+
as <a class="link" href="cairo-ft-font.html#cairo-ft-scaled-font-lock-face" title="cairo_ft_scaled_font_lock_face ()"><code class="function">cairo_ft_scaled_font_lock_face()</code></a>.
|
92
|
+
</p>
|
93
|
+
<p>
|
94
|
+
As an example, here is how one might correctly couple the lifetime of
|
95
|
+
the FreeType face object to the <span class="type">""</span>
|
96
|
+
</p>
|
97
|
+
<p>
|
98
|
+
</p>
|
99
|
+
<div class="informalexample"><pre class="programlisting">
|
100
|
+
static const cairo_user_data_key_t key;
|
101
|
+
|
102
|
+
font_face = cairo_ft_font_face_create_for_ft_face (ft_face, 0);
|
103
|
+
status = cairo_font_face_set_user_data (font_face, &key,
|
104
|
+
ft_face, (cairo_destroy_func_t) FT_Done_Face);
|
105
|
+
if (status) {
|
106
|
+
cairo_font_face_destroy (font_face);
|
107
|
+
FT_Done_Face (ft_face);
|
108
|
+
return ERROR;
|
109
|
+
}
|
110
|
+
</pre></div>
|
111
|
+
<p>
|
112
|
+
|
113
|
+
</p>
|
114
|
+
<div class="variablelist"><table border="0">
|
115
|
+
<col align="left" valign="top">
|
116
|
+
<tbody>
|
117
|
+
<tr>
|
118
|
+
<td><p><span class="term"><em class="parameter"><code>face</code></em> :</span></p></td>
|
119
|
+
<td> A FreeType face object, already opened. This must
|
120
|
+
be kept around until the face's ref_count drops to
|
121
|
+
zero and it is freed. Since the face may be referenced
|
122
|
+
internally to Cairo, the best way to determine when it
|
123
|
+
is safe to free the face is to pass a
|
124
|
+
<a class="link" href="cairo-types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> to <a class="link" href="cairo-font-face.html#cairo-font-face-set-user-data" title="cairo_font_face_set_user_data ()"><code class="function">cairo_font_face_set_user_data()</code></a>
|
125
|
+
</td>
|
126
|
+
</tr>
|
127
|
+
<tr>
|
128
|
+
<td><p><span class="term"><em class="parameter"><code>load_flags</code></em> :</span></p></td>
|
129
|
+
<td> flags to pass to FT_Load_Glyph when loading
|
130
|
+
glyphs from the font. These flags are OR'ed together with
|
131
|
+
the flags derived from the <a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> passed
|
132
|
+
to <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a>, so only a few values such
|
133
|
+
as <code class="literal">FT_LOAD_VERTICAL_LAYOUT</code>, and <code class="literal">FT_LOAD_FORCE_AUTOHINT</code>
|
134
|
+
are useful. You should not pass any of the flags affecting
|
135
|
+
the load target, such as <code class="literal">FT_LOAD_TARGET_LIGHT</code>.
|
136
|
+
</td>
|
137
|
+
</tr>
|
138
|
+
<tr>
|
139
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
140
|
+
<td> a newly created <a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a>. Free with
|
141
|
+
<a class="link" href="cairo-font-face.html#cairo-font-face-destroy" title="cairo_font_face_destroy ()"><code class="function">cairo_font_face_destroy()</code></a> when you are done using it.
|
142
|
+
</td>
|
143
|
+
</tr>
|
144
|
+
</tbody>
|
145
|
+
</table></div>
|
146
|
+
</div>
|
147
|
+
<hr>
|
148
|
+
<div class="refsect2" lang="en">
|
149
|
+
<a name="cairo-ft-font-face-create-for-pattern"></a><h3>cairo_ft_font_face_create_for_pattern ()</h3>
|
150
|
+
<pre class="programlisting"><a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a>* cairo_ft_font_face_create_for_pattern
|
151
|
+
(FcPattern *pattern);</pre>
|
152
|
+
<p>
|
153
|
+
Creates a new font face for the FreeType font backend based on a
|
154
|
+
fontconfig pattern. This font can then be used with
|
155
|
+
<a class="link" href="cairo-text.html#cairo-set-font-face" title="cairo_set_font_face ()"><code class="function">cairo_set_font_face()</code></a> or <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a>. The
|
156
|
+
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> returned from <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a> is
|
157
|
+
also for the FreeType backend and can be used with functions such
|
158
|
+
as <a class="link" href="cairo-ft-font.html#cairo-ft-scaled-font-lock-face" title="cairo_ft_scaled_font_lock_face ()"><code class="function">cairo_ft_scaled_font_lock_face()</code></a>.
|
159
|
+
</p>
|
160
|
+
<p>
|
161
|
+
Font rendering options are represented both here and when you
|
162
|
+
call <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a>. Font options that have a representation
|
163
|
+
in a <span class="type">FcPattern</span> must be passed in here; to modify <span class="type">FcPattern</span>
|
164
|
+
appropriately to reflect the options in a <a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>, call
|
165
|
+
<a class="link" href="cairo-ft-font.html#cairo-ft-font-options-substitute" title="cairo_ft_font_options_substitute ()"><code class="function">cairo_ft_font_options_substitute()</code></a>.
|
166
|
+
</p>
|
167
|
+
<p>
|
168
|
+
The pattern's FC_FT_FACE element is inspected first and if that is set,
|
169
|
+
that will be the FreeType font face associated with the returned cairo
|
170
|
+
font face. Otherwise the FC_FILE and FC_INDEX elements of <em class="parameter"><code>pattern</code></em> are
|
171
|
+
used to load a font face from file.
|
172
|
+
</p>
|
173
|
+
<p>
|
174
|
+
If the FC_FT_FACE element of <em class="parameter"><code>pattern</code></em> is set, the user is responsible
|
175
|
+
for making sure that the referenced FT_Face remains valid for the life
|
176
|
+
time of the returned <a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a>. See
|
177
|
+
<a class="link" href="cairo-ft-font.html#cairo-ft-font-face-create-for-ft-face" title="cairo_ft_font_face_create_for_ft_face ()"><code class="function">cairo_ft_font_face_create_for_ft_face()</code></a> for an exmaple of how to couple
|
178
|
+
the life time of the FT_Face to that of the cairo font-face.</p>
|
179
|
+
<p>
|
180
|
+
|
181
|
+
</p>
|
182
|
+
<div class="variablelist"><table border="0">
|
183
|
+
<col align="left" valign="top">
|
184
|
+
<tbody>
|
185
|
+
<tr>
|
186
|
+
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
|
187
|
+
<td> A fully resolved fontconfig
|
188
|
+
pattern. A pattern can be resolved, by, among other things, calling
|
189
|
+
<code class="function">FcConfigSubstitute()</code>, <code class="function">FcDefaultSubstitute()</code>, then
|
190
|
+
<code class="function">FcFontMatch()</code>. Cairo will call <code class="function">FcPatternReference()</code> on this
|
191
|
+
pattern, so you should not further modify the pattern, but you can
|
192
|
+
release your reference to the pattern with <code class="function">FcPatternDestroy()</code> if
|
193
|
+
you no longer need to access it.
|
194
|
+
</td>
|
195
|
+
</tr>
|
196
|
+
<tr>
|
197
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
198
|
+
<td> a newly created <a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a>. Free with
|
199
|
+
<a class="link" href="cairo-font-face.html#cairo-font-face-destroy" title="cairo_font_face_destroy ()"><code class="function">cairo_font_face_destroy()</code></a> when you are done using it.
|
200
|
+
</td>
|
201
|
+
</tr>
|
202
|
+
</tbody>
|
203
|
+
</table></div>
|
204
|
+
</div>
|
205
|
+
<hr>
|
206
|
+
<div class="refsect2" lang="en">
|
207
|
+
<a name="cairo-ft-font-options-substitute"></a><h3>cairo_ft_font_options_substitute ()</h3>
|
208
|
+
<pre class="programlisting">void cairo_ft_font_options_substitute (const <a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
|
209
|
+
FcPattern *pattern);</pre>
|
210
|
+
<p>
|
211
|
+
Add options to a <span class="type">FcPattern</span> based on a <a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> font
|
212
|
+
options object. Options that are already in the pattern, are not overridden,
|
213
|
+
so you should call this function after calling <code class="function">FcConfigSubstitute()</code> (the
|
214
|
+
user's settings should override options based on the surface type), but
|
215
|
+
before calling <code class="function">FcDefaultSubstitute()</code>.</p>
|
216
|
+
<p>
|
217
|
+
|
218
|
+
</p>
|
219
|
+
<div class="variablelist"><table border="0">
|
220
|
+
<col align="left" valign="top">
|
221
|
+
<tbody>
|
222
|
+
<tr>
|
223
|
+
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
|
224
|
+
<td> a <a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> object
|
225
|
+
</td>
|
226
|
+
</tr>
|
227
|
+
<tr>
|
228
|
+
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
|
229
|
+
<td> an existing <span class="type">FcPattern</span>
|
230
|
+
</td>
|
231
|
+
</tr>
|
232
|
+
</tbody>
|
233
|
+
</table></div>
|
234
|
+
</div>
|
235
|
+
<hr>
|
236
|
+
<div class="refsect2" lang="en">
|
237
|
+
<a name="cairo-ft-scaled-font-lock-face"></a><h3>cairo_ft_scaled_font_lock_face ()</h3>
|
238
|
+
<pre class="programlisting">FT_Face cairo_ft_scaled_font_lock_face (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);</pre>
|
239
|
+
<p>
|
240
|
+
<a class="link" href="cairo-ft-font.html#cairo-ft-scaled-font-lock-face" title="cairo_ft_scaled_font_lock_face ()"><code class="function">cairo_ft_scaled_font_lock_face()</code></a> gets the <span class="type">FT_Face</span> object from a FreeType
|
241
|
+
backend font and scales it appropriately for the font. You must
|
242
|
+
release the face with <a class="link" href="cairo-ft-font.html#cairo-ft-scaled-font-unlock-face" title="cairo_ft_scaled_font_unlock_face ()"><code class="function">cairo_ft_scaled_font_unlock_face()</code></a>
|
243
|
+
when you are done using it. Since the <span class="type">FT_Face</span> object can be
|
244
|
+
shared between multiple <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> objects, you must not
|
245
|
+
lock any other font objects until you unlock this one. A count is
|
246
|
+
kept of the number of times <a class="link" href="cairo-ft-font.html#cairo-ft-scaled-font-lock-face" title="cairo_ft_scaled_font_lock_face ()"><code class="function">cairo_ft_scaled_font_lock_face()</code></a> is
|
247
|
+
called. <a class="link" href="cairo-ft-font.html#cairo-ft-scaled-font-unlock-face" title="cairo_ft_scaled_font_unlock_face ()"><code class="function">cairo_ft_scaled_font_unlock_face()</code></a> must be called the same number
|
248
|
+
of times.
|
249
|
+
</p>
|
250
|
+
<p>
|
251
|
+
You must be careful when using this function in a library or in a
|
252
|
+
threaded application, because freetype's design makes it unsafe to
|
253
|
+
call freetype functions simultaneously from multiple threads, (even
|
254
|
+
if using distinct FT_Face objects). Because of this, application
|
255
|
+
code that acquires an FT_Face object with this call must add it's
|
256
|
+
own locking to protect any use of that object, (and which also must
|
257
|
+
protect any other calls into cairo as almost any cairo function
|
258
|
+
might result in a call into the freetype library).</p>
|
259
|
+
<p>
|
260
|
+
|
261
|
+
</p>
|
262
|
+
<div class="variablelist"><table border="0">
|
263
|
+
<col align="left" valign="top">
|
264
|
+
<tbody>
|
265
|
+
<tr>
|
266
|
+
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
|
267
|
+
<td> A <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> from the FreeType font backend. Such an
|
268
|
+
object can be created by calling <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a> on a
|
269
|
+
FreeType backend font face (see <a class="link" href="cairo-ft-font.html#cairo-ft-font-face-create-for-pattern" title="cairo_ft_font_face_create_for_pattern ()"><code class="function">cairo_ft_font_face_create_for_pattern()</code></a>,
|
270
|
+
<a class="link" href="cairo-ft-font.html#cairo-ft-font-face-create-for-ft-face" title="cairo_ft_font_face_create_for_ft_face ()"><code class="function">cairo_ft_font_face_create_for_ft_face()</code></a>).
|
271
|
+
</td>
|
272
|
+
</tr>
|
273
|
+
<tr>
|
274
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
275
|
+
<td> The <span class="type">FT_Face</span> object for <em class="parameter"><code>font</code></em>, scaled appropriately,
|
276
|
+
or <code class="literal">NULL</code> if <em class="parameter"><code>scaled_font</code></em> is in an error state (see
|
277
|
+
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-status" title="cairo_scaled_font_status ()"><code class="function">cairo_scaled_font_status()</code></a>) or there is insufficient memory.
|
278
|
+
</td>
|
279
|
+
</tr>
|
280
|
+
</tbody>
|
281
|
+
</table></div>
|
282
|
+
</div>
|
283
|
+
<hr>
|
284
|
+
<div class="refsect2" lang="en">
|
285
|
+
<a name="cairo-ft-scaled-font-unlock-face"></a><h3>cairo_ft_scaled_font_unlock_face ()</h3>
|
286
|
+
<pre class="programlisting">void cairo_ft_scaled_font_unlock_face (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);</pre>
|
287
|
+
<p>
|
288
|
+
Releases a face obtained with <a class="link" href="cairo-ft-font.html#cairo-ft-scaled-font-lock-face" title="cairo_ft_scaled_font_lock_face ()"><code class="function">cairo_ft_scaled_font_lock_face()</code></a>.</p>
|
289
|
+
<p>
|
290
|
+
|
291
|
+
</p>
|
292
|
+
<div class="variablelist"><table border="0">
|
293
|
+
<col align="left" valign="top">
|
294
|
+
<tbody><tr>
|
295
|
+
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
|
296
|
+
<td> A <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> from the FreeType font backend. Such an
|
297
|
+
object can be created by calling <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a> on a
|
298
|
+
FreeType backend font face (see <a class="link" href="cairo-ft-font.html#cairo-ft-font-face-create-for-pattern" title="cairo_ft_font_face_create_for_pattern ()"><code class="function">cairo_ft_font_face_create_for_pattern()</code></a>,
|
299
|
+
<a class="link" href="cairo-ft-font.html#cairo-ft-font-face-create-for-ft-face" title="cairo_ft_font_face_create_for_ft_face ()"><code class="function">cairo_ft_font_face_create_for_ft_face()</code></a>).
|
300
|
+
</td>
|
301
|
+
</tr></tbody>
|
302
|
+
</table></div>
|
303
|
+
</div>
|
304
|
+
</div>
|
305
|
+
<div class="refsect1" lang="en">
|
306
|
+
<a name="cairo-ft-font.see-also"></a><h2>See Also</h2>
|
307
|
+
<p>
|
308
|
+
</p>
|
309
|
+
<div class="itemizedlist"><ul type="disc"><li><a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a></li></ul></div>
|
310
|
+
<p>
|
311
|
+
</p>
|
312
|
+
</div>
|
313
|
+
</div>
|
314
|
+
<div class="footer">
|
315
|
+
<hr>
|
316
|
+
Generated by GTK-Doc V1.10</div>
|
317
|
+
</body>
|
318
|
+
</html>
|
@@ -0,0 +1,486 @@
|
|
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>Image Surfaces</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-surface.html" title="cairo_surface_t">
|
10
|
+
<link rel="next" href="cairo-pdf-surface.html" title="PDF 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-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-pdf-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-image-surface.synopsis" class="shortcut">Top</a>
|
34
|
+
|
|
35
|
+
<a href="#cairo-image-surface.description" class="shortcut">Description</a></nobr></td></tr>
|
36
|
+
</table>
|
37
|
+
<div class="refentry" lang="en">
|
38
|
+
<a name="cairo-image-surface"></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-image-surface.top_of_page"></a>Image Surfaces</span></h2>
|
42
|
+
<p>Image Surfaces — Rendering to memory buffers</p>
|
43
|
+
</td>
|
44
|
+
<td valign="top" align="right"></td>
|
45
|
+
</tr></table></div>
|
46
|
+
<div class="refsynopsisdiv">
|
47
|
+
<a name="cairo-image-surface.synopsis"></a><h2>Synopsis</h2>
|
48
|
+
<pre class="synopsis">
|
49
|
+
#define <a class="link" href="cairo-image-surface.html#CAIRO-HAS-IMAGE-SURFACE:CAPS" title="CAIRO_HAS_IMAGE_SURFACE">CAIRO_HAS_IMAGE_SURFACE</a>
|
50
|
+
enum <a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t">cairo_format_t</a>;
|
51
|
+
int <a class="link" href="cairo-image-surface.html#cairo-format-stride-for-width" title="cairo_format_stride_for_width ()">cairo_format_stride_for_width</a> (<a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t">cairo_format_t</a> format,
|
52
|
+
int width);
|
53
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* <a class="link" href="cairo-image-surface.html#cairo-image-surface-create" title="cairo_image_surface_create ()">cairo_image_surface_create</a> (<a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t">cairo_format_t</a> format,
|
54
|
+
int width,
|
55
|
+
int height);
|
56
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* <a class="link" href="cairo-image-surface.html#cairo-image-surface-create-for-data" title="cairo_image_surface_create_for_data ()">cairo_image_surface_create_for_data</a> (unsigned char *data,
|
57
|
+
<a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t">cairo_format_t</a> format,
|
58
|
+
int width,
|
59
|
+
int height,
|
60
|
+
int stride);
|
61
|
+
unsigned char* <a class="link" href="cairo-image-surface.html#cairo-image-surface-get-data" title="cairo_image_surface_get_data ()">cairo_image_surface_get_data</a> (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface);
|
62
|
+
<a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t">cairo_format_t</a> <a class="link" href="cairo-image-surface.html#cairo-image-surface-get-format" title="cairo_image_surface_get_format ()">cairo_image_surface_get_format</a> (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface);
|
63
|
+
int <a class="link" href="cairo-image-surface.html#cairo-image-surface-get-width" title="cairo_image_surface_get_width ()">cairo_image_surface_get_width</a> (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface);
|
64
|
+
int <a class="link" href="cairo-image-surface.html#cairo-image-surface-get-height" title="cairo_image_surface_get_height ()">cairo_image_surface_get_height</a> (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface);
|
65
|
+
int <a class="link" href="cairo-image-surface.html#cairo-image-surface-get-stride" title="cairo_image_surface_get_stride ()">cairo_image_surface_get_stride</a> (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface);
|
66
|
+
</pre>
|
67
|
+
</div>
|
68
|
+
<div class="refsect1" lang="en">
|
69
|
+
<a name="cairo-image-surface.description"></a><h2>Description</h2>
|
70
|
+
<p>
|
71
|
+
Image surfaces provide the ability to render to memory buffers
|
72
|
+
either allocated by cairo or by the calling code. The supported
|
73
|
+
image formats are those defined in <a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t"><span class="type">cairo_format_t</span></a>.
|
74
|
+
</p>
|
75
|
+
</div>
|
76
|
+
<div class="refsect1" lang="en">
|
77
|
+
<a name="cairo-image-surface.details"></a><h2>Details</h2>
|
78
|
+
<div class="refsect2" lang="en">
|
79
|
+
<a name="CAIRO-HAS-IMAGE-SURFACE:CAPS"></a><h3>CAIRO_HAS_IMAGE_SURFACE</h3>
|
80
|
+
<pre class="programlisting">#define CAIRO_HAS_IMAGE_SURFACE 1
|
81
|
+
</pre>
|
82
|
+
<p>
|
83
|
+
Defined if the image surface backend is available.
|
84
|
+
The image surface backend is always built in.
|
85
|
+
This macro was added for completeness in cairo 1.8.
|
86
|
+
</p>
|
87
|
+
<p class="since">Since 1.8
|
88
|
+
|
89
|
+
|
90
|
+
</p>
|
91
|
+
</div>
|
92
|
+
<hr>
|
93
|
+
<div class="refsect2" lang="en">
|
94
|
+
<a name="cairo-format-t"></a><h3>enum cairo_format_t</h3>
|
95
|
+
<pre class="programlisting">typedef enum _cairo_format {
|
96
|
+
CAIRO_FORMAT_ARGB32,
|
97
|
+
CAIRO_FORMAT_RGB24,
|
98
|
+
CAIRO_FORMAT_A8,
|
99
|
+
CAIRO_FORMAT_A1
|
100
|
+
/* The value of 4 is reserved by a deprecated enum value.
|
101
|
+
* The next format added must have an explicit value of 5.
|
102
|
+
CAIRO_FORMAT_RGB16_565 = 4,
|
103
|
+
*/
|
104
|
+
} cairo_format_t;
|
105
|
+
</pre>
|
106
|
+
<p>
|
107
|
+
<a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t"><span class="type">cairo_format_t</span></a> is used to identify the memory format of
|
108
|
+
image data.
|
109
|
+
</p>
|
110
|
+
<p>
|
111
|
+
New entries may be added in future versions.</p>
|
112
|
+
<p>
|
113
|
+
|
114
|
+
</p>
|
115
|
+
<div class="variablelist"><table border="0">
|
116
|
+
<col align="left" valign="top">
|
117
|
+
<tbody>
|
118
|
+
<tr>
|
119
|
+
<td><p><a name="CAIRO-FORMAT-ARGB32:CAPS"></a><span class="term"><code class="literal">CAIRO_FORMAT_ARGB32</code></span></p></td>
|
120
|
+
<td> each pixel is a 32-bit quantity, with
|
121
|
+
alpha in the upper 8 bits, then red, then green, then blue.
|
122
|
+
The 32-bit quantities are stored native-endian. Pre-multiplied
|
123
|
+
alpha is used. (That is, 50% transparent red is 0x80800000,
|
124
|
+
not 0x80ff0000.)
|
125
|
+
</td>
|
126
|
+
</tr>
|
127
|
+
<tr>
|
128
|
+
<td><p><a name="CAIRO-FORMAT-RGB24:CAPS"></a><span class="term"><code class="literal">CAIRO_FORMAT_RGB24</code></span></p></td>
|
129
|
+
<td> each pixel is a 32-bit quantity, with
|
130
|
+
the upper 8 bits unused. Red, Green, and Blue are stored
|
131
|
+
in the remaining 24 bits in that order.
|
132
|
+
</td>
|
133
|
+
</tr>
|
134
|
+
<tr>
|
135
|
+
<td><p><a name="CAIRO-FORMAT-A8:CAPS"></a><span class="term"><code class="literal">CAIRO_FORMAT_A8</code></span></p></td>
|
136
|
+
<td> each pixel is a 8-bit quantity holding
|
137
|
+
an alpha value.
|
138
|
+
</td>
|
139
|
+
</tr>
|
140
|
+
<tr>
|
141
|
+
<td><p><a name="CAIRO-FORMAT-A1:CAPS"></a><span class="term"><code class="literal">CAIRO_FORMAT_A1</code></span></p></td>
|
142
|
+
<td> each pixel is a 1-bit quantity holding
|
143
|
+
an alpha value. Pixels are packed together into 32-bit
|
144
|
+
quantities. The ordering of the bits matches the
|
145
|
+
endianess of the platform. On a big-endian machine, the
|
146
|
+
first pixel is in the uppermost bit, on a little-endian
|
147
|
+
machine the first pixel is in the least-significant bit.
|
148
|
+
</td>
|
149
|
+
</tr>
|
150
|
+
</tbody>
|
151
|
+
</table></div>
|
152
|
+
</div>
|
153
|
+
<hr>
|
154
|
+
<div class="refsect2" lang="en">
|
155
|
+
<a name="cairo-format-stride-for-width"></a><h3>cairo_format_stride_for_width ()</h3>
|
156
|
+
<pre class="programlisting">int cairo_format_stride_for_width (<a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t">cairo_format_t</a> format,
|
157
|
+
int width);</pre>
|
158
|
+
<p>
|
159
|
+
This function provides a stride value that will respect all
|
160
|
+
alignment requirements of the accelerated image-rendering code
|
161
|
+
within cairo. Typical usage will be of the form:
|
162
|
+
</p>
|
163
|
+
<p>
|
164
|
+
</p>
|
165
|
+
<div class="informalexample"><pre class="programlisting">
|
166
|
+
int stride;
|
167
|
+
unsigned char *data;
|
168
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface;
|
169
|
+
|
170
|
+
stride = cairo_format_stride_for_width (format, width);
|
171
|
+
data = malloc (stride * height);
|
172
|
+
surface = cairo_image_surface_create_for_data (data, format,
|
173
|
+
width, height,
|
174
|
+
stride);
|
175
|
+
</pre></div>
|
176
|
+
<p>
|
177
|
+
|
178
|
+
</p>
|
179
|
+
<div class="variablelist"><table border="0">
|
180
|
+
<col align="left" valign="top">
|
181
|
+
<tbody>
|
182
|
+
<tr>
|
183
|
+
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
|
184
|
+
<td> A <a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t"><span class="type">cairo_format_t</span></a> value
|
185
|
+
</td>
|
186
|
+
</tr>
|
187
|
+
<tr>
|
188
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
189
|
+
<td> The desired width of an image surface to be created.
|
190
|
+
</td>
|
191
|
+
</tr>
|
192
|
+
<tr>
|
193
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
194
|
+
<td> the appropriate stride to use given the desired
|
195
|
+
format and width, or -1 if either the format is invalid or the width
|
196
|
+
too large.
|
197
|
+
|
198
|
+
</td>
|
199
|
+
</tr>
|
200
|
+
</tbody>
|
201
|
+
</table></div>
|
202
|
+
<p class="since">Since 1.6
|
203
|
+
</p>
|
204
|
+
</div>
|
205
|
+
<hr>
|
206
|
+
<div class="refsect2" lang="en">
|
207
|
+
<a name="cairo-image-surface-create"></a><h3>cairo_image_surface_create ()</h3>
|
208
|
+
<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 (<a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t">cairo_format_t</a> format,
|
209
|
+
int width,
|
210
|
+
int height);</pre>
|
211
|
+
<p>
|
212
|
+
Creates an image surface of the specified format and
|
213
|
+
dimensions. Initially the surface contents are all
|
214
|
+
0. (Specifically, within each pixel, each color or alpha channel
|
215
|
+
belonging to format will be 0. The contents of bits within a pixel,
|
216
|
+
but not belonging to the given format are undefined).</p>
|
217
|
+
<p>
|
218
|
+
|
219
|
+
</p>
|
220
|
+
<div class="variablelist"><table border="0">
|
221
|
+
<col align="left" valign="top">
|
222
|
+
<tbody>
|
223
|
+
<tr>
|
224
|
+
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
|
225
|
+
<td> format of pixels in the surface to create
|
226
|
+
</td>
|
227
|
+
</tr>
|
228
|
+
<tr>
|
229
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
230
|
+
<td> width of the surface, in pixels
|
231
|
+
</td>
|
232
|
+
</tr>
|
233
|
+
<tr>
|
234
|
+
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
235
|
+
<td> height of the surface, in pixels
|
236
|
+
</td>
|
237
|
+
</tr>
|
238
|
+
<tr>
|
239
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
240
|
+
<td> a pointer to the newly created surface. The caller
|
241
|
+
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
|
242
|
+
with it.
|
243
|
+
|
244
|
+
This function always returns a valid pointer, but it will return a
|
245
|
+
pointer to a "nil" surface if an error such as out of memory
|
246
|
+
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.
|
247
|
+
</td>
|
248
|
+
</tr>
|
249
|
+
</tbody>
|
250
|
+
</table></div>
|
251
|
+
</div>
|
252
|
+
<hr>
|
253
|
+
<div class="refsect2" lang="en">
|
254
|
+
<a name="cairo-image-surface-create-for-data"></a><h3>cairo_image_surface_create_for_data ()</h3>
|
255
|
+
<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_for_data (unsigned char *data,
|
256
|
+
<a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t">cairo_format_t</a> format,
|
257
|
+
int width,
|
258
|
+
int height,
|
259
|
+
int stride);</pre>
|
260
|
+
<p>
|
261
|
+
Creates an image surface for the provided pixel data. The output
|
262
|
+
buffer must be kept around until the <a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> is destroyed
|
263
|
+
or <a class="link" href="cairo-surface.html#cairo-surface-finish" title="cairo_surface_finish ()"><code class="function">cairo_surface_finish()</code></a> is called on the surface. The initial
|
264
|
+
contents of <em class="parameter"><code>buffer</code></em> will be used as the initial image contents; you
|
265
|
+
must explicitly clear the buffer, using, for example,
|
266
|
+
<a class="link" href="cairo-paths.html#cairo-rectangle" title="cairo_rectangle ()"><code class="function">cairo_rectangle()</code></a> and <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a> if you want it cleared.
|
267
|
+
</p>
|
268
|
+
<p>
|
269
|
+
Note that the stride may be larger than
|
270
|
+
width*bytes_per_pixel to provide proper alignment for each pixel
|
271
|
+
and row. This alignment is required to allow high-performance rendering
|
272
|
+
within cairo. The correct way to obtain a legal stride value is to
|
273
|
+
call <a class="link" href="cairo-image-surface.html#cairo-format-stride-for-width" title="cairo_format_stride_for_width ()"><code class="function">cairo_format_stride_for_width()</code></a> with the desired format and
|
274
|
+
maximum image width value, and the use the resulting stride value
|
275
|
+
to allocate the data and to create the image surface. See
|
276
|
+
<a class="link" href="cairo-image-surface.html#cairo-format-stride-for-width" title="cairo_format_stride_for_width ()"><code class="function">cairo_format_stride_for_width()</code></a> for example code.</p>
|
277
|
+
<p>
|
278
|
+
|
279
|
+
</p>
|
280
|
+
<div class="variablelist"><table border="0">
|
281
|
+
<col align="left" valign="top">
|
282
|
+
<tbody>
|
283
|
+
<tr>
|
284
|
+
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
285
|
+
<td> a pointer to a buffer supplied by the application in which
|
286
|
+
to write contents. This pointer must be suitably aligned for any
|
287
|
+
kind of variable, (for example, a pointer returned by malloc).
|
288
|
+
</td>
|
289
|
+
</tr>
|
290
|
+
<tr>
|
291
|
+
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
|
292
|
+
<td> the format of pixels in the buffer
|
293
|
+
</td>
|
294
|
+
</tr>
|
295
|
+
<tr>
|
296
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
297
|
+
<td> the width of the image to be stored in the buffer
|
298
|
+
</td>
|
299
|
+
</tr>
|
300
|
+
<tr>
|
301
|
+
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
302
|
+
<td> the height of the image to be stored in the buffer
|
303
|
+
</td>
|
304
|
+
</tr>
|
305
|
+
<tr>
|
306
|
+
<td><p><span class="term"><em class="parameter"><code>stride</code></em> :</span></p></td>
|
307
|
+
<td> the number of bytes between the start of rows in the
|
308
|
+
buffer as allocated. This value should always be computed by
|
309
|
+
<a class="link" href="cairo-image-surface.html#cairo-format-stride-for-width" title="cairo_format_stride_for_width ()"><code class="function">cairo_format_stride_for_width()</code></a> before allocating the data
|
310
|
+
buffer.
|
311
|
+
</td>
|
312
|
+
</tr>
|
313
|
+
<tr>
|
314
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
315
|
+
<td> a pointer to the newly created surface. The caller
|
316
|
+
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
|
317
|
+
with it.
|
318
|
+
|
319
|
+
This function always returns a valid pointer, but it will return a
|
320
|
+
pointer to a "nil" surface in the case of an error such as out of
|
321
|
+
memory or an invalid stride value. In case of invalid stride value
|
322
|
+
the error status of the returned surface will be
|
323
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-INVALID-STRIDE:CAPS"><code class="literal">CAIRO_STATUS_INVALID_STRIDE</code></a>. You can use
|
324
|
+
<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.
|
325
|
+
|
326
|
+
See <a class="link" href="cairo-surface.html#cairo-surface-set-user-data" title="cairo_surface_set_user_data ()"><code class="function">cairo_surface_set_user_data()</code></a> for a means of attaching a
|
327
|
+
destroy-notification fallback to the surface if necessary.
|
328
|
+
</td>
|
329
|
+
</tr>
|
330
|
+
</tbody>
|
331
|
+
</table></div>
|
332
|
+
</div>
|
333
|
+
<hr>
|
334
|
+
<div class="refsect2" lang="en">
|
335
|
+
<a name="cairo-image-surface-get-data"></a><h3>cairo_image_surface_get_data ()</h3>
|
336
|
+
<pre class="programlisting">unsigned char* cairo_image_surface_get_data (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface);</pre>
|
337
|
+
<p>
|
338
|
+
Get a pointer to the data of the image surface, for direct
|
339
|
+
inspection or modification.</p>
|
340
|
+
<p>
|
341
|
+
|
342
|
+
</p>
|
343
|
+
<div class="variablelist"><table border="0">
|
344
|
+
<col align="left" valign="top">
|
345
|
+
<tbody>
|
346
|
+
<tr>
|
347
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
348
|
+
<td> a <span class="type">cairo_image_surface_t</span>
|
349
|
+
</td>
|
350
|
+
</tr>
|
351
|
+
<tr>
|
352
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
353
|
+
<td> a pointer to the image data of this surface or <code class="literal">NULL</code>
|
354
|
+
if <em class="parameter"><code>surface</code></em> is not an image surface.
|
355
|
+
|
356
|
+
</td>
|
357
|
+
</tr>
|
358
|
+
</tbody>
|
359
|
+
</table></div>
|
360
|
+
<p class="since">Since 1.2
|
361
|
+
</p>
|
362
|
+
</div>
|
363
|
+
<hr>
|
364
|
+
<div class="refsect2" lang="en">
|
365
|
+
<a name="cairo-image-surface-get-format"></a><h3>cairo_image_surface_get_format ()</h3>
|
366
|
+
<pre class="programlisting"><a class="link" href="cairo-image-surface.html#cairo-format-t" title="enum cairo_format_t">cairo_format_t</a> cairo_image_surface_get_format (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface);</pre>
|
367
|
+
<p>
|
368
|
+
Get the format of the surface.</p>
|
369
|
+
<p>
|
370
|
+
|
371
|
+
</p>
|
372
|
+
<div class="variablelist"><table border="0">
|
373
|
+
<col align="left" valign="top">
|
374
|
+
<tbody>
|
375
|
+
<tr>
|
376
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
377
|
+
<td> a <span class="type">cairo_image_surface_t</span>
|
378
|
+
</td>
|
379
|
+
</tr>
|
380
|
+
<tr>
|
381
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
382
|
+
<td> the format of the surface
|
383
|
+
|
384
|
+
</td>
|
385
|
+
</tr>
|
386
|
+
</tbody>
|
387
|
+
</table></div>
|
388
|
+
<p class="since">Since 1.2
|
389
|
+
</p>
|
390
|
+
</div>
|
391
|
+
<hr>
|
392
|
+
<div class="refsect2" lang="en">
|
393
|
+
<a name="cairo-image-surface-get-width"></a><h3>cairo_image_surface_get_width ()</h3>
|
394
|
+
<pre class="programlisting">int cairo_image_surface_get_width (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface);</pre>
|
395
|
+
<p>
|
396
|
+
Get the width of the image surface in pixels.</p>
|
397
|
+
<p>
|
398
|
+
|
399
|
+
</p>
|
400
|
+
<div class="variablelist"><table border="0">
|
401
|
+
<col align="left" valign="top">
|
402
|
+
<tbody>
|
403
|
+
<tr>
|
404
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
405
|
+
<td> a <span class="type">cairo_image_surface_t</span>
|
406
|
+
</td>
|
407
|
+
</tr>
|
408
|
+
<tr>
|
409
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
410
|
+
<td> the width of the surface in pixels.
|
411
|
+
</td>
|
412
|
+
</tr>
|
413
|
+
</tbody>
|
414
|
+
</table></div>
|
415
|
+
</div>
|
416
|
+
<hr>
|
417
|
+
<div class="refsect2" lang="en">
|
418
|
+
<a name="cairo-image-surface-get-height"></a><h3>cairo_image_surface_get_height ()</h3>
|
419
|
+
<pre class="programlisting">int cairo_image_surface_get_height (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface);</pre>
|
420
|
+
<p>
|
421
|
+
Get the height of the image surface in pixels.</p>
|
422
|
+
<p>
|
423
|
+
|
424
|
+
</p>
|
425
|
+
<div class="variablelist"><table border="0">
|
426
|
+
<col align="left" valign="top">
|
427
|
+
<tbody>
|
428
|
+
<tr>
|
429
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
430
|
+
<td> a <span class="type">cairo_image_surface_t</span>
|
431
|
+
</td>
|
432
|
+
</tr>
|
433
|
+
<tr>
|
434
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
435
|
+
<td> the height of the surface in pixels.
|
436
|
+
</td>
|
437
|
+
</tr>
|
438
|
+
</tbody>
|
439
|
+
</table></div>
|
440
|
+
</div>
|
441
|
+
<hr>
|
442
|
+
<div class="refsect2" lang="en">
|
443
|
+
<a name="cairo-image-surface-get-stride"></a><h3>cairo_image_surface_get_stride ()</h3>
|
444
|
+
<pre class="programlisting">int cairo_image_surface_get_stride (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface);</pre>
|
445
|
+
<p>
|
446
|
+
Get the stride of the image surface in bytes</p>
|
447
|
+
<p>
|
448
|
+
|
449
|
+
</p>
|
450
|
+
<div class="variablelist"><table border="0">
|
451
|
+
<col align="left" valign="top">
|
452
|
+
<tbody>
|
453
|
+
<tr>
|
454
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
455
|
+
<td> a <span class="type">cairo_image_surface_t</span>
|
456
|
+
</td>
|
457
|
+
</tr>
|
458
|
+
<tr>
|
459
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
460
|
+
<td> the stride of the image surface in bytes (or 0 if
|
461
|
+
<em class="parameter"><code>surface</code></em> is not an image surface). The stride is the distance in
|
462
|
+
bytes from the beginning of one row of the image data to the
|
463
|
+
beginning of the next row.
|
464
|
+
|
465
|
+
</td>
|
466
|
+
</tr>
|
467
|
+
</tbody>
|
468
|
+
</table></div>
|
469
|
+
<p class="since">Since 1.2
|
470
|
+
</p>
|
471
|
+
</div>
|
472
|
+
</div>
|
473
|
+
<div class="refsect1" lang="en">
|
474
|
+
<a name="cairo-image-surface.see-also"></a><h2>See Also</h2>
|
475
|
+
<p>
|
476
|
+
</p>
|
477
|
+
<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>
|
478
|
+
<p>
|
479
|
+
</p>
|
480
|
+
</div>
|
481
|
+
</div>
|
482
|
+
<div class="footer">
|
483
|
+
<hr>
|
484
|
+
Generated by GTK-Doc V1.10</div>
|
485
|
+
</body>
|
486
|
+
</html>
|