cairo 1.7.0-x86-mswin32 → 1.8.0-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cairo might be problematic. Click here for more details.
- data/ChangeLog +32 -0
- data/NEWS +9 -1
- data/README +1 -0
- data/Rakefile +2 -2
- data/cairo/DLL_FAQ.txt +397 -0
- data/cairo/README.txt +53 -0
- data/cairo/USAGE.txt +94 -0
- data/cairo/bin/libcairo-2.dll +0 -0
- data/cairo/bin/libpng12-0.dll +0 -0
- data/cairo/bin/zlib1.dll +0 -0
- data/cairo/include/cairo/cairo-deprecated.h +0 -4
- data/cairo/include/cairo/cairo-features.h +7 -22
- data/cairo/include/cairo/cairo-pdf.h +1 -1
- data/cairo/include/cairo/cairo-ps.h +1 -1
- data/cairo/include/cairo/cairo-svg.h +1 -1
- data/cairo/include/cairo/cairo-version.h +8 -0
- data/cairo/include/cairo/cairo-win32.h +9 -1
- data/cairo/include/cairo/cairo.h +420 -32
- data/cairo/include/libpng12/png.h +3592 -0
- data/cairo/include/libpng12/pngconf.h +1481 -0
- data/cairo/include/png.h +36 -13
- data/cairo/include/pngconf.h +3 -3
- data/cairo/include/zconf.h +332 -0
- data/cairo/include/zlib.h +1357 -0
- data/cairo/lib/cairo.def +22 -0
- data/cairo/lib/cairo.lib +0 -0
- data/cairo/lib/libcairo.dll.a +0 -0
- data/cairo/lib/libpng.def +1 -0
- data/cairo/lib/libpng.lib +0 -0
- data/cairo/lib/libpng12.dll.a +0 -0
- data/cairo/lib/pkgconfig/cairo-pdf.pc +5 -5
- data/cairo/lib/pkgconfig/cairo-png.pc +5 -5
- data/cairo/lib/pkgconfig/cairo-ps.pc +5 -5
- data/cairo/lib/pkgconfig/cairo-svg.pc +4 -4
- data/cairo/lib/pkgconfig/cairo-win32-font.pc +4 -4
- data/cairo/lib/pkgconfig/cairo-win32.pc +4 -4
- data/cairo/lib/pkgconfig/cairo.pc +4 -4
- data/cairo/lib/pkgconfig/libpng.pc +3 -2
- data/cairo/lib/pkgconfig/libpng12.pc +3 -2
- data/cairo/lib/zdll.exp +0 -0
- data/cairo/lib/zdll.lib +0 -0
- data/cairo/lib/zlib.def +60 -0
- data/cairo/manifest/cairo-dev_1.8.0-1_win32.mft +76 -0
- data/cairo/manifest/cairo_1.8.0-1_win32.mft +5 -0
- data/cairo/manifest/{libpng-dev-1.2.29.mft → libpng-dev_1.2.32-1_win32.mft} +5 -2
- data/cairo/manifest/libpng_1.2.32-1_win32.mft +2 -0
- data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING +0 -0
- data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING-LGPL-2.1 +0 -0
- data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING-MPL-1.1 +0 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-errors.html +15 -11
- data/cairo/share/gtk-doc/html/cairo/bindings-fonts.html +15 -11
- data/cairo/share/gtk-doc/html/cairo/bindings-memory.html +20 -16
- data/cairo/share/gtk-doc/html/cairo/bindings-overloading.html +16 -12
- data/cairo/share/gtk-doc/html/cairo/bindings-path.html +17 -13
- data/cairo/share/gtk-doc/html/cairo/bindings-patterns.html +25 -21
- data/cairo/share/gtk-doc/html/cairo/bindings-return-values.html +17 -13
- data/cairo/share/gtk-doc/html/cairo/bindings-streams.html +14 -10
- data/cairo/share/gtk-doc/html/cairo/bindings-surfaces.html +19 -15
- data/cairo/share/gtk-doc/html/cairo/cairo-context.html +2721 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-drawing.html +57 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-error-status.html +361 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-font-face.html +418 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-font-options.html +695 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-fonts.html +63 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-ft-font.html +318 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-image-surface.html +486 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-cairo-matrix-t.html → cairo-matrix.html} +137 -156
- data/cairo/share/gtk-doc/html/cairo/{cairo-Paths.html → cairo-paths.html} +275 -306
- data/cairo/share/gtk-doc/html/cairo/cairo-pattern.html +1524 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-PDF-Surfaces.html → cairo-pdf-surface.html} +60 -70
- data/cairo/share/gtk-doc/html/cairo/cairo-png-functions.html +332 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-PostScript-Surfaces.html → cairo-ps-surface.html} +131 -150
- data/cairo/share/gtk-doc/html/cairo/cairo-quartz-font.html +153 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-Quartz-Surfaces.html → cairo-quartz-surface.html} +53 -62
- data/cairo/share/gtk-doc/html/cairo/cairo-scaled-font.html +1051 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-support.html +54 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-surface.html +1064 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-surfaces.html +69 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-svg-surface.html +324 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-text.html +1264 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-Transformations.html → cairo-transformations.html} +98 -115
- data/cairo/share/gtk-doc/html/cairo/cairo-types.html +134 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-user-font.html +769 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-version-info.html +355 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-win32-font.html +366 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-win32-surface.html +321 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-XLib-Surfaces.html → cairo-xlib-surface.html} +104 -121
- data/cairo/share/gtk-doc/html/cairo/cairo.devhelp +390 -405
- data/cairo/share/gtk-doc/html/cairo/cairo.devhelp2 +390 -405
- data/cairo/share/gtk-doc/html/cairo/index-1.2.html +63 -59
- data/cairo/share/gtk-doc/html/cairo/index-1.4.html +45 -41
- data/cairo/share/gtk-doc/html/cairo/index-1.6.html +29 -23
- data/cairo/share/gtk-doc/html/cairo/index-1.8.html +107 -0
- data/cairo/share/gtk-doc/html/cairo/index-all.html +759 -0
- data/cairo/share/gtk-doc/html/cairo/index.html +51 -41
- data/cairo/share/gtk-doc/html/cairo/index.sgml +478 -466
- data/cairo/share/gtk-doc/html/cairo/language-bindings.html +22 -18
- data/cairo/share/gtk-doc/html/cairo/style.css +14 -2
- data/cairo/share/man/man3/libpng.3 +443 -17
- data/cairo/share/man/man3/libpngpf.3 +618 -102
- data/cairo/share/man/man5/png.5 +1 -1
- data/cairo/src/tml/make/cairo_1.8.0-1_win32.log +1021 -0
- data/cairo/src/tml/make/cairo_1.8.0-1_win32.sh +68 -0
- data/cairo/src/tml/make/libpng_1.2.32-1_win32.log +269 -0
- data/cairo/src/tml/make/libpng_1.2.32-1_win32.sh +63 -0
- data/cairo/test/example_d.exe +0 -0
- data/cairo/test/minigzip_d.exe +0 -0
- data/cairo/test/testzlib_d.exe +0 -0
- data/cairo/test/untgz_d.exe +0 -0
- data/doc/en/cairo-context.html +81 -91
- data/doc/en/cairo-font-options.html +11 -26
- data/doc/en/cairo-text-cluster-flag.html +35 -0
- data/doc/en/cairo-user-font-face-text-to-glyphs-data.html +3 -3
- data/doc/en/cairo.html +38 -42
- data/doc/en/index.html +129 -142
- data/doc/ja/cairo-font-options.html +3 -25
- data/doc/ja/cairo-text-cluster-flag.html +46 -0
- data/doc/ja/cairo-user-font-face-text-to-glyphs-data.html +16 -15
- data/doc/ja/cairo.html +3 -7
- data/doc/ja/index.html +9 -17
- data/src/cairo.def +1 -1
- data/src/cairo.so +0 -0
- data/src/lib/cairo/constants.rb +3 -1
- data/src/libruby-cairo.a +0 -0
- data/src/rb_cairo.c +2 -2
- data/src/rb_cairo.h +5 -5
- data/src/rb_cairo_constants.c +12 -19
- data/src/rb_cairo_context.c +25 -21
- data/src/rb_cairo_font_face.c +44 -29
- data/src/rb_cairo_font_options.c +1 -23
- data/src/rb_cairo_scaled_font.c +5 -5
- data/test/test_constants.rb +6 -9
- data/test/test_context.rb +0 -12
- data/test/test_font_face.rb +7 -7
- data/test/test_font_options.rb +2 -21
- data/test/test_scaled_font.rb +3 -3
- data/test/test_text_to_glyphs_data.rb +19 -15
- metadata +68 -45
- data/cairo/make/cairo-1.6.4-2.sh +0 -55
- data/cairo/make/libpng-1.2.29.sh +0 -35
- data/cairo/manifest/cairo-1.6.4-2.mft +0 -6
- data/cairo/manifest/cairo-dev-1.6.4-2.mft +0 -72
- data/cairo/manifest/libpng-1.2.29.mft +0 -2
- data/cairo/share/gtk-doc/html/cairo/Drawing.html +0 -53
- data/cairo/share/gtk-doc/html/cairo/Fonts.html +0 -56
- data/cairo/share/gtk-doc/html/cairo/Support.html +0 -50
- data/cairo/share/gtk-doc/html/cairo/Surfaces.html +0 -65
- data/cairo/share/gtk-doc/html/cairo/cairo-Error-Handling.html +0 -328
- data/cairo/share/gtk-doc/html/cairo/cairo-Font-Options.html +0 -720
- data/cairo/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +0 -297
- data/cairo/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +0 -484
- data/cairo/share/gtk-doc/html/cairo/cairo-PNG-Support.html +0 -345
- data/cairo/share/gtk-doc/html/cairo/cairo-Patterns.html +0 -1560
- data/cairo/share/gtk-doc/html/cairo/cairo-Quartz-Fonts.html +0 -161
- data/cairo/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +0 -337
- data/cairo/share/gtk-doc/html/cairo/cairo-Scaled-Fonts.html +0 -823
- data/cairo/share/gtk-doc/html/cairo/cairo-Text.html +0 -836
- data/cairo/share/gtk-doc/html/cairo/cairo-Types.html +0 -143
- data/cairo/share/gtk-doc/html/cairo/cairo-Version-Information.html +0 -325
- data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +0 -381
- data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +0 -331
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +0 -427
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +0 -995
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-t.html +0 -2795
- data/cairo/share/gtk-doc/html/cairo/ix01.html +0 -693
- data/doc/en/cairo-lcd-filter.html +0 -39
- data/doc/ja/cairo-lcd-filter.html +0 -63
@@ -1,24 +1,25 @@
|
|
1
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
5
|
<title>Surfaces</title>
|
6
6
|
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
7
|
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
-
<link rel="up" href="language-bindings.html" title="Appendix
|
8
|
+
<link rel="up" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
|
9
9
|
<link rel="prev" href="bindings-patterns.html" title="Patterns">
|
10
10
|
<link rel="next" href="bindings-fonts.html" title="Fonts">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.
|
11
|
+
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
|
12
12
|
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
-
<link rel="chapter" href="
|
14
|
-
<link rel="chapter" href="
|
15
|
-
<link rel="chapter" href="
|
16
|
-
<link rel="chapter" href="
|
17
|
-
<link rel="index" href="
|
13
|
+
<link rel="chapter" href="cairo-drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="cairo-fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="cairo-support.html" title="Utilities">
|
17
|
+
<link rel="index" href="index-all.html" title="Index">
|
18
18
|
<link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
|
19
19
|
<link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
|
20
20
|
<link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
|
21
|
-
<link rel="
|
21
|
+
<link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
|
22
|
+
<link rel="appendix" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
|
22
23
|
</head>
|
23
24
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
24
25
|
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
|
@@ -33,7 +34,7 @@
|
|
33
34
|
<a name="bindings-surfaces"></a>Surfaces</h2></div></div></div>
|
34
35
|
<p>
|
35
36
|
Like patterns, surfaces, which use only the
|
36
|
-
<a class="link" href="cairo-
|
37
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
37
38
|
type in the C API should be broken up into a hierarchy of types
|
38
39
|
in a language binding.
|
39
40
|
</p>
|
@@ -65,15 +66,15 @@ cairo_surface_t
|
|
65
66
|
ways to get references to platform specific surfaces.
|
66
67
|
</p>
|
67
68
|
<p>
|
68
|
-
The <a class="link" href="cairo-
|
69
|
-
and <a class="link" href="cairo-
|
69
|
+
The <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>,
|
70
|
+
and <a class="link" href="cairo-surface.html#cairo-surface-get-user-data" title="cairo_surface_get_user_data ()"><code class="function">cairo_surface_get_user_data()</code></a>
|
70
71
|
methods are provided for use in language bindings, and should
|
71
72
|
not be directly exposed to applications. One example of the use
|
72
73
|
of these functions in a language binding is creating a binding for:
|
73
74
|
</p>
|
74
75
|
<pre class="programlisting">
|
75
76
|
cairo_surface_t *
|
76
|
-
<a class="link" href="cairo-
|
77
|
+
<a class="link" href="cairo-image-surface.html#cairo-image-surface-create-for-data" title="cairo_image_surface_create_for_data ()"><code class="function">cairo_image_surface_create_for_data</code></a> (unsigned char *data,
|
77
78
|
cairo_format_t format,
|
78
79
|
int width,
|
79
80
|
int height,
|
@@ -87,13 +88,16 @@ cairo_surface_t *
|
|
87
88
|
argument to <code class="function">cairo_surface_set_user_data()</code>.
|
88
89
|
</p>
|
89
90
|
<p class="remark"><i><span class="remark">
|
90
|
-
Some languages may not have a suitable
|
91
|
-
data
|
91
|
+
Some languages may not have a suitable “pointer to a block of
|
92
|
+
data” type to pass in for <em class="parameter"><code>data</code></em>. And even
|
92
93
|
where a language does have such a type, the user will be
|
93
94
|
frequently able to cause the backing store to be reallocated
|
94
95
|
to a different location or truncated. Should we recommend a
|
95
96
|
standard type name and binding for a buffer object here?
|
96
97
|
</span></i></p>
|
97
98
|
</div>
|
99
|
+
<div class="footer">
|
100
|
+
<hr>
|
101
|
+
Generated by GTK-Doc V1.10</div>
|
98
102
|
</body>
|
99
103
|
</html>
|
@@ -0,0 +1,2721 @@
|
|
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>cairo_t</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-drawing.html" title="Drawing">
|
9
|
+
<link rel="prev" href="cairo-drawing.html" title="Drawing">
|
10
|
+
<link rel="next" href="cairo-paths.html" title="Paths">
|
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-drawing.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
28
|
+
<td><a accesskey="u" href="cairo-drawing.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-paths.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-context.synopsis" class="shortcut">Top</a>
|
34
|
+
|
|
35
|
+
<a href="#cairo-context.description" class="shortcut">Description</a></nobr></td></tr>
|
36
|
+
</table>
|
37
|
+
<div class="refentry" lang="en">
|
38
|
+
<a name="cairo-context"></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-context.top_of_page"></a>cairo_t</span></h2>
|
42
|
+
<p>cairo_t — The cairo drawing context</p>
|
43
|
+
</td>
|
44
|
+
<td valign="top" align="right"></td>
|
45
|
+
</tr></table></div>
|
46
|
+
<div class="refsynopsisdiv">
|
47
|
+
<a name="cairo-context.synopsis"></a><h2>Synopsis</h2>
|
48
|
+
<pre class="synopsis">
|
49
|
+
typedef <a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a>;
|
50
|
+
<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a>* <a class="link" href="cairo-context.html#cairo-create" title="cairo_create ()">cairo_create</a> (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *target);
|
51
|
+
<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a>* <a class="link" href="cairo-context.html#cairo-reference" title="cairo_reference ()">cairo_reference</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
52
|
+
void <a class="link" href="cairo-context.html#cairo-destroy" title="cairo_destroy ()">cairo_destroy</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
53
|
+
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> <a class="link" href="cairo-context.html#cairo-status" title="cairo_status ()">cairo_status</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
54
|
+
void <a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()">cairo_save</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
55
|
+
void <a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()">cairo_restore</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
56
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* <a class="link" href="cairo-context.html#cairo-get-target" title="cairo_get_target ()">cairo_get_target</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
57
|
+
void <a class="link" href="cairo-context.html#cairo-push-group" title="cairo_push_group ()">cairo_push_group</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
58
|
+
void <a class="link" href="cairo-context.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()">cairo_push_group_with_content</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
59
|
+
<a class="link" href="cairo-surface.html#cairo-content-t" title="enum cairo_content_t">cairo_content_t</a> content);
|
60
|
+
<a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a>* <a class="link" href="cairo-context.html#cairo-pop-group" title="cairo_pop_group ()">cairo_pop_group</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
61
|
+
void <a class="link" href="cairo-context.html#cairo-pop-group-to-source" title="cairo_pop_group_to_source ()">cairo_pop_group_to_source</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
62
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* <a class="link" href="cairo-context.html#cairo-get-group-target" title="cairo_get_group_target ()">cairo_get_group_target</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
63
|
+
void <a class="link" href="cairo-context.html#cairo-set-source-rgb" title="cairo_set_source_rgb ()">cairo_set_source_rgb</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
64
|
+
double red,
|
65
|
+
double green,
|
66
|
+
double blue);
|
67
|
+
void <a class="link" href="cairo-context.html#cairo-set-source-rgba" title="cairo_set_source_rgba ()">cairo_set_source_rgba</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
68
|
+
double red,
|
69
|
+
double green,
|
70
|
+
double blue,
|
71
|
+
double alpha);
|
72
|
+
void <a class="link" href="cairo-context.html#cairo-set-source" title="cairo_set_source ()">cairo_set_source</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
73
|
+
<a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a> *source);
|
74
|
+
void <a class="link" href="cairo-context.html#cairo-set-source-surface" title="cairo_set_source_surface ()">cairo_set_source_surface</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
75
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
76
|
+
double x,
|
77
|
+
double y);
|
78
|
+
<a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a>* <a class="link" href="cairo-context.html#cairo-get-source" title="cairo_get_source ()">cairo_get_source</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
79
|
+
enum <a class="link" href="cairo-context.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a>;
|
80
|
+
void <a class="link" href="cairo-context.html#cairo-set-antialias" title="cairo_set_antialias ()">cairo_set_antialias</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
81
|
+
<a class="link" href="cairo-context.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a> antialias);
|
82
|
+
<a class="link" href="cairo-context.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a> <a class="link" href="cairo-context.html#cairo-get-antialias" title="cairo_get_antialias ()">cairo_get_antialias</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
83
|
+
void <a class="link" href="cairo-context.html#cairo-set-dash" title="cairo_set_dash ()">cairo_set_dash</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
84
|
+
const double *dashes,
|
85
|
+
int num_dashes,
|
86
|
+
double offset);
|
87
|
+
int <a class="link" href="cairo-context.html#cairo-get-dash-count" title="cairo_get_dash_count ()">cairo_get_dash_count</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
88
|
+
void <a class="link" href="cairo-context.html#cairo-get-dash" title="cairo_get_dash ()">cairo_get_dash</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
89
|
+
double *dashes,
|
90
|
+
double *offset);
|
91
|
+
enum <a class="link" href="cairo-context.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t">cairo_fill_rule_t</a>;
|
92
|
+
void <a class="link" href="cairo-context.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()">cairo_set_fill_rule</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
93
|
+
<a class="link" href="cairo-context.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t">cairo_fill_rule_t</a> fill_rule);
|
94
|
+
<a class="link" href="cairo-context.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t">cairo_fill_rule_t</a> <a class="link" href="cairo-context.html#cairo-get-fill-rule" title="cairo_get_fill_rule ()">cairo_get_fill_rule</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
95
|
+
enum <a class="link" href="cairo-context.html#cairo-line-cap-t" title="enum cairo_line_cap_t">cairo_line_cap_t</a>;
|
96
|
+
void <a class="link" href="cairo-context.html#cairo-set-line-cap" title="cairo_set_line_cap ()">cairo_set_line_cap</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
97
|
+
<a class="link" href="cairo-context.html#cairo-line-cap-t" title="enum cairo_line_cap_t">cairo_line_cap_t</a> line_cap);
|
98
|
+
<a class="link" href="cairo-context.html#cairo-line-cap-t" title="enum cairo_line_cap_t">cairo_line_cap_t</a> <a class="link" href="cairo-context.html#cairo-get-line-cap" title="cairo_get_line_cap ()">cairo_get_line_cap</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
99
|
+
enum <a class="link" href="cairo-context.html#cairo-line-join-t" title="enum cairo_line_join_t">cairo_line_join_t</a>;
|
100
|
+
void <a class="link" href="cairo-context.html#cairo-set-line-join" title="cairo_set_line_join ()">cairo_set_line_join</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
101
|
+
<a class="link" href="cairo-context.html#cairo-line-join-t" title="enum cairo_line_join_t">cairo_line_join_t</a> line_join);
|
102
|
+
<a class="link" href="cairo-context.html#cairo-line-join-t" title="enum cairo_line_join_t">cairo_line_join_t</a> <a class="link" href="cairo-context.html#cairo-get-line-join" title="cairo_get_line_join ()">cairo_get_line_join</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
103
|
+
void <a class="link" href="cairo-context.html#cairo-set-line-width" title="cairo_set_line_width ()">cairo_set_line_width</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
104
|
+
double width);
|
105
|
+
double <a class="link" href="cairo-context.html#cairo-get-line-width" title="cairo_get_line_width ()">cairo_get_line_width</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
106
|
+
void <a class="link" href="cairo-context.html#cairo-set-miter-limit" title="cairo_set_miter_limit ()">cairo_set_miter_limit</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
107
|
+
double limit);
|
108
|
+
double <a class="link" href="cairo-context.html#cairo-get-miter-limit" title="cairo_get_miter_limit ()">cairo_get_miter_limit</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
109
|
+
enum <a class="link" href="cairo-context.html#cairo-operator-t" title="enum cairo_operator_t">cairo_operator_t</a>;
|
110
|
+
void <a class="link" href="cairo-context.html#cairo-set-operator" title="cairo_set_operator ()">cairo_set_operator</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
111
|
+
<a class="link" href="cairo-context.html#cairo-operator-t" title="enum cairo_operator_t">cairo_operator_t</a> op);
|
112
|
+
<a class="link" href="cairo-context.html#cairo-operator-t" title="enum cairo_operator_t">cairo_operator_t</a> <a class="link" href="cairo-context.html#cairo-get-operator" title="cairo_get_operator ()">cairo_get_operator</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
113
|
+
void <a class="link" href="cairo-context.html#cairo-set-tolerance" title="cairo_set_tolerance ()">cairo_set_tolerance</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
114
|
+
double tolerance);
|
115
|
+
double <a class="link" href="cairo-context.html#cairo-get-tolerance" title="cairo_get_tolerance ()">cairo_get_tolerance</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
116
|
+
void <a class="link" href="cairo-context.html#cairo-clip" title="cairo_clip ()">cairo_clip</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
117
|
+
void <a class="link" href="cairo-context.html#cairo-clip-preserve" title="cairo_clip_preserve ()">cairo_clip_preserve</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
118
|
+
void <a class="link" href="cairo-context.html#cairo-clip-extents" title="cairo_clip_extents ()">cairo_clip_extents</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
119
|
+
double *x1,
|
120
|
+
double *y1,
|
121
|
+
double *x2,
|
122
|
+
double *y2);
|
123
|
+
void <a class="link" href="cairo-context.html#cairo-reset-clip" title="cairo_reset_clip ()">cairo_reset_clip</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
124
|
+
<a class="link" href="cairo-context.html#cairo-rectangle-t" title="cairo_rectangle_t">cairo_rectangle_t</a>;
|
125
|
+
<a class="link" href="cairo-context.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t">cairo_rectangle_list_t</a>;
|
126
|
+
void <a class="link" href="cairo-context.html#cairo-rectangle-list-destroy" title="cairo_rectangle_list_destroy ()">cairo_rectangle_list_destroy</a> (<a class="link" href="cairo-context.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t">cairo_rectangle_list_t</a> *rectangle_list);
|
127
|
+
<a class="link" href="cairo-context.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t">cairo_rectangle_list_t</a>* <a class="link" href="cairo-context.html#cairo-copy-clip-rectangle-list" title="cairo_copy_clip_rectangle_list ()">cairo_copy_clip_rectangle_list</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
128
|
+
void <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()">cairo_fill</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
129
|
+
void <a class="link" href="cairo-context.html#cairo-fill-preserve" title="cairo_fill_preserve ()">cairo_fill_preserve</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
130
|
+
void <a class="link" href="cairo-context.html#cairo-fill-extents" title="cairo_fill_extents ()">cairo_fill_extents</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
131
|
+
double *x1,
|
132
|
+
double *y1,
|
133
|
+
double *x2,
|
134
|
+
double *y2);
|
135
|
+
<a class="link" href="cairo-types.html#cairo-bool-t" title="cairo_bool_t">cairo_bool_t</a> <a class="link" href="cairo-context.html#cairo-in-fill" title="cairo_in_fill ()">cairo_in_fill</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
136
|
+
double x,
|
137
|
+
double y);
|
138
|
+
void <a class="link" href="cairo-context.html#cairo-mask" title="cairo_mask ()">cairo_mask</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
139
|
+
<a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a> *pattern);
|
140
|
+
void <a class="link" href="cairo-context.html#cairo-mask-surface" title="cairo_mask_surface ()">cairo_mask_surface</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
141
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
142
|
+
double surface_x,
|
143
|
+
double surface_y);
|
144
|
+
void <a class="link" href="cairo-context.html#cairo-paint" title="cairo_paint ()">cairo_paint</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
145
|
+
void <a class="link" href="cairo-context.html#cairo-paint-with-alpha" title="cairo_paint_with_alpha ()">cairo_paint_with_alpha</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
146
|
+
double alpha);
|
147
|
+
void <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()">cairo_stroke</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
148
|
+
void <a class="link" href="cairo-context.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()">cairo_stroke_preserve</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
149
|
+
void <a class="link" href="cairo-context.html#cairo-stroke-extents" title="cairo_stroke_extents ()">cairo_stroke_extents</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
150
|
+
double *x1,
|
151
|
+
double *y1,
|
152
|
+
double *x2,
|
153
|
+
double *y2);
|
154
|
+
<a class="link" href="cairo-types.html#cairo-bool-t" title="cairo_bool_t">cairo_bool_t</a> <a class="link" href="cairo-context.html#cairo-in-stroke" title="cairo_in_stroke ()">cairo_in_stroke</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
155
|
+
double x,
|
156
|
+
double y);
|
157
|
+
void <a class="link" href="cairo-context.html#cairo-copy-page" title="cairo_copy_page ()">cairo_copy_page</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
158
|
+
void <a class="link" href="cairo-context.html#cairo-show-page" title="cairo_show_page ()">cairo_show_page</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
159
|
+
unsigned int <a class="link" href="cairo-context.html#cairo-get-reference-count" title="cairo_get_reference_count ()">cairo_get_reference_count</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
160
|
+
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> <a class="link" href="cairo-context.html#cairo-set-user-data" title="cairo_set_user_data ()">cairo_set_user_data</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
161
|
+
const <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t">cairo_user_data_key_t</a> *key,
|
162
|
+
void *user_data,
|
163
|
+
<a class="link" href="cairo-types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()">cairo_destroy_func_t</a> destroy);
|
164
|
+
void* <a class="link" href="cairo-context.html#cairo-get-user-data" title="cairo_get_user_data ()">cairo_get_user_data</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
165
|
+
const <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t">cairo_user_data_key_t</a> *key);
|
166
|
+
</pre>
|
167
|
+
</div>
|
168
|
+
<div class="refsect1" lang="en">
|
169
|
+
<a name="cairo-context.description"></a><h2>Description</h2>
|
170
|
+
<p>
|
171
|
+
<a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is the main object used when drawing with cairo. To
|
172
|
+
draw with cairo, you create a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>, set the target surface,
|
173
|
+
and drawing options for the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>, create shapes with
|
174
|
+
functions like <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a> and <a class="link" href="cairo-paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>, and then
|
175
|
+
draw shapes with <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a> or <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>.
|
176
|
+
</p>
|
177
|
+
<p>
|
178
|
+
<a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>'s can be pushed to a stack via <a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>.
|
179
|
+
They may then safely be changed, without loosing the current state.
|
180
|
+
Use <a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> to restore to the saved state.
|
181
|
+
</p>
|
182
|
+
</div>
|
183
|
+
<div class="refsect1" lang="en">
|
184
|
+
<a name="cairo-context.details"></a><h2>Details</h2>
|
185
|
+
<div class="refsect2" lang="en">
|
186
|
+
<a name="cairo-t"></a><h3>cairo_t</h3>
|
187
|
+
<pre class="programlisting">typedef struct _cairo cairo_t;
|
188
|
+
</pre>
|
189
|
+
<p>
|
190
|
+
A <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> contains the current state of the rendering device,
|
191
|
+
including coordinates of yet to be drawn shapes.
|
192
|
+
</p>
|
193
|
+
<p>
|
194
|
+
Cairo contexts, as <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> objects are named, are central to
|
195
|
+
cairo and all drawing with cairo is always done to a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
196
|
+
object.
|
197
|
+
</p>
|
198
|
+
<p>
|
199
|
+
Memory management of <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is done with
|
200
|
+
<a class="link" href="cairo-context.html#cairo-reference" title="cairo_reference ()"><code class="function">cairo_reference()</code></a> and <a class="link" href="cairo-context.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a>.</p>
|
201
|
+
<p>
|
202
|
+
|
203
|
+
</p>
|
204
|
+
</div>
|
205
|
+
<hr>
|
206
|
+
<div class="refsect2" lang="en">
|
207
|
+
<a name="cairo-create"></a><h3>cairo_create ()</h3>
|
208
|
+
<pre class="programlisting"><a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a>* cairo_create (<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *target);</pre>
|
209
|
+
<p>
|
210
|
+
Creates a new <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> with all graphics state parameters set to
|
211
|
+
default values and with <em class="parameter"><code>target</code></em> as a target surface. The target
|
212
|
+
surface should be constructed with a backend-specific function such
|
213
|
+
as <a class="link" href="cairo-image-surface.html#cairo-image-surface-create" title="cairo_image_surface_create ()"><code class="function">cairo_image_surface_create()</code></a> (or any other
|
214
|
+
cairo_<span class="emphasis"><em>backend</em></span><code class="function">_surface_create()</code> variant).
|
215
|
+
</p>
|
216
|
+
<p>
|
217
|
+
This function references <em class="parameter"><code>target</code></em>, so you can immediately
|
218
|
+
call <a class="link" href="cairo-surface.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> on it if you don't need to
|
219
|
+
maintain a separate reference to it.</p>
|
220
|
+
<p>
|
221
|
+
|
222
|
+
</p>
|
223
|
+
<div class="variablelist"><table border="0">
|
224
|
+
<col align="left" valign="top">
|
225
|
+
<tbody>
|
226
|
+
<tr>
|
227
|
+
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
|
228
|
+
<td> target surface for the context
|
229
|
+
</td>
|
230
|
+
</tr>
|
231
|
+
<tr>
|
232
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
233
|
+
<td> a newly allocated <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> with a reference
|
234
|
+
count of 1. The initial reference count should be released
|
235
|
+
with <a class="link" href="cairo-context.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a> when you are done using the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.
|
236
|
+
This function never returns <code class="literal">NULL</code>. If memory cannot be
|
237
|
+
allocated, a special <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> object will be returned on
|
238
|
+
which <a class="link" href="cairo-context.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a> returns <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.
|
239
|
+
You can use this object normally, but no drawing will
|
240
|
+
be done.
|
241
|
+
</td>
|
242
|
+
</tr>
|
243
|
+
</tbody>
|
244
|
+
</table></div>
|
245
|
+
</div>
|
246
|
+
<hr>
|
247
|
+
<div class="refsect2" lang="en">
|
248
|
+
<a name="cairo-reference"></a><h3>cairo_reference ()</h3>
|
249
|
+
<pre class="programlisting"><a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a>* cairo_reference (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
250
|
+
<p>
|
251
|
+
Increases the reference count on <em class="parameter"><code>cr</code></em> by one. This prevents
|
252
|
+
<em class="parameter"><code>cr</code></em> from being destroyed until a matching call to <a class="link" href="cairo-context.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a>
|
253
|
+
is made.
|
254
|
+
</p>
|
255
|
+
<p>
|
256
|
+
The number of references to a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> can be get using
|
257
|
+
<a class="link" href="cairo-context.html#cairo-get-reference-count" title="cairo_get_reference_count ()"><code class="function">cairo_get_reference_count()</code></a>.</p>
|
258
|
+
<p>
|
259
|
+
|
260
|
+
</p>
|
261
|
+
<div class="variablelist"><table border="0">
|
262
|
+
<col align="left" valign="top">
|
263
|
+
<tbody>
|
264
|
+
<tr>
|
265
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
266
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
267
|
+
</td>
|
268
|
+
</tr>
|
269
|
+
<tr>
|
270
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
271
|
+
<td> the referenced <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.
|
272
|
+
</td>
|
273
|
+
</tr>
|
274
|
+
</tbody>
|
275
|
+
</table></div>
|
276
|
+
</div>
|
277
|
+
<hr>
|
278
|
+
<div class="refsect2" lang="en">
|
279
|
+
<a name="cairo-destroy"></a><h3>cairo_destroy ()</h3>
|
280
|
+
<pre class="programlisting">void cairo_destroy (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
281
|
+
<p>
|
282
|
+
Decreases the reference count on <em class="parameter"><code>cr</code></em> by one. If the result
|
283
|
+
is zero, then <em class="parameter"><code>cr</code></em> and all associated resources are freed.
|
284
|
+
See <a class="link" href="cairo-context.html#cairo-reference" title="cairo_reference ()"><code class="function">cairo_reference()</code></a>.</p>
|
285
|
+
<p>
|
286
|
+
|
287
|
+
</p>
|
288
|
+
<div class="variablelist"><table border="0">
|
289
|
+
<col align="left" valign="top">
|
290
|
+
<tbody><tr>
|
291
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
292
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
293
|
+
</td>
|
294
|
+
</tr></tbody>
|
295
|
+
</table></div>
|
296
|
+
</div>
|
297
|
+
<hr>
|
298
|
+
<div class="refsect2" lang="en">
|
299
|
+
<a name="cairo-status"></a><h3>cairo_status ()</h3>
|
300
|
+
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> cairo_status (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
301
|
+
<p>
|
302
|
+
Checks whether an error has previously occurred for this context.</p>
|
303
|
+
<p>
|
304
|
+
|
305
|
+
</p>
|
306
|
+
<div class="variablelist"><table border="0">
|
307
|
+
<col align="left" valign="top">
|
308
|
+
<tbody>
|
309
|
+
<tr>
|
310
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
311
|
+
<td> a cairo context
|
312
|
+
</td>
|
313
|
+
</tr>
|
314
|
+
<tr>
|
315
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
316
|
+
<td> the current status of this context, see <a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a>
|
317
|
+
</td>
|
318
|
+
</tr>
|
319
|
+
</tbody>
|
320
|
+
</table></div>
|
321
|
+
</div>
|
322
|
+
<hr>
|
323
|
+
<div class="refsect2" lang="en">
|
324
|
+
<a name="cairo-save"></a><h3>cairo_save ()</h3>
|
325
|
+
<pre class="programlisting">void cairo_save (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
326
|
+
<p>
|
327
|
+
Makes a copy of the current state of <em class="parameter"><code>cr</code></em> and saves it
|
328
|
+
on an internal stack of saved states for <em class="parameter"><code>cr</code></em>. When
|
329
|
+
<a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> is called, <em class="parameter"><code>cr</code></em> will be restored to
|
330
|
+
the saved state. Multiple calls to <a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> and
|
331
|
+
<a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> can be nested; each call to <a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>
|
332
|
+
restores the state from the matching paired <a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>.
|
333
|
+
</p>
|
334
|
+
<p>
|
335
|
+
It isn't necessary to clear all saved states before
|
336
|
+
a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is freed. If the reference count of a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
337
|
+
drops to zero in response to a call to <a class="link" href="cairo-context.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a>,
|
338
|
+
any saved states will be freed along with the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.</p>
|
339
|
+
<p>
|
340
|
+
|
341
|
+
</p>
|
342
|
+
<div class="variablelist"><table border="0">
|
343
|
+
<col align="left" valign="top">
|
344
|
+
<tbody><tr>
|
345
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
346
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
347
|
+
</td>
|
348
|
+
</tr></tbody>
|
349
|
+
</table></div>
|
350
|
+
</div>
|
351
|
+
<hr>
|
352
|
+
<div class="refsect2" lang="en">
|
353
|
+
<a name="cairo-restore"></a><h3>cairo_restore ()</h3>
|
354
|
+
<pre class="programlisting">void cairo_restore (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
355
|
+
<p>
|
356
|
+
Restores <em class="parameter"><code>cr</code></em> to the state saved by a preceding call to
|
357
|
+
<a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> and removes that state from the stack of
|
358
|
+
saved states.</p>
|
359
|
+
<p>
|
360
|
+
|
361
|
+
</p>
|
362
|
+
<div class="variablelist"><table border="0">
|
363
|
+
<col align="left" valign="top">
|
364
|
+
<tbody><tr>
|
365
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
366
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
367
|
+
</td>
|
368
|
+
</tr></tbody>
|
369
|
+
</table></div>
|
370
|
+
</div>
|
371
|
+
<hr>
|
372
|
+
<div class="refsect2" lang="en">
|
373
|
+
<a name="cairo-get-target"></a><h3>cairo_get_target ()</h3>
|
374
|
+
<pre class="programlisting"><a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* cairo_get_target (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
375
|
+
<p>
|
376
|
+
Gets the target surface for the cairo context as passed to
|
377
|
+
<a class="link" href="cairo-context.html#cairo-create" title="cairo_create ()"><code class="function">cairo_create()</code></a>.
|
378
|
+
</p>
|
379
|
+
<p>
|
380
|
+
This function will always return a valid pointer, but the result
|
381
|
+
can be a "nil" surface if <em class="parameter"><code>cr</code></em> is already in an error state,
|
382
|
+
(ie. <a class="link" href="cairo-context.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a> <code class="literal">!=</code> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>).
|
383
|
+
A nil surface is indicated by <a class="link" href="cairo-surface.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a>
|
384
|
+
<code class="literal">!=</code> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.</p>
|
385
|
+
<p>
|
386
|
+
|
387
|
+
</p>
|
388
|
+
<div class="variablelist"><table border="0">
|
389
|
+
<col align="left" valign="top">
|
390
|
+
<tbody>
|
391
|
+
<tr>
|
392
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
393
|
+
<td> a cairo context
|
394
|
+
</td>
|
395
|
+
</tr>
|
396
|
+
<tr>
|
397
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
398
|
+
<td> the target surface. This object is owned by cairo. To
|
399
|
+
keep a reference to it, you must call <a class="link" href="cairo-surface.html#cairo-surface-reference" title="cairo_surface_reference ()"><code class="function">cairo_surface_reference()</code></a>.
|
400
|
+
</td>
|
401
|
+
</tr>
|
402
|
+
</tbody>
|
403
|
+
</table></div>
|
404
|
+
</div>
|
405
|
+
<hr>
|
406
|
+
<div class="refsect2" lang="en">
|
407
|
+
<a name="cairo-push-group"></a><h3>cairo_push_group ()</h3>
|
408
|
+
<pre class="programlisting">void cairo_push_group (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
409
|
+
<p>
|
410
|
+
Temporarily redirects drawing to an intermediate surface known as a
|
411
|
+
group. The redirection lasts until the group is completed by a call
|
412
|
+
to <a class="link" href="cairo-context.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> or <a class="link" href="cairo-context.html#cairo-pop-group-to-source" title="cairo_pop_group_to_source ()"><code class="function">cairo_pop_group_to_source()</code></a>. These calls
|
413
|
+
provide the result of any drawing to the group as a pattern,
|
414
|
+
(either as an explicit object, or set as the source pattern).
|
415
|
+
</p>
|
416
|
+
<p>
|
417
|
+
This group functionality can be convenient for performing
|
418
|
+
intermediate compositing. One common use of a group is to render
|
419
|
+
objects as opaque within the group, (so that they occlude each
|
420
|
+
other), and then blend the result with translucence onto the
|
421
|
+
destination.
|
422
|
+
</p>
|
423
|
+
<p>
|
424
|
+
Groups can be nested arbitrarily deep by making balanced calls to
|
425
|
+
<a class="link" href="cairo-context.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a>/<a class="link" href="cairo-context.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a>. Each call pushes/pops the new
|
426
|
+
target group onto/from a stack.
|
427
|
+
</p>
|
428
|
+
<p>
|
429
|
+
The <a class="link" href="cairo-context.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> function calls <a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> so that any
|
430
|
+
changes to the graphics state will not be visible outside the
|
431
|
+
group, (the pop_group functions call <a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>).
|
432
|
+
</p>
|
433
|
+
<p>
|
434
|
+
By default the intermediate group will have a content type of
|
435
|
+
<a class="link" href="cairo-surface.html#CAIRO-CONTENT-COLOR-ALPHA:CAPS"><code class="literal">CAIRO_CONTENT_COLOR_ALPHA</code></a>. Other content types can be chosen for
|
436
|
+
the group by using <a class="link" href="cairo-context.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a> instead.
|
437
|
+
</p>
|
438
|
+
<p>
|
439
|
+
As an example, here is how one might fill and stroke a path with
|
440
|
+
translucence, but without any portion of the fill being visible
|
441
|
+
under the stroke:
|
442
|
+
</p>
|
443
|
+
<p>
|
444
|
+
</p>
|
445
|
+
<div class="informalexample"><pre class="programlisting">
|
446
|
+
cairo_push_group (cr);
|
447
|
+
cairo_set_source (cr, fill_pattern);
|
448
|
+
cairo_fill_preserve (cr);
|
449
|
+
cairo_set_source (cr, stroke_pattern);
|
450
|
+
cairo_stroke (cr);
|
451
|
+
cairo_pop_group_to_source (cr);
|
452
|
+
cairo_paint_with_alpha (cr, alpha);
|
453
|
+
</pre></div>
|
454
|
+
<p>
|
455
|
+
|
456
|
+
</p>
|
457
|
+
<div class="variablelist"><table border="0">
|
458
|
+
<col align="left" valign="top">
|
459
|
+
<tbody><tr>
|
460
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
461
|
+
<td> a cairo context
|
462
|
+
</td>
|
463
|
+
</tr></tbody>
|
464
|
+
</table></div>
|
465
|
+
<p class="since">Since 1.2
|
466
|
+
</p>
|
467
|
+
</div>
|
468
|
+
<hr>
|
469
|
+
<div class="refsect2" lang="en">
|
470
|
+
<a name="cairo-push-group-with-content"></a><h3>cairo_push_group_with_content ()</h3>
|
471
|
+
<pre class="programlisting">void cairo_push_group_with_content (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
472
|
+
<a class="link" href="cairo-surface.html#cairo-content-t" title="enum cairo_content_t">cairo_content_t</a> content);</pre>
|
473
|
+
<p>
|
474
|
+
Temporarily redirects drawing to an intermediate surface known as a
|
475
|
+
group. The redirection lasts until the group is completed by a call
|
476
|
+
to <a class="link" href="cairo-context.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> or <a class="link" href="cairo-context.html#cairo-pop-group-to-source" title="cairo_pop_group_to_source ()"><code class="function">cairo_pop_group_to_source()</code></a>. These calls
|
477
|
+
provide the result of any drawing to the group as a pattern,
|
478
|
+
(either as an explicit object, or set as the source pattern).
|
479
|
+
</p>
|
480
|
+
<p>
|
481
|
+
The group will have a content type of <em class="parameter"><code>content</code></em>. The ability to
|
482
|
+
control this content type is the only distinction between this
|
483
|
+
function and <a class="link" href="cairo-context.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> which you should see for a more
|
484
|
+
detailed description of group rendering.</p>
|
485
|
+
<p>
|
486
|
+
|
487
|
+
</p>
|
488
|
+
<div class="variablelist"><table border="0">
|
489
|
+
<col align="left" valign="top">
|
490
|
+
<tbody>
|
491
|
+
<tr>
|
492
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
493
|
+
<td> a cairo context
|
494
|
+
</td>
|
495
|
+
</tr>
|
496
|
+
<tr>
|
497
|
+
<td><p><span class="term"><em class="parameter"><code>content</code></em> :</span></p></td>
|
498
|
+
<td> a %<a class="link" href="cairo-surface.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> indicating the type of group that
|
499
|
+
will be created
|
500
|
+
</td>
|
501
|
+
</tr>
|
502
|
+
</tbody>
|
503
|
+
</table></div>
|
504
|
+
<p class="since">Since 1.2
|
505
|
+
</p>
|
506
|
+
</div>
|
507
|
+
<hr>
|
508
|
+
<div class="refsect2" lang="en">
|
509
|
+
<a name="cairo-pop-group"></a><h3>cairo_pop_group ()</h3>
|
510
|
+
<pre class="programlisting"><a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a>* cairo_pop_group (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
511
|
+
<p>
|
512
|
+
Terminates the redirection begun by a call to <a class="link" href="cairo-context.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> or
|
513
|
+
<a class="link" href="cairo-context.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a> and returns a new pattern
|
514
|
+
containing the results of all drawing operations performed to the
|
515
|
+
group.
|
516
|
+
</p>
|
517
|
+
<p>
|
518
|
+
The <a class="link" href="cairo-context.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> function calls <a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>, (balancing a
|
519
|
+
call to <a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> by the push_group function), so that any
|
520
|
+
changes to the graphics state will not be visible outside the
|
521
|
+
group.</p>
|
522
|
+
<p>
|
523
|
+
|
524
|
+
</p>
|
525
|
+
<div class="variablelist"><table border="0">
|
526
|
+
<col align="left" valign="top">
|
527
|
+
<tbody>
|
528
|
+
<tr>
|
529
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
530
|
+
<td> a cairo context
|
531
|
+
</td>
|
532
|
+
</tr>
|
533
|
+
<tr>
|
534
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
535
|
+
<td> a newly created (surface) pattern containing the
|
536
|
+
results of all drawing operations performed to the group. The
|
537
|
+
caller owns the returned object and should call
|
538
|
+
<a class="link" href="cairo-pattern.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> when finished with it.
|
539
|
+
|
540
|
+
</td>
|
541
|
+
</tr>
|
542
|
+
</tbody>
|
543
|
+
</table></div>
|
544
|
+
<p class="since">Since 1.2
|
545
|
+
</p>
|
546
|
+
</div>
|
547
|
+
<hr>
|
548
|
+
<div class="refsect2" lang="en">
|
549
|
+
<a name="cairo-pop-group-to-source"></a><h3>cairo_pop_group_to_source ()</h3>
|
550
|
+
<pre class="programlisting">void cairo_pop_group_to_source (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
551
|
+
<p>
|
552
|
+
Terminates the redirection begun by a call to <a class="link" href="cairo-context.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> or
|
553
|
+
<a class="link" href="cairo-context.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a> and installs the resulting pattern
|
554
|
+
as the source pattern in the given cairo context.
|
555
|
+
</p>
|
556
|
+
<p>
|
557
|
+
The behavior of this function is equivalent to the sequence of
|
558
|
+
operations:
|
559
|
+
</p>
|
560
|
+
<p>
|
561
|
+
</p>
|
562
|
+
<div class="informalexample"><pre class="programlisting">
|
563
|
+
<a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a> *group = cairo_pop_group (cr);
|
564
|
+
cairo_set_source (cr, group);
|
565
|
+
cairo_pattern_destroy (group);
|
566
|
+
</pre></div>
|
567
|
+
<p>
|
568
|
+
</p>
|
569
|
+
<p>
|
570
|
+
but is more convenient as their is no need for a variable to store
|
571
|
+
the short-lived pointer to the pattern.
|
572
|
+
</p>
|
573
|
+
<p>
|
574
|
+
The <a class="link" href="cairo-context.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> function calls <a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>, (balancing a
|
575
|
+
call to <a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> by the push_group function), so that any
|
576
|
+
changes to the graphics state will not be visible outside the
|
577
|
+
group.</p>
|
578
|
+
<p>
|
579
|
+
|
580
|
+
</p>
|
581
|
+
<div class="variablelist"><table border="0">
|
582
|
+
<col align="left" valign="top">
|
583
|
+
<tbody><tr>
|
584
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
585
|
+
<td> a cairo context
|
586
|
+
</td>
|
587
|
+
</tr></tbody>
|
588
|
+
</table></div>
|
589
|
+
<p class="since">Since 1.2
|
590
|
+
</p>
|
591
|
+
</div>
|
592
|
+
<hr>
|
593
|
+
<div class="refsect2" lang="en">
|
594
|
+
<a name="cairo-get-group-target"></a><h3>cairo_get_group_target ()</h3>
|
595
|
+
<pre class="programlisting"><a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>* cairo_get_group_target (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
596
|
+
<p>
|
597
|
+
Gets the current destination surface for the context. This is either
|
598
|
+
the original target surface as passed to <a class="link" href="cairo-context.html#cairo-create" title="cairo_create ()"><code class="function">cairo_create()</code></a> or the target
|
599
|
+
surface for the current group as started by the most recent call to
|
600
|
+
<a class="link" href="cairo-context.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> or <a class="link" href="cairo-context.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a>.
|
601
|
+
</p>
|
602
|
+
<p>
|
603
|
+
This function will always return a valid pointer, but the result
|
604
|
+
can be a "nil" surface if <em class="parameter"><code>cr</code></em> is already in an error state,
|
605
|
+
(ie. <a class="link" href="cairo-context.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a> <code class="literal">!=</code> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>).
|
606
|
+
A nil surface is indicated by <a class="link" href="cairo-surface.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a>
|
607
|
+
<code class="literal">!=</code> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.</p>
|
608
|
+
<p>
|
609
|
+
|
610
|
+
</p>
|
611
|
+
<div class="variablelist"><table border="0">
|
612
|
+
<col align="left" valign="top">
|
613
|
+
<tbody>
|
614
|
+
<tr>
|
615
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
616
|
+
<td> a cairo context
|
617
|
+
</td>
|
618
|
+
</tr>
|
619
|
+
<tr>
|
620
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
621
|
+
<td> the target surface. This object is owned by cairo. To
|
622
|
+
keep a reference to it, you must call <a class="link" href="cairo-surface.html#cairo-surface-reference" title="cairo_surface_reference ()"><code class="function">cairo_surface_reference()</code></a>.
|
623
|
+
|
624
|
+
</td>
|
625
|
+
</tr>
|
626
|
+
</tbody>
|
627
|
+
</table></div>
|
628
|
+
<p class="since">Since 1.2
|
629
|
+
</p>
|
630
|
+
</div>
|
631
|
+
<hr>
|
632
|
+
<div class="refsect2" lang="en">
|
633
|
+
<a name="cairo-set-source-rgb"></a><h3>cairo_set_source_rgb ()</h3>
|
634
|
+
<pre class="programlisting">void cairo_set_source_rgb (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
635
|
+
double red,
|
636
|
+
double green,
|
637
|
+
double blue);</pre>
|
638
|
+
<p>
|
639
|
+
Sets the source pattern within <em class="parameter"><code>cr</code></em> to an opaque color. This opaque
|
640
|
+
color will then be used for any subsequent drawing operation until
|
641
|
+
a new source pattern is set.
|
642
|
+
</p>
|
643
|
+
<p>
|
644
|
+
The color components are floating point numbers in the range 0 to
|
645
|
+
1. If the values passed in are outside that range, they will be
|
646
|
+
clamped.
|
647
|
+
</p>
|
648
|
+
<p>
|
649
|
+
The default source pattern is opaque black, (that is, it is
|
650
|
+
equivalent to cairo_set_source_rgb(cr, 0.0, 0.0, 0.0)).</p>
|
651
|
+
<p>
|
652
|
+
|
653
|
+
</p>
|
654
|
+
<div class="variablelist"><table border="0">
|
655
|
+
<col align="left" valign="top">
|
656
|
+
<tbody>
|
657
|
+
<tr>
|
658
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
659
|
+
<td> a cairo context
|
660
|
+
</td>
|
661
|
+
</tr>
|
662
|
+
<tr>
|
663
|
+
<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
|
664
|
+
<td> red component of color
|
665
|
+
</td>
|
666
|
+
</tr>
|
667
|
+
<tr>
|
668
|
+
<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
|
669
|
+
<td> green component of color
|
670
|
+
</td>
|
671
|
+
</tr>
|
672
|
+
<tr>
|
673
|
+
<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
|
674
|
+
<td> blue component of color
|
675
|
+
</td>
|
676
|
+
</tr>
|
677
|
+
</tbody>
|
678
|
+
</table></div>
|
679
|
+
</div>
|
680
|
+
<hr>
|
681
|
+
<div class="refsect2" lang="en">
|
682
|
+
<a name="cairo-set-source-rgba"></a><h3>cairo_set_source_rgba ()</h3>
|
683
|
+
<pre class="programlisting">void cairo_set_source_rgba (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
684
|
+
double red,
|
685
|
+
double green,
|
686
|
+
double blue,
|
687
|
+
double alpha);</pre>
|
688
|
+
<p>
|
689
|
+
Sets the source pattern within <em class="parameter"><code>cr</code></em> to a translucent color. This
|
690
|
+
color will then be used for any subsequent drawing operation until
|
691
|
+
a new source pattern is set.
|
692
|
+
</p>
|
693
|
+
<p>
|
694
|
+
The color and alpha components are floating point numbers in the
|
695
|
+
range 0 to 1. If the values passed in are outside that range, they
|
696
|
+
will be clamped.
|
697
|
+
</p>
|
698
|
+
<p>
|
699
|
+
The default source pattern is opaque black, (that is, it is
|
700
|
+
equivalent to cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0)).</p>
|
701
|
+
<p>
|
702
|
+
|
703
|
+
</p>
|
704
|
+
<div class="variablelist"><table border="0">
|
705
|
+
<col align="left" valign="top">
|
706
|
+
<tbody>
|
707
|
+
<tr>
|
708
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
709
|
+
<td> a cairo context
|
710
|
+
</td>
|
711
|
+
</tr>
|
712
|
+
<tr>
|
713
|
+
<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
|
714
|
+
<td> red component of color
|
715
|
+
</td>
|
716
|
+
</tr>
|
717
|
+
<tr>
|
718
|
+
<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
|
719
|
+
<td> green component of color
|
720
|
+
</td>
|
721
|
+
</tr>
|
722
|
+
<tr>
|
723
|
+
<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
|
724
|
+
<td> blue component of color
|
725
|
+
</td>
|
726
|
+
</tr>
|
727
|
+
<tr>
|
728
|
+
<td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
|
729
|
+
<td> alpha component of color
|
730
|
+
</td>
|
731
|
+
</tr>
|
732
|
+
</tbody>
|
733
|
+
</table></div>
|
734
|
+
</div>
|
735
|
+
<hr>
|
736
|
+
<div class="refsect2" lang="en">
|
737
|
+
<a name="cairo-set-source"></a><h3>cairo_set_source ()</h3>
|
738
|
+
<pre class="programlisting">void cairo_set_source (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
739
|
+
<a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a> *source);</pre>
|
740
|
+
<p>
|
741
|
+
Sets the source pattern within <em class="parameter"><code>cr</code></em> to <em class="parameter"><code>source</code></em>. This pattern
|
742
|
+
will then be used for any subsequent drawing operation until a new
|
743
|
+
source pattern is set.
|
744
|
+
</p>
|
745
|
+
<p>
|
746
|
+
Note: The pattern's transformation matrix will be locked to the
|
747
|
+
user space in effect at the time of <a class="link" href="cairo-context.html#cairo-set-source" title="cairo_set_source ()"><code class="function">cairo_set_source()</code></a>. This means
|
748
|
+
that further modifications of the current transformation matrix
|
749
|
+
will not affect the source pattern. See <a class="link" href="cairo-pattern.html#cairo-pattern-set-matrix" title="cairo_pattern_set_matrix ()"><code class="function">cairo_pattern_set_matrix()</code></a>.
|
750
|
+
</p>
|
751
|
+
<p>
|
752
|
+
The default source pattern is a solid pattern that is opaque black,
|
753
|
+
(that is, it is equivalent to cairo_set_source_rgb(cr, 0.0, 0.0,
|
754
|
+
0.0)).</p>
|
755
|
+
<p>
|
756
|
+
|
757
|
+
</p>
|
758
|
+
<div class="variablelist"><table border="0">
|
759
|
+
<col align="left" valign="top">
|
760
|
+
<tbody>
|
761
|
+
<tr>
|
762
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
763
|
+
<td> a cairo context
|
764
|
+
</td>
|
765
|
+
</tr>
|
766
|
+
<tr>
|
767
|
+
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
|
768
|
+
<td> a <a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> to be used as the source for
|
769
|
+
subsequent drawing operations.
|
770
|
+
</td>
|
771
|
+
</tr>
|
772
|
+
</tbody>
|
773
|
+
</table></div>
|
774
|
+
</div>
|
775
|
+
<hr>
|
776
|
+
<div class="refsect2" lang="en">
|
777
|
+
<a name="cairo-set-source-surface"></a><h3>cairo_set_source_surface ()</h3>
|
778
|
+
<pre class="programlisting">void cairo_set_source_surface (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
779
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
780
|
+
double x,
|
781
|
+
double y);</pre>
|
782
|
+
<p>
|
783
|
+
This is a convenience function for creating a pattern from <em class="parameter"><code>surface</code></em>
|
784
|
+
and setting it as the source in <em class="parameter"><code>cr</code></em> with <a class="link" href="cairo-context.html#cairo-set-source" title="cairo_set_source ()"><code class="function">cairo_set_source()</code></a>.
|
785
|
+
</p>
|
786
|
+
<p>
|
787
|
+
The <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> parameters give the user-space coordinate at which
|
788
|
+
the surface origin should appear. (The surface origin is its
|
789
|
+
upper-left corner before any transformation has been applied.) The
|
790
|
+
<em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> patterns are negated and then set as translation values
|
791
|
+
in the pattern matrix.
|
792
|
+
</p>
|
793
|
+
<p>
|
794
|
+
Other than the initial translation pattern matrix, as described
|
795
|
+
above, all other pattern attributes, (such as its extend mode), are
|
796
|
+
set to the default values as in <a class="link" href="cairo-pattern.html#cairo-pattern-create-for-surface" title="cairo_pattern_create_for_surface ()"><code class="function">cairo_pattern_create_for_surface()</code></a>.
|
797
|
+
The resulting pattern can be queried with <a class="link" href="cairo-context.html#cairo-get-source" title="cairo_get_source ()"><code class="function">cairo_get_source()</code></a> so
|
798
|
+
that these attributes can be modified if desired, (eg. to create a
|
799
|
+
repeating pattern with <a class="link" href="cairo-pattern.html#cairo-pattern-set-extend" title="cairo_pattern_set_extend ()"><code class="function">cairo_pattern_set_extend()</code></a>).</p>
|
800
|
+
<p>
|
801
|
+
|
802
|
+
</p>
|
803
|
+
<div class="variablelist"><table border="0">
|
804
|
+
<col align="left" valign="top">
|
805
|
+
<tbody>
|
806
|
+
<tr>
|
807
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
808
|
+
<td> a cairo context
|
809
|
+
</td>
|
810
|
+
</tr>
|
811
|
+
<tr>
|
812
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
813
|
+
<td> a surface to be used to set the source pattern
|
814
|
+
</td>
|
815
|
+
</tr>
|
816
|
+
<tr>
|
817
|
+
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
|
818
|
+
<td> User-space X coordinate for surface origin
|
819
|
+
</td>
|
820
|
+
</tr>
|
821
|
+
<tr>
|
822
|
+
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
|
823
|
+
<td> User-space Y coordinate for surface origin
|
824
|
+
</td>
|
825
|
+
</tr>
|
826
|
+
</tbody>
|
827
|
+
</table></div>
|
828
|
+
</div>
|
829
|
+
<hr>
|
830
|
+
<div class="refsect2" lang="en">
|
831
|
+
<a name="cairo-get-source"></a><h3>cairo_get_source ()</h3>
|
832
|
+
<pre class="programlisting"><a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a>* cairo_get_source (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
833
|
+
<p>
|
834
|
+
Gets the current source pattern for <em class="parameter"><code>cr</code></em>.</p>
|
835
|
+
<p>
|
836
|
+
|
837
|
+
</p>
|
838
|
+
<div class="variablelist"><table border="0">
|
839
|
+
<col align="left" valign="top">
|
840
|
+
<tbody>
|
841
|
+
<tr>
|
842
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
843
|
+
<td> a cairo context
|
844
|
+
</td>
|
845
|
+
</tr>
|
846
|
+
<tr>
|
847
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
848
|
+
<td> the current source pattern. This object is owned by
|
849
|
+
cairo. To keep a reference to it, you must call
|
850
|
+
<a class="link" href="cairo-pattern.html#cairo-pattern-reference" title="cairo_pattern_reference ()"><code class="function">cairo_pattern_reference()</code></a>.
|
851
|
+
</td>
|
852
|
+
</tr>
|
853
|
+
</tbody>
|
854
|
+
</table></div>
|
855
|
+
</div>
|
856
|
+
<hr>
|
857
|
+
<div class="refsect2" lang="en">
|
858
|
+
<a name="cairo-antialias-t"></a><h3>enum cairo_antialias_t</h3>
|
859
|
+
<pre class="programlisting">typedef enum _cairo_antialias {
|
860
|
+
CAIRO_ANTIALIAS_DEFAULT,
|
861
|
+
CAIRO_ANTIALIAS_NONE,
|
862
|
+
CAIRO_ANTIALIAS_GRAY,
|
863
|
+
CAIRO_ANTIALIAS_SUBPIXEL
|
864
|
+
} cairo_antialias_t;
|
865
|
+
</pre>
|
866
|
+
<p>
|
867
|
+
Specifies the type of antialiasing to do when rendering text or shapes.</p>
|
868
|
+
<p>
|
869
|
+
|
870
|
+
</p>
|
871
|
+
<div class="variablelist"><table border="0">
|
872
|
+
<col align="left" valign="top">
|
873
|
+
<tbody>
|
874
|
+
<tr>
|
875
|
+
<td><p><a name="CAIRO-ANTIALIAS-DEFAULT:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_DEFAULT</code></span></p></td>
|
876
|
+
<td> Use the default antialiasing for
|
877
|
+
the subsystem and target device
|
878
|
+
</td>
|
879
|
+
</tr>
|
880
|
+
<tr>
|
881
|
+
<td><p><a name="CAIRO-ANTIALIAS-NONE:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_NONE</code></span></p></td>
|
882
|
+
<td> Use a bilevel alpha mask
|
883
|
+
</td>
|
884
|
+
</tr>
|
885
|
+
<tr>
|
886
|
+
<td><p><a name="CAIRO-ANTIALIAS-GRAY:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_GRAY</code></span></p></td>
|
887
|
+
<td> Perform single-color antialiasing (using
|
888
|
+
shades of gray for black text on a white background, for example).
|
889
|
+
</td>
|
890
|
+
</tr>
|
891
|
+
<tr>
|
892
|
+
<td><p><a name="CAIRO-ANTIALIAS-SUBPIXEL:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></span></p></td>
|
893
|
+
<td> Perform antialiasing by taking
|
894
|
+
advantage of the order of subpixel elements on devices
|
895
|
+
such as LCD panels
|
896
|
+
</td>
|
897
|
+
</tr>
|
898
|
+
</tbody>
|
899
|
+
</table></div>
|
900
|
+
</div>
|
901
|
+
<hr>
|
902
|
+
<div class="refsect2" lang="en">
|
903
|
+
<a name="cairo-set-antialias"></a><h3>cairo_set_antialias ()</h3>
|
904
|
+
<pre class="programlisting">void cairo_set_antialias (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
905
|
+
<a class="link" href="cairo-context.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a> antialias);</pre>
|
906
|
+
<p>
|
907
|
+
Set the antialiasing mode of the rasterizer used for drawing shapes.
|
908
|
+
This value is a hint, and a particular backend may or may not support
|
909
|
+
a particular value. At the current time, no backend supports
|
910
|
+
<a class="link" href="cairo-context.html#CAIRO-ANTIALIAS-SUBPIXEL:CAPS"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></a> when drawing shapes.
|
911
|
+
</p>
|
912
|
+
<p>
|
913
|
+
Note that this option does not affect text rendering, instead see
|
914
|
+
<a class="link" href="cairo-font-options.html#cairo-font-options-set-antialias" title="cairo_font_options_set_antialias ()"><code class="function">cairo_font_options_set_antialias()</code></a>.</p>
|
915
|
+
<p>
|
916
|
+
|
917
|
+
</p>
|
918
|
+
<div class="variablelist"><table border="0">
|
919
|
+
<col align="left" valign="top">
|
920
|
+
<tbody>
|
921
|
+
<tr>
|
922
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
923
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
924
|
+
</td>
|
925
|
+
</tr>
|
926
|
+
<tr>
|
927
|
+
<td><p><span class="term"><em class="parameter"><code>antialias</code></em> :</span></p></td>
|
928
|
+
<td> the new antialiasing mode
|
929
|
+
</td>
|
930
|
+
</tr>
|
931
|
+
</tbody>
|
932
|
+
</table></div>
|
933
|
+
</div>
|
934
|
+
<hr>
|
935
|
+
<div class="refsect2" lang="en">
|
936
|
+
<a name="cairo-get-antialias"></a><h3>cairo_get_antialias ()</h3>
|
937
|
+
<pre class="programlisting"><a class="link" href="cairo-context.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a> cairo_get_antialias (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
938
|
+
<p>
|
939
|
+
Gets the current shape antialiasing mode, as set by <code class="function">cairo_set_shape_antialias()</code>.</p>
|
940
|
+
<p>
|
941
|
+
|
942
|
+
</p>
|
943
|
+
<div class="variablelist"><table border="0">
|
944
|
+
<col align="left" valign="top">
|
945
|
+
<tbody>
|
946
|
+
<tr>
|
947
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
948
|
+
<td> a cairo context
|
949
|
+
</td>
|
950
|
+
</tr>
|
951
|
+
<tr>
|
952
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
953
|
+
<td> the current shape antialiasing mode.
|
954
|
+
</td>
|
955
|
+
</tr>
|
956
|
+
</tbody>
|
957
|
+
</table></div>
|
958
|
+
</div>
|
959
|
+
<hr>
|
960
|
+
<div class="refsect2" lang="en">
|
961
|
+
<a name="cairo-set-dash"></a><h3>cairo_set_dash ()</h3>
|
962
|
+
<pre class="programlisting">void cairo_set_dash (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
963
|
+
const double *dashes,
|
964
|
+
int num_dashes,
|
965
|
+
double offset);</pre>
|
966
|
+
<p>
|
967
|
+
Sets the dash pattern to be used by <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>. A dash pattern
|
968
|
+
is specified by <em class="parameter"><code>dashes</code></em>, an array of positive values. Each value
|
969
|
+
provides the length of alternate "on" and "off" portions of the
|
970
|
+
stroke. The <em class="parameter"><code>offset</code></em> specifies an offset into the pattern at which
|
971
|
+
the stroke begins.
|
972
|
+
</p>
|
973
|
+
<p>
|
974
|
+
Each "on" segment will have caps applied as if the segment were a
|
975
|
+
separate sub-path. In particular, it is valid to use an "on" length
|
976
|
+
of 0.0 with <a class="link" href="cairo-context.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> or <a class="link" href="cairo-context.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> in order
|
977
|
+
to distributed dots or squares along a path.
|
978
|
+
</p>
|
979
|
+
<p>
|
980
|
+
Note: The length values are in user-space units as evaluated at the
|
981
|
+
time of stroking. This is not necessarily the same as the user
|
982
|
+
space at the time of <a class="link" href="cairo-context.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>.
|
983
|
+
</p>
|
984
|
+
<p>
|
985
|
+
If <em class="parameter"><code>num_dashes</code></em> is 0 dashing is disabled.
|
986
|
+
</p>
|
987
|
+
<p>
|
988
|
+
If <em class="parameter"><code>num_dashes</code></em> is 1 a symmetric pattern is assumed with alternating
|
989
|
+
on and off portions of the size specified by the single value in
|
990
|
+
<em class="parameter"><code>dashes</code></em>.
|
991
|
+
</p>
|
992
|
+
<p>
|
993
|
+
If any value in <em class="parameter"><code>dashes</code></em> is negative, or if all values are 0, then
|
994
|
+
<em class="parameter"><code>cr</code></em> will be put into an error state with a status of
|
995
|
+
#<a class="link" href="cairo-error-status.html#CAIRO-STATUS-INVALID-DASH:CAPS"><code class="literal">CAIRO_STATUS_INVALID_DASH</code></a>.</p>
|
996
|
+
<p>
|
997
|
+
|
998
|
+
</p>
|
999
|
+
<div class="variablelist"><table border="0">
|
1000
|
+
<col align="left" valign="top">
|
1001
|
+
<tbody>
|
1002
|
+
<tr>
|
1003
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1004
|
+
<td> a cairo context
|
1005
|
+
</td>
|
1006
|
+
</tr>
|
1007
|
+
<tr>
|
1008
|
+
<td><p><span class="term"><em class="parameter"><code>dashes</code></em> :</span></p></td>
|
1009
|
+
<td> an array specifying alternate lengths of on and off stroke portions
|
1010
|
+
</td>
|
1011
|
+
</tr>
|
1012
|
+
<tr>
|
1013
|
+
<td><p><span class="term"><em class="parameter"><code>num_dashes</code></em> :</span></p></td>
|
1014
|
+
<td> the length of the dashes array
|
1015
|
+
</td>
|
1016
|
+
</tr>
|
1017
|
+
<tr>
|
1018
|
+
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
|
1019
|
+
<td> an offset into the dash pattern at which the stroke should start
|
1020
|
+
</td>
|
1021
|
+
</tr>
|
1022
|
+
</tbody>
|
1023
|
+
</table></div>
|
1024
|
+
</div>
|
1025
|
+
<hr>
|
1026
|
+
<div class="refsect2" lang="en">
|
1027
|
+
<a name="cairo-get-dash-count"></a><h3>cairo_get_dash_count ()</h3>
|
1028
|
+
<pre class="programlisting">int cairo_get_dash_count (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1029
|
+
<p>
|
1030
|
+
This function returns the length of the dash array in <em class="parameter"><code>cr</code></em> (0 if dashing
|
1031
|
+
is not currently in effect).
|
1032
|
+
</p>
|
1033
|
+
<p>
|
1034
|
+
See also <a class="link" href="cairo-context.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a> and <a class="link" href="cairo-context.html#cairo-get-dash" title="cairo_get_dash ()"><code class="function">cairo_get_dash()</code></a>.</p>
|
1035
|
+
<p>
|
1036
|
+
|
1037
|
+
</p>
|
1038
|
+
<div class="variablelist"><table border="0">
|
1039
|
+
<col align="left" valign="top">
|
1040
|
+
<tbody>
|
1041
|
+
<tr>
|
1042
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1043
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1044
|
+
</td>
|
1045
|
+
</tr>
|
1046
|
+
<tr>
|
1047
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1048
|
+
<td> the length of the dash array, or 0 if no dash array set.
|
1049
|
+
|
1050
|
+
</td>
|
1051
|
+
</tr>
|
1052
|
+
</tbody>
|
1053
|
+
</table></div>
|
1054
|
+
<p class="since">Since 1.4
|
1055
|
+
</p>
|
1056
|
+
</div>
|
1057
|
+
<hr>
|
1058
|
+
<div class="refsect2" lang="en">
|
1059
|
+
<a name="cairo-get-dash"></a><h3>cairo_get_dash ()</h3>
|
1060
|
+
<pre class="programlisting">void cairo_get_dash (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
1061
|
+
double *dashes,
|
1062
|
+
double *offset);</pre>
|
1063
|
+
<p>
|
1064
|
+
Gets the current dash array. If not <code class="literal">NULL</code>, <em class="parameter"><code>dashes</code></em> should be big
|
1065
|
+
enough to hold at least the number of values returned by
|
1066
|
+
<a class="link" href="cairo-context.html#cairo-get-dash-count" title="cairo_get_dash_count ()"><code class="function">cairo_get_dash_count()</code></a>.</p>
|
1067
|
+
<p>
|
1068
|
+
|
1069
|
+
</p>
|
1070
|
+
<div class="variablelist"><table border="0">
|
1071
|
+
<col align="left" valign="top">
|
1072
|
+
<tbody>
|
1073
|
+
<tr>
|
1074
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1075
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1076
|
+
</td>
|
1077
|
+
</tr>
|
1078
|
+
<tr>
|
1079
|
+
<td><p><span class="term"><em class="parameter"><code>dashes</code></em> :</span></p></td>
|
1080
|
+
<td> return value for the dash array, or <code class="literal">NULL</code>
|
1081
|
+
</td>
|
1082
|
+
</tr>
|
1083
|
+
<tr>
|
1084
|
+
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
|
1085
|
+
<td> return value for the current dash offset, or <code class="literal">NULL</code>
|
1086
|
+
</td>
|
1087
|
+
</tr>
|
1088
|
+
</tbody>
|
1089
|
+
</table></div>
|
1090
|
+
<p class="since">Since 1.4
|
1091
|
+
</p>
|
1092
|
+
</div>
|
1093
|
+
<hr>
|
1094
|
+
<div class="refsect2" lang="en">
|
1095
|
+
<a name="cairo-fill-rule-t"></a><h3>enum cairo_fill_rule_t</h3>
|
1096
|
+
<pre class="programlisting">typedef enum _cairo_fill_rule {
|
1097
|
+
CAIRO_FILL_RULE_WINDING,
|
1098
|
+
CAIRO_FILL_RULE_EVEN_ODD
|
1099
|
+
} cairo_fill_rule_t;
|
1100
|
+
</pre>
|
1101
|
+
<p>
|
1102
|
+
<a class="link" href="cairo-context.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a> is used to select how paths are filled. For both
|
1103
|
+
fill rules, whether or not a point is included in the fill is
|
1104
|
+
determined by taking a ray from that point to infinity and looking
|
1105
|
+
at intersections with the path. The ray can be in any direction,
|
1106
|
+
as long as it doesn't pass through the end point of a segment
|
1107
|
+
or have a tricky intersection such as intersecting tangent to the path.
|
1108
|
+
(Note that filling is not actually implemented in this way. This
|
1109
|
+
is just a description of the rule that is applied.)
|
1110
|
+
</p>
|
1111
|
+
<p>
|
1112
|
+
The default fill rule is <a class="link" href="cairo-context.html#CAIRO-FILL-RULE-WINDING:CAPS"><code class="literal">CAIRO_FILL_RULE_WINDING</code></a>.
|
1113
|
+
</p>
|
1114
|
+
<p>
|
1115
|
+
New entries may be added in future versions.</p>
|
1116
|
+
<p>
|
1117
|
+
|
1118
|
+
</p>
|
1119
|
+
<div class="variablelist"><table border="0">
|
1120
|
+
<col align="left" valign="top">
|
1121
|
+
<tbody>
|
1122
|
+
<tr>
|
1123
|
+
<td><p><a name="CAIRO-FILL-RULE-WINDING:CAPS"></a><span class="term"><code class="literal">CAIRO_FILL_RULE_WINDING</code></span></p></td>
|
1124
|
+
<td> If the path crosses the ray from
|
1125
|
+
left-to-right, counts +1. If the path crosses the ray
|
1126
|
+
from right to left, counts -1. (Left and right are determined
|
1127
|
+
from the perspective of looking along the ray from the starting
|
1128
|
+
point.) If the total count is non-zero, the point will be filled.
|
1129
|
+
</td>
|
1130
|
+
</tr>
|
1131
|
+
<tr>
|
1132
|
+
<td><p><a name="CAIRO-FILL-RULE-EVEN-ODD:CAPS"></a><span class="term"><code class="literal">CAIRO_FILL_RULE_EVEN_ODD</code></span></p></td>
|
1133
|
+
<td> Counts the total number of
|
1134
|
+
intersections, without regard to the orientation of the contour. If
|
1135
|
+
the total number of intersections is odd, the point will be
|
1136
|
+
filled.
|
1137
|
+
</td>
|
1138
|
+
</tr>
|
1139
|
+
</tbody>
|
1140
|
+
</table></div>
|
1141
|
+
</div>
|
1142
|
+
<hr>
|
1143
|
+
<div class="refsect2" lang="en">
|
1144
|
+
<a name="cairo-set-fill-rule"></a><h3>cairo_set_fill_rule ()</h3>
|
1145
|
+
<pre class="programlisting">void cairo_set_fill_rule (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
1146
|
+
<a class="link" href="cairo-context.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t">cairo_fill_rule_t</a> fill_rule);</pre>
|
1147
|
+
<p>
|
1148
|
+
Set the current fill rule within the cairo context. The fill rule
|
1149
|
+
is used to determine which regions are inside or outside a complex
|
1150
|
+
(potentially self-intersecting) path. The current fill rule affects
|
1151
|
+
both <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a> and <a class="link" href="cairo-context.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>. See <a class="link" href="cairo-context.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a> for details
|
1152
|
+
on the semantics of each available fill rule.
|
1153
|
+
</p>
|
1154
|
+
<p>
|
1155
|
+
The default fill rule is <a class="link" href="cairo-context.html#CAIRO-FILL-RULE-WINDING:CAPS"><code class="literal">CAIRO_FILL_RULE_WINDING</code></a>.</p>
|
1156
|
+
<p>
|
1157
|
+
|
1158
|
+
</p>
|
1159
|
+
<div class="variablelist"><table border="0">
|
1160
|
+
<col align="left" valign="top">
|
1161
|
+
<tbody>
|
1162
|
+
<tr>
|
1163
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1164
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1165
|
+
</td>
|
1166
|
+
</tr>
|
1167
|
+
<tr>
|
1168
|
+
<td><p><span class="term"><em class="parameter"><code>fill_rule</code></em> :</span></p></td>
|
1169
|
+
<td> a fill rule, specified as a <a class="link" href="cairo-context.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a>
|
1170
|
+
</td>
|
1171
|
+
</tr>
|
1172
|
+
</tbody>
|
1173
|
+
</table></div>
|
1174
|
+
</div>
|
1175
|
+
<hr>
|
1176
|
+
<div class="refsect2" lang="en">
|
1177
|
+
<a name="cairo-get-fill-rule"></a><h3>cairo_get_fill_rule ()</h3>
|
1178
|
+
<pre class="programlisting"><a class="link" href="cairo-context.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t">cairo_fill_rule_t</a> cairo_get_fill_rule (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1179
|
+
<p>
|
1180
|
+
Gets the current fill rule, as set by <a class="link" href="cairo-context.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a>.</p>
|
1181
|
+
<p>
|
1182
|
+
|
1183
|
+
</p>
|
1184
|
+
<div class="variablelist"><table border="0">
|
1185
|
+
<col align="left" valign="top">
|
1186
|
+
<tbody>
|
1187
|
+
<tr>
|
1188
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1189
|
+
<td> a cairo context
|
1190
|
+
</td>
|
1191
|
+
</tr>
|
1192
|
+
<tr>
|
1193
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1194
|
+
<td> the current fill rule.
|
1195
|
+
</td>
|
1196
|
+
</tr>
|
1197
|
+
</tbody>
|
1198
|
+
</table></div>
|
1199
|
+
</div>
|
1200
|
+
<hr>
|
1201
|
+
<div class="refsect2" lang="en">
|
1202
|
+
<a name="cairo-line-cap-t"></a><h3>enum cairo_line_cap_t</h3>
|
1203
|
+
<pre class="programlisting">typedef enum _cairo_line_cap {
|
1204
|
+
CAIRO_LINE_CAP_BUTT,
|
1205
|
+
CAIRO_LINE_CAP_ROUND,
|
1206
|
+
CAIRO_LINE_CAP_SQUARE
|
1207
|
+
} cairo_line_cap_t;
|
1208
|
+
</pre>
|
1209
|
+
<p>
|
1210
|
+
Specifies how to render the endpoints of the path when stroking.
|
1211
|
+
</p>
|
1212
|
+
<p>
|
1213
|
+
The default line cap style is <a class="link" href="cairo-context.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a>.</p>
|
1214
|
+
<p>
|
1215
|
+
|
1216
|
+
</p>
|
1217
|
+
<div class="variablelist"><table border="0">
|
1218
|
+
<col align="left" valign="top">
|
1219
|
+
<tbody>
|
1220
|
+
<tr>
|
1221
|
+
<td><p><a name="CAIRO-LINE-CAP-BUTT:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_CAP_BUTT</code></span></p></td>
|
1222
|
+
<td> start(stop) the line exactly at the start(end) point
|
1223
|
+
</td>
|
1224
|
+
</tr>
|
1225
|
+
<tr>
|
1226
|
+
<td><p><a name="CAIRO-LINE-CAP-ROUND:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_CAP_ROUND</code></span></p></td>
|
1227
|
+
<td> use a round ending, the center of the circle is the end point
|
1228
|
+
</td>
|
1229
|
+
</tr>
|
1230
|
+
<tr>
|
1231
|
+
<td><p><a name="CAIRO-LINE-CAP-SQUARE:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></span></p></td>
|
1232
|
+
<td> use squared ending, the center of the square is the end point
|
1233
|
+
</td>
|
1234
|
+
</tr>
|
1235
|
+
</tbody>
|
1236
|
+
</table></div>
|
1237
|
+
</div>
|
1238
|
+
<hr>
|
1239
|
+
<div class="refsect2" lang="en">
|
1240
|
+
<a name="cairo-set-line-cap"></a><h3>cairo_set_line_cap ()</h3>
|
1241
|
+
<pre class="programlisting">void cairo_set_line_cap (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
1242
|
+
<a class="link" href="cairo-context.html#cairo-line-cap-t" title="enum cairo_line_cap_t">cairo_line_cap_t</a> line_cap);</pre>
|
1243
|
+
<p>
|
1244
|
+
Sets the current line cap style within the cairo context. See
|
1245
|
+
<a class="link" href="cairo-context.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="type">cairo_line_cap_t</span></a> for details about how the available line cap
|
1246
|
+
styles are drawn.
|
1247
|
+
</p>
|
1248
|
+
<p>
|
1249
|
+
As with the other stroke parameters, the current line cap style is
|
1250
|
+
examined by <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-context.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
|
1251
|
+
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
|
1252
|
+
construction.
|
1253
|
+
</p>
|
1254
|
+
<p>
|
1255
|
+
The default line cap style is <a class="link" href="cairo-context.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a>.</p>
|
1256
|
+
<p>
|
1257
|
+
|
1258
|
+
</p>
|
1259
|
+
<div class="variablelist"><table border="0">
|
1260
|
+
<col align="left" valign="top">
|
1261
|
+
<tbody>
|
1262
|
+
<tr>
|
1263
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1264
|
+
<td> a cairo context
|
1265
|
+
</td>
|
1266
|
+
</tr>
|
1267
|
+
<tr>
|
1268
|
+
<td><p><span class="term"><em class="parameter"><code>line_cap</code></em> :</span></p></td>
|
1269
|
+
<td> a line cap style
|
1270
|
+
</td>
|
1271
|
+
</tr>
|
1272
|
+
</tbody>
|
1273
|
+
</table></div>
|
1274
|
+
</div>
|
1275
|
+
<hr>
|
1276
|
+
<div class="refsect2" lang="en">
|
1277
|
+
<a name="cairo-get-line-cap"></a><h3>cairo_get_line_cap ()</h3>
|
1278
|
+
<pre class="programlisting"><a class="link" href="cairo-context.html#cairo-line-cap-t" title="enum cairo_line_cap_t">cairo_line_cap_t</a> cairo_get_line_cap (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1279
|
+
<p>
|
1280
|
+
Gets the current line cap style, as set by <a class="link" href="cairo-context.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>.</p>
|
1281
|
+
<p>
|
1282
|
+
|
1283
|
+
</p>
|
1284
|
+
<div class="variablelist"><table border="0">
|
1285
|
+
<col align="left" valign="top">
|
1286
|
+
<tbody>
|
1287
|
+
<tr>
|
1288
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1289
|
+
<td> a cairo context
|
1290
|
+
</td>
|
1291
|
+
</tr>
|
1292
|
+
<tr>
|
1293
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1294
|
+
<td> the current line cap style.
|
1295
|
+
</td>
|
1296
|
+
</tr>
|
1297
|
+
</tbody>
|
1298
|
+
</table></div>
|
1299
|
+
</div>
|
1300
|
+
<hr>
|
1301
|
+
<div class="refsect2" lang="en">
|
1302
|
+
<a name="cairo-line-join-t"></a><h3>enum cairo_line_join_t</h3>
|
1303
|
+
<pre class="programlisting">typedef enum _cairo_line_join {
|
1304
|
+
CAIRO_LINE_JOIN_MITER,
|
1305
|
+
CAIRO_LINE_JOIN_ROUND,
|
1306
|
+
CAIRO_LINE_JOIN_BEVEL
|
1307
|
+
} cairo_line_join_t;
|
1308
|
+
</pre>
|
1309
|
+
<p>
|
1310
|
+
Specifies how to render the junction of two lines when stroking.
|
1311
|
+
</p>
|
1312
|
+
<p>
|
1313
|
+
The default line join style is <a class="link" href="cairo-context.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>.</p>
|
1314
|
+
<p>
|
1315
|
+
|
1316
|
+
</p>
|
1317
|
+
<div class="variablelist"><table border="0">
|
1318
|
+
<col align="left" valign="top">
|
1319
|
+
<tbody>
|
1320
|
+
<tr>
|
1321
|
+
<td><p><a name="CAIRO-LINE-JOIN-MITER:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_JOIN_MITER</code></span></p></td>
|
1322
|
+
<td> use a sharp (angled) corner, see
|
1323
|
+
<a class="link" href="cairo-context.html#cairo-set-miter-limit" title="cairo_set_miter_limit ()"><code class="function">cairo_set_miter_limit()</code></a>
|
1324
|
+
</td>
|
1325
|
+
</tr>
|
1326
|
+
<tr>
|
1327
|
+
<td><p><a name="CAIRO-LINE-JOIN-ROUND:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_JOIN_ROUND</code></span></p></td>
|
1328
|
+
<td> use a rounded join, the center of the circle is the
|
1329
|
+
joint point
|
1330
|
+
</td>
|
1331
|
+
</tr>
|
1332
|
+
<tr>
|
1333
|
+
<td><p><a name="CAIRO-LINE-JOIN-BEVEL:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_JOIN_BEVEL</code></span></p></td>
|
1334
|
+
<td> use a cut-off join, the join is cut off at half
|
1335
|
+
the line width from the joint point
|
1336
|
+
</td>
|
1337
|
+
</tr>
|
1338
|
+
</tbody>
|
1339
|
+
</table></div>
|
1340
|
+
</div>
|
1341
|
+
<hr>
|
1342
|
+
<div class="refsect2" lang="en">
|
1343
|
+
<a name="cairo-set-line-join"></a><h3>cairo_set_line_join ()</h3>
|
1344
|
+
<pre class="programlisting">void cairo_set_line_join (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
1345
|
+
<a class="link" href="cairo-context.html#cairo-line-join-t" title="enum cairo_line_join_t">cairo_line_join_t</a> line_join);</pre>
|
1346
|
+
<p>
|
1347
|
+
Sets the current line join style within the cairo context. See
|
1348
|
+
<a class="link" href="cairo-context.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="type">cairo_line_join_t</span></a> for details about how the available line join
|
1349
|
+
styles are drawn.
|
1350
|
+
</p>
|
1351
|
+
<p>
|
1352
|
+
As with the other stroke parameters, the current line join style is
|
1353
|
+
examined by <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-context.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
|
1354
|
+
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
|
1355
|
+
construction.
|
1356
|
+
</p>
|
1357
|
+
<p>
|
1358
|
+
The default line join style is <a class="link" href="cairo-context.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>.</p>
|
1359
|
+
<p>
|
1360
|
+
|
1361
|
+
</p>
|
1362
|
+
<div class="variablelist"><table border="0">
|
1363
|
+
<col align="left" valign="top">
|
1364
|
+
<tbody>
|
1365
|
+
<tr>
|
1366
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1367
|
+
<td> a cairo context
|
1368
|
+
</td>
|
1369
|
+
</tr>
|
1370
|
+
<tr>
|
1371
|
+
<td><p><span class="term"><em class="parameter"><code>line_join</code></em> :</span></p></td>
|
1372
|
+
<td> a line join style
|
1373
|
+
</td>
|
1374
|
+
</tr>
|
1375
|
+
</tbody>
|
1376
|
+
</table></div>
|
1377
|
+
</div>
|
1378
|
+
<hr>
|
1379
|
+
<div class="refsect2" lang="en">
|
1380
|
+
<a name="cairo-get-line-join"></a><h3>cairo_get_line_join ()</h3>
|
1381
|
+
<pre class="programlisting"><a class="link" href="cairo-context.html#cairo-line-join-t" title="enum cairo_line_join_t">cairo_line_join_t</a> cairo_get_line_join (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1382
|
+
<p>
|
1383
|
+
Gets the current line join style, as set by <a class="link" href="cairo-context.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>.</p>
|
1384
|
+
<p>
|
1385
|
+
|
1386
|
+
</p>
|
1387
|
+
<div class="variablelist"><table border="0">
|
1388
|
+
<col align="left" valign="top">
|
1389
|
+
<tbody>
|
1390
|
+
<tr>
|
1391
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1392
|
+
<td> a cairo context
|
1393
|
+
</td>
|
1394
|
+
</tr>
|
1395
|
+
<tr>
|
1396
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1397
|
+
<td> the current line join style.
|
1398
|
+
</td>
|
1399
|
+
</tr>
|
1400
|
+
</tbody>
|
1401
|
+
</table></div>
|
1402
|
+
</div>
|
1403
|
+
<hr>
|
1404
|
+
<div class="refsect2" lang="en">
|
1405
|
+
<a name="cairo-set-line-width"></a><h3>cairo_set_line_width ()</h3>
|
1406
|
+
<pre class="programlisting">void cairo_set_line_width (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
1407
|
+
double width);</pre>
|
1408
|
+
<p>
|
1409
|
+
Sets the current line width within the cairo context. The line
|
1410
|
+
width value specifies the diameter of a pen that is circular in
|
1411
|
+
user space, (though device-space pen may be an ellipse in general
|
1412
|
+
due to scaling/shear/rotation of the CTM).
|
1413
|
+
</p>
|
1414
|
+
<p>
|
1415
|
+
Note: When the description above refers to user space and CTM it
|
1416
|
+
refers to the user space and CTM in effect at the time of the
|
1417
|
+
stroking operation, not the user space and CTM in effect at the
|
1418
|
+
time of the call to <a class="link" href="cairo-context.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>. The simplest usage
|
1419
|
+
makes both of these spaces identical. That is, if there is no
|
1420
|
+
change to the CTM between a call to <code class="function">cairo_set_line_with()</code> and the
|
1421
|
+
stroking operation, then one can just pass user-space values to
|
1422
|
+
<a class="link" href="cairo-context.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a> and ignore this note.
|
1423
|
+
</p>
|
1424
|
+
<p>
|
1425
|
+
As with the other stroke parameters, the current line width is
|
1426
|
+
examined by <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-context.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
|
1427
|
+
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
|
1428
|
+
construction.
|
1429
|
+
</p>
|
1430
|
+
<p>
|
1431
|
+
The default line width value is 2.0.</p>
|
1432
|
+
<p>
|
1433
|
+
|
1434
|
+
</p>
|
1435
|
+
<div class="variablelist"><table border="0">
|
1436
|
+
<col align="left" valign="top">
|
1437
|
+
<tbody>
|
1438
|
+
<tr>
|
1439
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1440
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1441
|
+
</td>
|
1442
|
+
</tr>
|
1443
|
+
<tr>
|
1444
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
1445
|
+
<td> a line width
|
1446
|
+
</td>
|
1447
|
+
</tr>
|
1448
|
+
</tbody>
|
1449
|
+
</table></div>
|
1450
|
+
</div>
|
1451
|
+
<hr>
|
1452
|
+
<div class="refsect2" lang="en">
|
1453
|
+
<a name="cairo-get-line-width"></a><h3>cairo_get_line_width ()</h3>
|
1454
|
+
<pre class="programlisting">double cairo_get_line_width (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1455
|
+
<p>
|
1456
|
+
This function returns the current line width value exactly as set by
|
1457
|
+
<a class="link" href="cairo-context.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>. Note that the value is unchanged even if
|
1458
|
+
the CTM has changed between the calls to <a class="link" href="cairo-context.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a> and
|
1459
|
+
<a class="link" href="cairo-context.html#cairo-get-line-width" title="cairo_get_line_width ()"><code class="function">cairo_get_line_width()</code></a>.</p>
|
1460
|
+
<p>
|
1461
|
+
|
1462
|
+
</p>
|
1463
|
+
<div class="variablelist"><table border="0">
|
1464
|
+
<col align="left" valign="top">
|
1465
|
+
<tbody>
|
1466
|
+
<tr>
|
1467
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1468
|
+
<td> a cairo context
|
1469
|
+
</td>
|
1470
|
+
</tr>
|
1471
|
+
<tr>
|
1472
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1473
|
+
<td> the current line width.
|
1474
|
+
</td>
|
1475
|
+
</tr>
|
1476
|
+
</tbody>
|
1477
|
+
</table></div>
|
1478
|
+
</div>
|
1479
|
+
<hr>
|
1480
|
+
<div class="refsect2" lang="en">
|
1481
|
+
<a name="cairo-set-miter-limit"></a><h3>cairo_set_miter_limit ()</h3>
|
1482
|
+
<pre class="programlisting">void cairo_set_miter_limit (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
1483
|
+
double limit);</pre>
|
1484
|
+
<p>
|
1485
|
+
Sets the current miter limit within the cairo context.
|
1486
|
+
</p>
|
1487
|
+
<p>
|
1488
|
+
If the current line join style is set to <a class="link" href="cairo-context.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>
|
1489
|
+
(see <a class="link" href="cairo-context.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>), the miter limit is used to determine
|
1490
|
+
whether the lines should be joined with a bevel instead of a miter.
|
1491
|
+
Cairo divides the length of the miter by the line width.
|
1492
|
+
If the result is greater than the miter limit, the style is
|
1493
|
+
converted to a bevel.
|
1494
|
+
</p>
|
1495
|
+
<p>
|
1496
|
+
As with the other stroke parameters, the current line miter limit is
|
1497
|
+
examined by <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-context.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
|
1498
|
+
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
|
1499
|
+
construction.
|
1500
|
+
</p>
|
1501
|
+
<p>
|
1502
|
+
The default miter limit value is 10.0, which will convert joins
|
1503
|
+
with interior angles less than 11 degrees to bevels instead of
|
1504
|
+
miters. For reference, a miter limit of 2.0 makes the miter cutoff
|
1505
|
+
at 60 degrees, and a miter limit of 1.414 makes the cutoff at 90
|
1506
|
+
degrees.
|
1507
|
+
</p>
|
1508
|
+
<p>
|
1509
|
+
A miter limit for a desired angle can be computed as: miter limit =
|
1510
|
+
1/sin(angle/2)</p>
|
1511
|
+
<p>
|
1512
|
+
|
1513
|
+
</p>
|
1514
|
+
<div class="variablelist"><table border="0">
|
1515
|
+
<col align="left" valign="top">
|
1516
|
+
<tbody>
|
1517
|
+
<tr>
|
1518
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1519
|
+
<td> a cairo context
|
1520
|
+
</td>
|
1521
|
+
</tr>
|
1522
|
+
<tr>
|
1523
|
+
<td><p><span class="term"><em class="parameter"><code>limit</code></em> :</span></p></td>
|
1524
|
+
<td> miter limit to set
|
1525
|
+
</td>
|
1526
|
+
</tr>
|
1527
|
+
</tbody>
|
1528
|
+
</table></div>
|
1529
|
+
</div>
|
1530
|
+
<hr>
|
1531
|
+
<div class="refsect2" lang="en">
|
1532
|
+
<a name="cairo-get-miter-limit"></a><h3>cairo_get_miter_limit ()</h3>
|
1533
|
+
<pre class="programlisting">double cairo_get_miter_limit (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1534
|
+
<p>
|
1535
|
+
Gets the current miter limit, as set by <a class="link" href="cairo-context.html#cairo-set-miter-limit" title="cairo_set_miter_limit ()"><code class="function">cairo_set_miter_limit()</code></a>.</p>
|
1536
|
+
<p>
|
1537
|
+
|
1538
|
+
</p>
|
1539
|
+
<div class="variablelist"><table border="0">
|
1540
|
+
<col align="left" valign="top">
|
1541
|
+
<tbody>
|
1542
|
+
<tr>
|
1543
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1544
|
+
<td> a cairo context
|
1545
|
+
</td>
|
1546
|
+
</tr>
|
1547
|
+
<tr>
|
1548
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1549
|
+
<td> the current miter limit.
|
1550
|
+
</td>
|
1551
|
+
</tr>
|
1552
|
+
</tbody>
|
1553
|
+
</table></div>
|
1554
|
+
</div>
|
1555
|
+
<hr>
|
1556
|
+
<div class="refsect2" lang="en">
|
1557
|
+
<a name="cairo-operator-t"></a><h3>enum cairo_operator_t</h3>
|
1558
|
+
<pre class="programlisting">typedef enum _cairo_operator {
|
1559
|
+
CAIRO_OPERATOR_CLEAR,
|
1560
|
+
|
1561
|
+
CAIRO_OPERATOR_SOURCE,
|
1562
|
+
CAIRO_OPERATOR_OVER,
|
1563
|
+
CAIRO_OPERATOR_IN,
|
1564
|
+
CAIRO_OPERATOR_OUT,
|
1565
|
+
CAIRO_OPERATOR_ATOP,
|
1566
|
+
|
1567
|
+
CAIRO_OPERATOR_DEST,
|
1568
|
+
CAIRO_OPERATOR_DEST_OVER,
|
1569
|
+
CAIRO_OPERATOR_DEST_IN,
|
1570
|
+
CAIRO_OPERATOR_DEST_OUT,
|
1571
|
+
CAIRO_OPERATOR_DEST_ATOP,
|
1572
|
+
|
1573
|
+
CAIRO_OPERATOR_XOR,
|
1574
|
+
CAIRO_OPERATOR_ADD,
|
1575
|
+
CAIRO_OPERATOR_SATURATE
|
1576
|
+
} cairo_operator_t;
|
1577
|
+
</pre>
|
1578
|
+
<p>
|
1579
|
+
<a class="link" href="cairo-context.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a> is used to set the compositing operator for all cairo
|
1580
|
+
drawing operations.
|
1581
|
+
</p>
|
1582
|
+
<p>
|
1583
|
+
The default operator is <a class="link" href="cairo-context.html#CAIRO-OPERATOR-OVER:CAPS"><code class="literal">CAIRO_OPERATOR_OVER</code></a>.
|
1584
|
+
</p>
|
1585
|
+
<p>
|
1586
|
+
The operators marked as <em class="firstterm">unbounded</em> modify their
|
1587
|
+
destination even outside of the mask layer (that is, their effect is not
|
1588
|
+
bound by the mask layer). However, their effect can still be limited by
|
1589
|
+
way of clipping.
|
1590
|
+
</p>
|
1591
|
+
<p>
|
1592
|
+
To keep things simple, the operator descriptions here
|
1593
|
+
document the behavior for when both source and destination are either fully
|
1594
|
+
transparent or fully opaque. The actual implementation works for
|
1595
|
+
translucent layers too.
|
1596
|
+
For a more detailed explanation of the effects of each operator, including
|
1597
|
+
the mathematical definitions, see
|
1598
|
+
<a class="ulink" href="http://cairographics.org/operators/" target="_top">http://cairographics.org/operators/</a>.</p>
|
1599
|
+
<p>
|
1600
|
+
|
1601
|
+
</p>
|
1602
|
+
<div class="variablelist"><table border="0">
|
1603
|
+
<col align="left" valign="top">
|
1604
|
+
<tbody>
|
1605
|
+
<tr>
|
1606
|
+
<td><p><a name="CAIRO-OPERATOR-CLEAR:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_CLEAR</code></span></p></td>
|
1607
|
+
<td> clear destination layer (bounded)
|
1608
|
+
</td>
|
1609
|
+
</tr>
|
1610
|
+
<tr>
|
1611
|
+
<td><p><a name="CAIRO-OPERATOR-SOURCE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_SOURCE</code></span></p></td>
|
1612
|
+
<td> replace destination layer (bounded)
|
1613
|
+
</td>
|
1614
|
+
</tr>
|
1615
|
+
<tr>
|
1616
|
+
<td><p><a name="CAIRO-OPERATOR-OVER:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_OVER</code></span></p></td>
|
1617
|
+
<td> draw source layer on top of destination layer
|
1618
|
+
(bounded)
|
1619
|
+
</td>
|
1620
|
+
</tr>
|
1621
|
+
<tr>
|
1622
|
+
<td><p><a name="CAIRO-OPERATOR-IN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_IN</code></span></p></td>
|
1623
|
+
<td> draw source where there was destination content
|
1624
|
+
(unbounded)
|
1625
|
+
</td>
|
1626
|
+
</tr>
|
1627
|
+
<tr>
|
1628
|
+
<td><p><a name="CAIRO-OPERATOR-OUT:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_OUT</code></span></p></td>
|
1629
|
+
<td> draw source where there was no destination
|
1630
|
+
content (unbounded)
|
1631
|
+
</td>
|
1632
|
+
</tr>
|
1633
|
+
<tr>
|
1634
|
+
<td><p><a name="CAIRO-OPERATOR-ATOP:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_ATOP</code></span></p></td>
|
1635
|
+
<td> draw source on top of destination content and
|
1636
|
+
only there
|
1637
|
+
</td>
|
1638
|
+
</tr>
|
1639
|
+
<tr>
|
1640
|
+
<td><p><a name="CAIRO-OPERATOR-DEST:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST</code></span></p></td>
|
1641
|
+
<td> ignore the source
|
1642
|
+
</td>
|
1643
|
+
</tr>
|
1644
|
+
<tr>
|
1645
|
+
<td><p><a name="CAIRO-OPERATOR-DEST-OVER:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_OVER</code></span></p></td>
|
1646
|
+
<td> draw destination on top of source
|
1647
|
+
</td>
|
1648
|
+
</tr>
|
1649
|
+
<tr>
|
1650
|
+
<td><p><a name="CAIRO-OPERATOR-DEST-IN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_IN</code></span></p></td>
|
1651
|
+
<td> leave destination only where there was
|
1652
|
+
source content (unbounded)
|
1653
|
+
</td>
|
1654
|
+
</tr>
|
1655
|
+
<tr>
|
1656
|
+
<td><p><a name="CAIRO-OPERATOR-DEST-OUT:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_OUT</code></span></p></td>
|
1657
|
+
<td> leave destination only where there was no
|
1658
|
+
source content
|
1659
|
+
</td>
|
1660
|
+
</tr>
|
1661
|
+
<tr>
|
1662
|
+
<td><p><a name="CAIRO-OPERATOR-DEST-ATOP:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_ATOP</code></span></p></td>
|
1663
|
+
<td> leave destination on top of source content
|
1664
|
+
and only there (unbounded)
|
1665
|
+
</td>
|
1666
|
+
</tr>
|
1667
|
+
<tr>
|
1668
|
+
<td><p><a name="CAIRO-OPERATOR-XOR:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_XOR</code></span></p></td>
|
1669
|
+
<td> source and destination are shown where there is only
|
1670
|
+
one of them
|
1671
|
+
</td>
|
1672
|
+
</tr>
|
1673
|
+
<tr>
|
1674
|
+
<td><p><a name="CAIRO-OPERATOR-ADD:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_ADD</code></span></p></td>
|
1675
|
+
<td> source and destination layers are accumulated
|
1676
|
+
</td>
|
1677
|
+
</tr>
|
1678
|
+
<tr>
|
1679
|
+
<td><p><a name="CAIRO-OPERATOR-SATURATE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_SATURATE</code></span></p></td>
|
1680
|
+
<td> like over, but assuming source and dest are
|
1681
|
+
disjoint geometries
|
1682
|
+
</td>
|
1683
|
+
</tr>
|
1684
|
+
</tbody>
|
1685
|
+
</table></div>
|
1686
|
+
</div>
|
1687
|
+
<hr>
|
1688
|
+
<div class="refsect2" lang="en">
|
1689
|
+
<a name="cairo-set-operator"></a><h3>cairo_set_operator ()</h3>
|
1690
|
+
<pre class="programlisting">void cairo_set_operator (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
1691
|
+
<a class="link" href="cairo-context.html#cairo-operator-t" title="enum cairo_operator_t">cairo_operator_t</a> op);</pre>
|
1692
|
+
<p>
|
1693
|
+
Sets the compositing operator to be used for all drawing
|
1694
|
+
operations. See <a class="link" href="cairo-context.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a> for details on the semantics of
|
1695
|
+
each available compositing operator.
|
1696
|
+
</p>
|
1697
|
+
<p>
|
1698
|
+
The default operator is <a class="link" href="cairo-context.html#CAIRO-OPERATOR-OVER:CAPS"><code class="literal">CAIRO_OPERATOR_OVER</code></a>.</p>
|
1699
|
+
<p>
|
1700
|
+
|
1701
|
+
</p>
|
1702
|
+
<div class="variablelist"><table border="0">
|
1703
|
+
<col align="left" valign="top">
|
1704
|
+
<tbody>
|
1705
|
+
<tr>
|
1706
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1707
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1708
|
+
</td>
|
1709
|
+
</tr>
|
1710
|
+
<tr>
|
1711
|
+
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
|
1712
|
+
<td> a compositing operator, specified as a <a class="link" href="cairo-context.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a>
|
1713
|
+
</td>
|
1714
|
+
</tr>
|
1715
|
+
</tbody>
|
1716
|
+
</table></div>
|
1717
|
+
</div>
|
1718
|
+
<hr>
|
1719
|
+
<div class="refsect2" lang="en">
|
1720
|
+
<a name="cairo-get-operator"></a><h3>cairo_get_operator ()</h3>
|
1721
|
+
<pre class="programlisting"><a class="link" href="cairo-context.html#cairo-operator-t" title="enum cairo_operator_t">cairo_operator_t</a> cairo_get_operator (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1722
|
+
<p>
|
1723
|
+
Gets the current compositing operator for a cairo context.</p>
|
1724
|
+
<p>
|
1725
|
+
|
1726
|
+
</p>
|
1727
|
+
<div class="variablelist"><table border="0">
|
1728
|
+
<col align="left" valign="top">
|
1729
|
+
<tbody>
|
1730
|
+
<tr>
|
1731
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1732
|
+
<td> a cairo context
|
1733
|
+
</td>
|
1734
|
+
</tr>
|
1735
|
+
<tr>
|
1736
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1737
|
+
<td> the current compositing operator.
|
1738
|
+
</td>
|
1739
|
+
</tr>
|
1740
|
+
</tbody>
|
1741
|
+
</table></div>
|
1742
|
+
</div>
|
1743
|
+
<hr>
|
1744
|
+
<div class="refsect2" lang="en">
|
1745
|
+
<a name="cairo-set-tolerance"></a><h3>cairo_set_tolerance ()</h3>
|
1746
|
+
<pre class="programlisting">void cairo_set_tolerance (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
1747
|
+
double tolerance);</pre>
|
1748
|
+
<p>
|
1749
|
+
Sets the tolerance used when converting paths into trapezoids.
|
1750
|
+
Curved segments of the path will be subdivided until the maximum
|
1751
|
+
deviation between the original path and the polygonal approximation
|
1752
|
+
is less than <em class="parameter"><code>tolerance</code></em>. The default value is 0.1. A larger
|
1753
|
+
value will give better performance, a smaller value, better
|
1754
|
+
appearance. (Reducing the value from the default value of 0.1
|
1755
|
+
is unlikely to improve appearance significantly.)</p>
|
1756
|
+
<p>
|
1757
|
+
|
1758
|
+
</p>
|
1759
|
+
<div class="variablelist"><table border="0">
|
1760
|
+
<col align="left" valign="top">
|
1761
|
+
<tbody>
|
1762
|
+
<tr>
|
1763
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1764
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1765
|
+
</td>
|
1766
|
+
</tr>
|
1767
|
+
<tr>
|
1768
|
+
<td><p><span class="term"><em class="parameter"><code>tolerance</code></em> :</span></p></td>
|
1769
|
+
<td> the tolerance, in device units (typically pixels)
|
1770
|
+
</td>
|
1771
|
+
</tr>
|
1772
|
+
</tbody>
|
1773
|
+
</table></div>
|
1774
|
+
</div>
|
1775
|
+
<hr>
|
1776
|
+
<div class="refsect2" lang="en">
|
1777
|
+
<a name="cairo-get-tolerance"></a><h3>cairo_get_tolerance ()</h3>
|
1778
|
+
<pre class="programlisting">double cairo_get_tolerance (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1779
|
+
<p>
|
1780
|
+
Gets the current tolerance value, as set by <a class="link" href="cairo-context.html#cairo-set-tolerance" title="cairo_set_tolerance ()"><code class="function">cairo_set_tolerance()</code></a>.</p>
|
1781
|
+
<p>
|
1782
|
+
|
1783
|
+
</p>
|
1784
|
+
<div class="variablelist"><table border="0">
|
1785
|
+
<col align="left" valign="top">
|
1786
|
+
<tbody>
|
1787
|
+
<tr>
|
1788
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1789
|
+
<td> a cairo context
|
1790
|
+
</td>
|
1791
|
+
</tr>
|
1792
|
+
<tr>
|
1793
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1794
|
+
<td> the current tolerance value.
|
1795
|
+
</td>
|
1796
|
+
</tr>
|
1797
|
+
</tbody>
|
1798
|
+
</table></div>
|
1799
|
+
</div>
|
1800
|
+
<hr>
|
1801
|
+
<div class="refsect2" lang="en">
|
1802
|
+
<a name="cairo-clip"></a><h3>cairo_clip ()</h3>
|
1803
|
+
<pre class="programlisting">void cairo_clip (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1804
|
+
<p>
|
1805
|
+
Establishes a new clip region by intersecting the current clip
|
1806
|
+
region with the current path as it would be filled by <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>
|
1807
|
+
and according to the current fill rule (see <a class="link" href="cairo-context.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a>).
|
1808
|
+
</p>
|
1809
|
+
<p>
|
1810
|
+
After <a class="link" href="cairo-context.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>, the current path will be cleared from the cairo
|
1811
|
+
context.
|
1812
|
+
</p>
|
1813
|
+
<p>
|
1814
|
+
The current clip region affects all drawing operations by
|
1815
|
+
effectively masking out any changes to the surface that are outside
|
1816
|
+
the current clip region.
|
1817
|
+
</p>
|
1818
|
+
<p>
|
1819
|
+
Calling <a class="link" href="cairo-context.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> can only make the clip region smaller, never
|
1820
|
+
larger. But the current clip is part of the graphics state, so a
|
1821
|
+
temporary restriction of the clip region can be achieved by
|
1822
|
+
calling <a class="link" href="cairo-context.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> within a <a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>/<a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>
|
1823
|
+
pair. The only other means of increasing the size of the clip
|
1824
|
+
region is <a class="link" href="cairo-context.html#cairo-reset-clip" title="cairo_reset_clip ()"><code class="function">cairo_reset_clip()</code></a>.</p>
|
1825
|
+
<p>
|
1826
|
+
|
1827
|
+
</p>
|
1828
|
+
<div class="variablelist"><table border="0">
|
1829
|
+
<col align="left" valign="top">
|
1830
|
+
<tbody><tr>
|
1831
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1832
|
+
<td> a cairo context
|
1833
|
+
</td>
|
1834
|
+
</tr></tbody>
|
1835
|
+
</table></div>
|
1836
|
+
</div>
|
1837
|
+
<hr>
|
1838
|
+
<div class="refsect2" lang="en">
|
1839
|
+
<a name="cairo-clip-preserve"></a><h3>cairo_clip_preserve ()</h3>
|
1840
|
+
<pre class="programlisting">void cairo_clip_preserve (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1841
|
+
<p>
|
1842
|
+
Establishes a new clip region by intersecting the current clip
|
1843
|
+
region with the current path as it would be filled by <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>
|
1844
|
+
and according to the current fill rule (see <a class="link" href="cairo-context.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a>).
|
1845
|
+
</p>
|
1846
|
+
<p>
|
1847
|
+
Unlike <a class="link" href="cairo-context.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>, <a class="link" href="cairo-context.html#cairo-clip-preserve" title="cairo_clip_preserve ()"><code class="function">cairo_clip_preserve()</code></a> preserves the path within
|
1848
|
+
the cairo context.
|
1849
|
+
</p>
|
1850
|
+
<p>
|
1851
|
+
The current clip region affects all drawing operations by
|
1852
|
+
effectively masking out any changes to the surface that are outside
|
1853
|
+
the current clip region.
|
1854
|
+
</p>
|
1855
|
+
<p>
|
1856
|
+
Calling <a class="link" href="cairo-context.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> can only make the clip region smaller, never
|
1857
|
+
larger. But the current clip is part of the graphics state, so a
|
1858
|
+
temporary restriction of the clip region can be achieved by
|
1859
|
+
calling <a class="link" href="cairo-context.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> within a <a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>/<a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>
|
1860
|
+
pair. The only other means of increasing the size of the clip
|
1861
|
+
region is <a class="link" href="cairo-context.html#cairo-reset-clip" title="cairo_reset_clip ()"><code class="function">cairo_reset_clip()</code></a>.</p>
|
1862
|
+
<p>
|
1863
|
+
|
1864
|
+
</p>
|
1865
|
+
<div class="variablelist"><table border="0">
|
1866
|
+
<col align="left" valign="top">
|
1867
|
+
<tbody><tr>
|
1868
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1869
|
+
<td> a cairo context
|
1870
|
+
</td>
|
1871
|
+
</tr></tbody>
|
1872
|
+
</table></div>
|
1873
|
+
</div>
|
1874
|
+
<hr>
|
1875
|
+
<div class="refsect2" lang="en">
|
1876
|
+
<a name="cairo-clip-extents"></a><h3>cairo_clip_extents ()</h3>
|
1877
|
+
<pre class="programlisting">void cairo_clip_extents (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
1878
|
+
double *x1,
|
1879
|
+
double *y1,
|
1880
|
+
double *x2,
|
1881
|
+
double *y2);</pre>
|
1882
|
+
<p>
|
1883
|
+
Computes a bounding box in user coordinates covering the area inside the
|
1884
|
+
current clip.</p>
|
1885
|
+
<p>
|
1886
|
+
|
1887
|
+
</p>
|
1888
|
+
<div class="variablelist"><table border="0">
|
1889
|
+
<col align="left" valign="top">
|
1890
|
+
<tbody>
|
1891
|
+
<tr>
|
1892
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1893
|
+
<td> a cairo context
|
1894
|
+
</td>
|
1895
|
+
</tr>
|
1896
|
+
<tr>
|
1897
|
+
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
|
1898
|
+
<td> left of the resulting extents
|
1899
|
+
</td>
|
1900
|
+
</tr>
|
1901
|
+
<tr>
|
1902
|
+
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
|
1903
|
+
<td> top of the resulting extents
|
1904
|
+
</td>
|
1905
|
+
</tr>
|
1906
|
+
<tr>
|
1907
|
+
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
|
1908
|
+
<td> right of the resulting extents
|
1909
|
+
</td>
|
1910
|
+
</tr>
|
1911
|
+
<tr>
|
1912
|
+
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
|
1913
|
+
<td> bottom of the resulting extents
|
1914
|
+
</td>
|
1915
|
+
</tr>
|
1916
|
+
</tbody>
|
1917
|
+
</table></div>
|
1918
|
+
<p class="since">Since 1.4
|
1919
|
+
</p>
|
1920
|
+
</div>
|
1921
|
+
<hr>
|
1922
|
+
<div class="refsect2" lang="en">
|
1923
|
+
<a name="cairo-reset-clip"></a><h3>cairo_reset_clip ()</h3>
|
1924
|
+
<pre class="programlisting">void cairo_reset_clip (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
1925
|
+
<p>
|
1926
|
+
Reset the current clip region to its original, unrestricted
|
1927
|
+
state. That is, set the clip region to an infinitely large shape
|
1928
|
+
containing the target surface. Equivalently, if infinity is too
|
1929
|
+
hard to grasp, one can imagine the clip region being reset to the
|
1930
|
+
exact bounds of the target surface.
|
1931
|
+
</p>
|
1932
|
+
<p>
|
1933
|
+
Note that code meant to be reusable should not call
|
1934
|
+
<a class="link" href="cairo-context.html#cairo-reset-clip" title="cairo_reset_clip ()"><code class="function">cairo_reset_clip()</code></a> as it will cause results unexpected by
|
1935
|
+
higher-level code which calls <a class="link" href="cairo-context.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>. Consider using
|
1936
|
+
<a class="link" href="cairo-context.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> and <a class="link" href="cairo-context.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> around <a class="link" href="cairo-context.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> as a more
|
1937
|
+
robust means of temporarily restricting the clip region.</p>
|
1938
|
+
<p>
|
1939
|
+
|
1940
|
+
</p>
|
1941
|
+
<div class="variablelist"><table border="0">
|
1942
|
+
<col align="left" valign="top">
|
1943
|
+
<tbody><tr>
|
1944
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1945
|
+
<td> a cairo context
|
1946
|
+
</td>
|
1947
|
+
</tr></tbody>
|
1948
|
+
</table></div>
|
1949
|
+
</div>
|
1950
|
+
<hr>
|
1951
|
+
<div class="refsect2" lang="en">
|
1952
|
+
<a name="cairo-rectangle-t"></a><h3>cairo_rectangle_t</h3>
|
1953
|
+
<pre class="programlisting">typedef struct {
|
1954
|
+
double x, y, width, height;
|
1955
|
+
} cairo_rectangle_t;
|
1956
|
+
</pre>
|
1957
|
+
<p>
|
1958
|
+
A data structure for holding a rectangle.</p>
|
1959
|
+
<p>
|
1960
|
+
|
1961
|
+
</p>
|
1962
|
+
<div class="variablelist"><table border="0">
|
1963
|
+
<col align="left" valign="top">
|
1964
|
+
<tbody>
|
1965
|
+
<tr>
|
1966
|
+
<td><p><span class="term">double <em class="structfield"><code>x</code></em>;</span></p></td>
|
1967
|
+
<td> X coordinate of the left side of the rectangle
|
1968
|
+
</td>
|
1969
|
+
</tr>
|
1970
|
+
<tr>
|
1971
|
+
<td><p><span class="term">double <em class="structfield"><code>y</code></em>;</span></p></td>
|
1972
|
+
<td> Y coordinate of the the top side of the rectangle
|
1973
|
+
</td>
|
1974
|
+
</tr>
|
1975
|
+
<tr>
|
1976
|
+
<td><p><span class="term">double <em class="structfield"><code>width</code></em>;</span></p></td>
|
1977
|
+
<td> width of the rectangle
|
1978
|
+
</td>
|
1979
|
+
</tr>
|
1980
|
+
<tr>
|
1981
|
+
<td><p><span class="term">double <em class="structfield"><code>height</code></em>;</span></p></td>
|
1982
|
+
<td> height of the rectangle
|
1983
|
+
</td>
|
1984
|
+
</tr>
|
1985
|
+
</tbody>
|
1986
|
+
</table></div>
|
1987
|
+
<p class="since">Since 1.4
|
1988
|
+
</p>
|
1989
|
+
</div>
|
1990
|
+
<hr>
|
1991
|
+
<div class="refsect2" lang="en">
|
1992
|
+
<a name="cairo-rectangle-list-t"></a><h3>cairo_rectangle_list_t</h3>
|
1993
|
+
<pre class="programlisting">typedef struct {
|
1994
|
+
cairo_status_t status;
|
1995
|
+
cairo_rectangle_t *rectangles;
|
1996
|
+
int num_rectangles;
|
1997
|
+
} cairo_rectangle_list_t;
|
1998
|
+
</pre>
|
1999
|
+
<p>
|
2000
|
+
A data structure for holding a dynamically allocated
|
2001
|
+
array of rectangles.</p>
|
2002
|
+
<p>
|
2003
|
+
|
2004
|
+
</p>
|
2005
|
+
<div class="variablelist"><table border="0">
|
2006
|
+
<col align="left" valign="top">
|
2007
|
+
<tbody>
|
2008
|
+
<tr>
|
2009
|
+
<td><p><span class="term"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> <em class="structfield"><code>status</code></em>;</span></p></td>
|
2010
|
+
<td> Error status of the rectangle list
|
2011
|
+
</td>
|
2012
|
+
</tr>
|
2013
|
+
<tr>
|
2014
|
+
<td><p><span class="term"><a class="link" href="cairo-context.html#cairo-rectangle-t" title="cairo_rectangle_t">cairo_rectangle_t</a> *<em class="structfield"><code>rectangles</code></em>;</span></p></td>
|
2015
|
+
<td> Array containing the rectangles
|
2016
|
+
</td>
|
2017
|
+
</tr>
|
2018
|
+
<tr>
|
2019
|
+
<td><p><span class="term">int <em class="structfield"><code>num_rectangles</code></em>;</span></p></td>
|
2020
|
+
<td> Number of rectangles in this list
|
2021
|
+
</td>
|
2022
|
+
</tr>
|
2023
|
+
</tbody>
|
2024
|
+
</table></div>
|
2025
|
+
<p class="since">Since 1.4
|
2026
|
+
</p>
|
2027
|
+
</div>
|
2028
|
+
<hr>
|
2029
|
+
<div class="refsect2" lang="en">
|
2030
|
+
<a name="cairo-rectangle-list-destroy"></a><h3>cairo_rectangle_list_destroy ()</h3>
|
2031
|
+
<pre class="programlisting">void cairo_rectangle_list_destroy (<a class="link" href="cairo-context.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t">cairo_rectangle_list_t</a> *rectangle_list);</pre>
|
2032
|
+
<p>
|
2033
|
+
Unconditionally frees <em class="parameter"><code>rectangle_list</code></em> and all associated
|
2034
|
+
references. After this call, the <em class="parameter"><code>rectangle_list</code></em> pointer must not
|
2035
|
+
be dereferenced.</p>
|
2036
|
+
<p>
|
2037
|
+
|
2038
|
+
</p>
|
2039
|
+
<div class="variablelist"><table border="0">
|
2040
|
+
<col align="left" valign="top">
|
2041
|
+
<tbody><tr>
|
2042
|
+
<td><p><span class="term"><em class="parameter"><code>rectangle_list</code></em> :</span></p></td>
|
2043
|
+
<td> a rectangle list, as obtained from <code class="function">cairo_copy_clip_rectangles()</code>
|
2044
|
+
</td>
|
2045
|
+
</tr></tbody>
|
2046
|
+
</table></div>
|
2047
|
+
<p class="since">Since 1.4
|
2048
|
+
</p>
|
2049
|
+
</div>
|
2050
|
+
<hr>
|
2051
|
+
<div class="refsect2" lang="en">
|
2052
|
+
<a name="cairo-copy-clip-rectangle-list"></a><h3>cairo_copy_clip_rectangle_list ()</h3>
|
2053
|
+
<pre class="programlisting"><a class="link" href="cairo-context.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t">cairo_rectangle_list_t</a>* cairo_copy_clip_rectangle_list (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
2054
|
+
<p>
|
2055
|
+
Gets the current clip region as a list of rectangles in user coordinates.
|
2056
|
+
Never returns <code class="literal">NULL</code>.
|
2057
|
+
</p>
|
2058
|
+
<p>
|
2059
|
+
The status in the list may be <a class="link" href="cairo-error-status.html#CAIRO-STATUS-CLIP-NOT-REPRESENTABLE:CAPS"><code class="literal">CAIRO_STATUS_CLIP_NOT_REPRESENTABLE</code></a> to
|
2060
|
+
indicate that the clip region cannot be represented as a list of
|
2061
|
+
user-space rectangles. The status may have other values to indicate
|
2062
|
+
other errors.</p>
|
2063
|
+
<p>
|
2064
|
+
|
2065
|
+
</p>
|
2066
|
+
<div class="variablelist"><table border="0">
|
2067
|
+
<col align="left" valign="top">
|
2068
|
+
<tbody>
|
2069
|
+
<tr>
|
2070
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2071
|
+
<td> a cairo context
|
2072
|
+
</td>
|
2073
|
+
</tr>
|
2074
|
+
<tr>
|
2075
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2076
|
+
<td> the current clip region as a list of rectangles in user coordinates,
|
2077
|
+
which should be destroyed using <a class="link" href="cairo-context.html#cairo-rectangle-list-destroy" title="cairo_rectangle_list_destroy ()"><code class="function">cairo_rectangle_list_destroy()</code></a>.
|
2078
|
+
|
2079
|
+
</td>
|
2080
|
+
</tr>
|
2081
|
+
</tbody>
|
2082
|
+
</table></div>
|
2083
|
+
<p class="since">Since 1.4
|
2084
|
+
</p>
|
2085
|
+
</div>
|
2086
|
+
<hr>
|
2087
|
+
<div class="refsect2" lang="en">
|
2088
|
+
<a name="cairo-fill"></a><h3>cairo_fill ()</h3>
|
2089
|
+
<pre class="programlisting">void cairo_fill (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
2090
|
+
<p>
|
2091
|
+
A drawing operator that fills the current path according to the
|
2092
|
+
current fill rule, (each sub-path is implicitly closed before being
|
2093
|
+
filled). After <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, the current path will be cleared from
|
2094
|
+
the cairo context. See <a class="link" href="cairo-context.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and
|
2095
|
+
<a class="link" href="cairo-context.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a>.</p>
|
2096
|
+
<p>
|
2097
|
+
|
2098
|
+
</p>
|
2099
|
+
<div class="variablelist"><table border="0">
|
2100
|
+
<col align="left" valign="top">
|
2101
|
+
<tbody><tr>
|
2102
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2103
|
+
<td> a cairo context
|
2104
|
+
</td>
|
2105
|
+
</tr></tbody>
|
2106
|
+
</table></div>
|
2107
|
+
</div>
|
2108
|
+
<hr>
|
2109
|
+
<div class="refsect2" lang="en">
|
2110
|
+
<a name="cairo-fill-preserve"></a><h3>cairo_fill_preserve ()</h3>
|
2111
|
+
<pre class="programlisting">void cairo_fill_preserve (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
2112
|
+
<p>
|
2113
|
+
A drawing operator that fills the current path according to the
|
2114
|
+
current fill rule, (each sub-path is implicitly closed before being
|
2115
|
+
filled). Unlike <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-context.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a> preserves the
|
2116
|
+
path within the cairo context.
|
2117
|
+
</p>
|
2118
|
+
<p>
|
2119
|
+
See <a class="link" href="cairo-context.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>.</p>
|
2120
|
+
<p>
|
2121
|
+
|
2122
|
+
</p>
|
2123
|
+
<div class="variablelist"><table border="0">
|
2124
|
+
<col align="left" valign="top">
|
2125
|
+
<tbody><tr>
|
2126
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2127
|
+
<td> a cairo context
|
2128
|
+
</td>
|
2129
|
+
</tr></tbody>
|
2130
|
+
</table></div>
|
2131
|
+
</div>
|
2132
|
+
<hr>
|
2133
|
+
<div class="refsect2" lang="en">
|
2134
|
+
<a name="cairo-fill-extents"></a><h3>cairo_fill_extents ()</h3>
|
2135
|
+
<pre class="programlisting">void cairo_fill_extents (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
2136
|
+
double *x1,
|
2137
|
+
double *y1,
|
2138
|
+
double *x2,
|
2139
|
+
double *y2);</pre>
|
2140
|
+
<p>
|
2141
|
+
Computes a bounding box in user coordinates covering the area that
|
2142
|
+
would be affected, (the "inked" area), by a <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a> operation
|
2143
|
+
given the current path and fill parameters. If the current path is
|
2144
|
+
empty, returns an empty rectangle ((0,0), (0,0)). Surface
|
2145
|
+
dimensions and clipping are not taken into account.
|
2146
|
+
</p>
|
2147
|
+
<p>
|
2148
|
+
Contrast with <a class="link" href="cairo-paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a>, which is similar, but returns
|
2149
|
+
non-zero extents for some paths with no inked area, (such as a
|
2150
|
+
simple line segment).
|
2151
|
+
</p>
|
2152
|
+
<p>
|
2153
|
+
Note that <a class="link" href="cairo-context.html#cairo-fill-extents" title="cairo_fill_extents ()"><code class="function">cairo_fill_extents()</code></a> must necessarily do more work to
|
2154
|
+
compute the precise inked areas in light of the fill rule, so
|
2155
|
+
<a class="link" href="cairo-paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> may be more desirable for sake of performance
|
2156
|
+
if the non-inked path extents are desired.
|
2157
|
+
</p>
|
2158
|
+
<p>
|
2159
|
+
See <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-context.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-context.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a>.</p>
|
2160
|
+
<p>
|
2161
|
+
|
2162
|
+
</p>
|
2163
|
+
<div class="variablelist"><table border="0">
|
2164
|
+
<col align="left" valign="top">
|
2165
|
+
<tbody>
|
2166
|
+
<tr>
|
2167
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2168
|
+
<td> a cairo context
|
2169
|
+
</td>
|
2170
|
+
</tr>
|
2171
|
+
<tr>
|
2172
|
+
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
|
2173
|
+
<td> left of the resulting extents
|
2174
|
+
</td>
|
2175
|
+
</tr>
|
2176
|
+
<tr>
|
2177
|
+
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
|
2178
|
+
<td> top of the resulting extents
|
2179
|
+
</td>
|
2180
|
+
</tr>
|
2181
|
+
<tr>
|
2182
|
+
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
|
2183
|
+
<td> right of the resulting extents
|
2184
|
+
</td>
|
2185
|
+
</tr>
|
2186
|
+
<tr>
|
2187
|
+
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
|
2188
|
+
<td> bottom of the resulting extents
|
2189
|
+
</td>
|
2190
|
+
</tr>
|
2191
|
+
</tbody>
|
2192
|
+
</table></div>
|
2193
|
+
</div>
|
2194
|
+
<hr>
|
2195
|
+
<div class="refsect2" lang="en">
|
2196
|
+
<a name="cairo-in-fill"></a><h3>cairo_in_fill ()</h3>
|
2197
|
+
<pre class="programlisting"><a class="link" href="cairo-types.html#cairo-bool-t" title="cairo_bool_t">cairo_bool_t</a> cairo_in_fill (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
2198
|
+
double x,
|
2199
|
+
double y);</pre>
|
2200
|
+
<p>
|
2201
|
+
Tests whether the given point is inside the area that would be
|
2202
|
+
affected by a <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a> operation given the current path and
|
2203
|
+
filling parameters. Surface dimensions and clipping are not taken
|
2204
|
+
into account.
|
2205
|
+
</p>
|
2206
|
+
<p>
|
2207
|
+
See <a class="link" href="cairo-context.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-context.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-context.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a>.</p>
|
2208
|
+
<p>
|
2209
|
+
|
2210
|
+
</p>
|
2211
|
+
<div class="variablelist"><table border="0">
|
2212
|
+
<col align="left" valign="top">
|
2213
|
+
<tbody>
|
2214
|
+
<tr>
|
2215
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2216
|
+
<td> a cairo context
|
2217
|
+
</td>
|
2218
|
+
</tr>
|
2219
|
+
<tr>
|
2220
|
+
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
|
2221
|
+
<td> X coordinate of the point to test
|
2222
|
+
</td>
|
2223
|
+
</tr>
|
2224
|
+
<tr>
|
2225
|
+
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
|
2226
|
+
<td> Y coordinate of the point to test
|
2227
|
+
</td>
|
2228
|
+
</tr>
|
2229
|
+
<tr>
|
2230
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2231
|
+
<td> A non-zero value if the point is inside, or zero if
|
2232
|
+
outside.
|
2233
|
+
</td>
|
2234
|
+
</tr>
|
2235
|
+
</tbody>
|
2236
|
+
</table></div>
|
2237
|
+
</div>
|
2238
|
+
<hr>
|
2239
|
+
<div class="refsect2" lang="en">
|
2240
|
+
<a name="cairo-mask"></a><h3>cairo_mask ()</h3>
|
2241
|
+
<pre class="programlisting">void cairo_mask (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
2242
|
+
<a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a> *pattern);</pre>
|
2243
|
+
<p>
|
2244
|
+
A drawing operator that paints the current source
|
2245
|
+
using the alpha channel of <em class="parameter"><code>pattern</code></em> as a mask. (Opaque
|
2246
|
+
areas of <em class="parameter"><code>pattern</code></em> are painted with the source, transparent
|
2247
|
+
areas are not painted.)</p>
|
2248
|
+
<p>
|
2249
|
+
|
2250
|
+
</p>
|
2251
|
+
<div class="variablelist"><table border="0">
|
2252
|
+
<col align="left" valign="top">
|
2253
|
+
<tbody>
|
2254
|
+
<tr>
|
2255
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2256
|
+
<td> a cairo context
|
2257
|
+
</td>
|
2258
|
+
</tr>
|
2259
|
+
<tr>
|
2260
|
+
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
|
2261
|
+
<td> a <a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
|
2262
|
+
</td>
|
2263
|
+
</tr>
|
2264
|
+
</tbody>
|
2265
|
+
</table></div>
|
2266
|
+
</div>
|
2267
|
+
<hr>
|
2268
|
+
<div class="refsect2" lang="en">
|
2269
|
+
<a name="cairo-mask-surface"></a><h3>cairo_mask_surface ()</h3>
|
2270
|
+
<pre class="programlisting">void cairo_mask_surface (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
2271
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
2272
|
+
double surface_x,
|
2273
|
+
double surface_y);</pre>
|
2274
|
+
<p>
|
2275
|
+
A drawing operator that paints the current source
|
2276
|
+
using the alpha channel of <em class="parameter"><code>surface</code></em> as a mask. (Opaque
|
2277
|
+
areas of <em class="parameter"><code>surface</code></em> are painted with the source, transparent
|
2278
|
+
areas are not painted.)</p>
|
2279
|
+
<p>
|
2280
|
+
|
2281
|
+
</p>
|
2282
|
+
<div class="variablelist"><table border="0">
|
2283
|
+
<col align="left" valign="top">
|
2284
|
+
<tbody>
|
2285
|
+
<tr>
|
2286
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2287
|
+
<td> a cairo context
|
2288
|
+
</td>
|
2289
|
+
</tr>
|
2290
|
+
<tr>
|
2291
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
2292
|
+
<td> a <a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
2293
|
+
</td>
|
2294
|
+
</tr>
|
2295
|
+
<tr>
|
2296
|
+
<td><p><span class="term"><em class="parameter"><code>surface_x</code></em> :</span></p></td>
|
2297
|
+
<td> X coordinate at which to place the origin of <em class="parameter"><code>surface</code></em>
|
2298
|
+
</td>
|
2299
|
+
</tr>
|
2300
|
+
<tr>
|
2301
|
+
<td><p><span class="term"><em class="parameter"><code>surface_y</code></em> :</span></p></td>
|
2302
|
+
<td> Y coordinate at which to place the origin of <em class="parameter"><code>surface</code></em>
|
2303
|
+
</td>
|
2304
|
+
</tr>
|
2305
|
+
</tbody>
|
2306
|
+
</table></div>
|
2307
|
+
</div>
|
2308
|
+
<hr>
|
2309
|
+
<div class="refsect2" lang="en">
|
2310
|
+
<a name="cairo-paint"></a><h3>cairo_paint ()</h3>
|
2311
|
+
<pre class="programlisting">void cairo_paint (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
2312
|
+
<p>
|
2313
|
+
A drawing operator that paints the current source everywhere within
|
2314
|
+
the current clip region.</p>
|
2315
|
+
<p>
|
2316
|
+
|
2317
|
+
</p>
|
2318
|
+
<div class="variablelist"><table border="0">
|
2319
|
+
<col align="left" valign="top">
|
2320
|
+
<tbody><tr>
|
2321
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2322
|
+
<td> a cairo context
|
2323
|
+
</td>
|
2324
|
+
</tr></tbody>
|
2325
|
+
</table></div>
|
2326
|
+
</div>
|
2327
|
+
<hr>
|
2328
|
+
<div class="refsect2" lang="en">
|
2329
|
+
<a name="cairo-paint-with-alpha"></a><h3>cairo_paint_with_alpha ()</h3>
|
2330
|
+
<pre class="programlisting">void cairo_paint_with_alpha (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
2331
|
+
double alpha);</pre>
|
2332
|
+
<p>
|
2333
|
+
A drawing operator that paints the current source everywhere within
|
2334
|
+
the current clip region using a mask of constant alpha value
|
2335
|
+
<em class="parameter"><code>alpha</code></em>. The effect is similar to <a class="link" href="cairo-context.html#cairo-paint" title="cairo_paint ()"><code class="function">cairo_paint()</code></a>, but the drawing
|
2336
|
+
is faded out using the alpha value.</p>
|
2337
|
+
<p>
|
2338
|
+
|
2339
|
+
</p>
|
2340
|
+
<div class="variablelist"><table border="0">
|
2341
|
+
<col align="left" valign="top">
|
2342
|
+
<tbody>
|
2343
|
+
<tr>
|
2344
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2345
|
+
<td> a cairo context
|
2346
|
+
</td>
|
2347
|
+
</tr>
|
2348
|
+
<tr>
|
2349
|
+
<td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
|
2350
|
+
<td> alpha value, between 0 (transparent) and 1 (opaque)
|
2351
|
+
</td>
|
2352
|
+
</tr>
|
2353
|
+
</tbody>
|
2354
|
+
</table></div>
|
2355
|
+
</div>
|
2356
|
+
<hr>
|
2357
|
+
<div class="refsect2" lang="en">
|
2358
|
+
<a name="cairo-stroke"></a><h3>cairo_stroke ()</h3>
|
2359
|
+
<pre class="programlisting">void cairo_stroke (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
2360
|
+
<p>
|
2361
|
+
A drawing operator that strokes the current path according to the
|
2362
|
+
current line width, line join, line cap, and dash settings. After
|
2363
|
+
<a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, the current path will be cleared from the cairo
|
2364
|
+
context. See <a class="link" href="cairo-context.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-context.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
|
2365
|
+
<a class="link" href="cairo-context.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-context.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
|
2366
|
+
<a class="link" href="cairo-context.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.
|
2367
|
+
</p>
|
2368
|
+
<p>
|
2369
|
+
Note: Degenerate segments and sub-paths are treated specially and
|
2370
|
+
provide a useful result. These can result in two different
|
2371
|
+
situations:
|
2372
|
+
</p>
|
2373
|
+
<p>
|
2374
|
+
1. Zero-length "on" segments set in <a class="link" href="cairo-context.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>. If the cap
|
2375
|
+
style is <a class="link" href="cairo-context.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> or <a class="link" href="cairo-context.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> then these
|
2376
|
+
segments will be drawn as circular dots or squares respectively. In
|
2377
|
+
the case of <a class="link" href="cairo-context.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a>, the orientation of the squares
|
2378
|
+
is determined by the direction of the underlying path.
|
2379
|
+
</p>
|
2380
|
+
<p>
|
2381
|
+
2. A sub-path created by <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a> followed by either a
|
2382
|
+
<a class="link" href="cairo-paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a> or one or more calls to <a class="link" href="cairo-paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a> to the
|
2383
|
+
same coordinate as the <a class="link" href="cairo-paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>. If the cap style is
|
2384
|
+
<a class="link" href="cairo-context.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> then these sub-paths will be drawn as circular
|
2385
|
+
dots. Note that in the case of <a class="link" href="cairo-context.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> a degenerate
|
2386
|
+
sub-path will not be drawn at all, (since the correct orientation
|
2387
|
+
is indeterminate).
|
2388
|
+
</p>
|
2389
|
+
<p>
|
2390
|
+
In no case will a cap style of <a class="link" href="cairo-context.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a> cause anything
|
2391
|
+
to be drawn in the case of either degenerate segments or sub-paths.</p>
|
2392
|
+
<p>
|
2393
|
+
|
2394
|
+
</p>
|
2395
|
+
<div class="variablelist"><table border="0">
|
2396
|
+
<col align="left" valign="top">
|
2397
|
+
<tbody><tr>
|
2398
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2399
|
+
<td> a cairo context
|
2400
|
+
</td>
|
2401
|
+
</tr></tbody>
|
2402
|
+
</table></div>
|
2403
|
+
</div>
|
2404
|
+
<hr>
|
2405
|
+
<div class="refsect2" lang="en">
|
2406
|
+
<a name="cairo-stroke-preserve"></a><h3>cairo_stroke_preserve ()</h3>
|
2407
|
+
<pre class="programlisting">void cairo_stroke_preserve (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
2408
|
+
<p>
|
2409
|
+
A drawing operator that strokes the current path according to the
|
2410
|
+
current line width, line join, line cap, and dash settings. Unlike
|
2411
|
+
<a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-context.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a> preserves the path within the
|
2412
|
+
cairo context.
|
2413
|
+
</p>
|
2414
|
+
<p>
|
2415
|
+
See <a class="link" href="cairo-context.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-context.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
|
2416
|
+
<a class="link" href="cairo-context.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-context.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
|
2417
|
+
<a class="link" href="cairo-context.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.</p>
|
2418
|
+
<p>
|
2419
|
+
|
2420
|
+
</p>
|
2421
|
+
<div class="variablelist"><table border="0">
|
2422
|
+
<col align="left" valign="top">
|
2423
|
+
<tbody><tr>
|
2424
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2425
|
+
<td> a cairo context
|
2426
|
+
</td>
|
2427
|
+
</tr></tbody>
|
2428
|
+
</table></div>
|
2429
|
+
</div>
|
2430
|
+
<hr>
|
2431
|
+
<div class="refsect2" lang="en">
|
2432
|
+
<a name="cairo-stroke-extents"></a><h3>cairo_stroke_extents ()</h3>
|
2433
|
+
<pre class="programlisting">void cairo_stroke_extents (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
2434
|
+
double *x1,
|
2435
|
+
double *y1,
|
2436
|
+
double *x2,
|
2437
|
+
double *y2);</pre>
|
2438
|
+
<p>
|
2439
|
+
Computes a bounding box in user coordinates covering the area that
|
2440
|
+
would be affected, (the "inked" area), by a <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>
|
2441
|
+
operation operation given the current path and stroke
|
2442
|
+
parameters. If the current path is empty, returns an empty
|
2443
|
+
rectangle ((0,0), (0,0)). Surface dimensions and clipping are not
|
2444
|
+
taken into account.
|
2445
|
+
</p>
|
2446
|
+
<p>
|
2447
|
+
Note that if the line width is set to exactly zero, then
|
2448
|
+
<a class="link" href="cairo-context.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> will return an empty rectangle. Contrast with
|
2449
|
+
<a class="link" href="cairo-paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> which can be used to compute the non-empty
|
2450
|
+
bounds as the line width approaches zero.
|
2451
|
+
</p>
|
2452
|
+
<p>
|
2453
|
+
Note that <a class="link" href="cairo-context.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> must necessarily do more work to
|
2454
|
+
compute the precise inked areas in light of the stroke parameters,
|
2455
|
+
so <a class="link" href="cairo-paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> may be more desirable for sake of
|
2456
|
+
performance if non-inked path extents are desired.
|
2457
|
+
</p>
|
2458
|
+
<p>
|
2459
|
+
See <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-context.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-context.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
|
2460
|
+
<a class="link" href="cairo-context.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-context.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
|
2461
|
+
<a class="link" href="cairo-context.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.</p>
|
2462
|
+
<p>
|
2463
|
+
|
2464
|
+
</p>
|
2465
|
+
<div class="variablelist"><table border="0">
|
2466
|
+
<col align="left" valign="top">
|
2467
|
+
<tbody>
|
2468
|
+
<tr>
|
2469
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2470
|
+
<td> a cairo context
|
2471
|
+
</td>
|
2472
|
+
</tr>
|
2473
|
+
<tr>
|
2474
|
+
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
|
2475
|
+
<td> left of the resulting extents
|
2476
|
+
</td>
|
2477
|
+
</tr>
|
2478
|
+
<tr>
|
2479
|
+
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
|
2480
|
+
<td> top of the resulting extents
|
2481
|
+
</td>
|
2482
|
+
</tr>
|
2483
|
+
<tr>
|
2484
|
+
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
|
2485
|
+
<td> right of the resulting extents
|
2486
|
+
</td>
|
2487
|
+
</tr>
|
2488
|
+
<tr>
|
2489
|
+
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
|
2490
|
+
<td> bottom of the resulting extents
|
2491
|
+
</td>
|
2492
|
+
</tr>
|
2493
|
+
</tbody>
|
2494
|
+
</table></div>
|
2495
|
+
</div>
|
2496
|
+
<hr>
|
2497
|
+
<div class="refsect2" lang="en">
|
2498
|
+
<a name="cairo-in-stroke"></a><h3>cairo_in_stroke ()</h3>
|
2499
|
+
<pre class="programlisting"><a class="link" href="cairo-types.html#cairo-bool-t" title="cairo_bool_t">cairo_bool_t</a> cairo_in_stroke (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
2500
|
+
double x,
|
2501
|
+
double y);</pre>
|
2502
|
+
<p>
|
2503
|
+
Tests whether the given point is inside the area that would be
|
2504
|
+
affected by a <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a> operation given the current path and
|
2505
|
+
stroking parameters. Surface dimensions and clipping are not taken
|
2506
|
+
into account.
|
2507
|
+
</p>
|
2508
|
+
<p>
|
2509
|
+
See <a class="link" href="cairo-context.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-context.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-context.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
|
2510
|
+
<a class="link" href="cairo-context.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-context.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
|
2511
|
+
<a class="link" href="cairo-context.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.</p>
|
2512
|
+
<p>
|
2513
|
+
|
2514
|
+
</p>
|
2515
|
+
<div class="variablelist"><table border="0">
|
2516
|
+
<col align="left" valign="top">
|
2517
|
+
<tbody>
|
2518
|
+
<tr>
|
2519
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2520
|
+
<td> a cairo context
|
2521
|
+
</td>
|
2522
|
+
</tr>
|
2523
|
+
<tr>
|
2524
|
+
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
|
2525
|
+
<td> X coordinate of the point to test
|
2526
|
+
</td>
|
2527
|
+
</tr>
|
2528
|
+
<tr>
|
2529
|
+
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
|
2530
|
+
<td> Y coordinate of the point to test
|
2531
|
+
</td>
|
2532
|
+
</tr>
|
2533
|
+
<tr>
|
2534
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2535
|
+
<td> A non-zero value if the point is inside, or zero if
|
2536
|
+
outside.
|
2537
|
+
</td>
|
2538
|
+
</tr>
|
2539
|
+
</tbody>
|
2540
|
+
</table></div>
|
2541
|
+
</div>
|
2542
|
+
<hr>
|
2543
|
+
<div class="refsect2" lang="en">
|
2544
|
+
<a name="cairo-copy-page"></a><h3>cairo_copy_page ()</h3>
|
2545
|
+
<pre class="programlisting">void cairo_copy_page (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
2546
|
+
<p>
|
2547
|
+
Emits the current page for backends that support multiple pages, but
|
2548
|
+
doesn't clear it, so, the contents of the current page will be retained
|
2549
|
+
for the next page too. Use <a class="link" href="cairo-context.html#cairo-show-page" title="cairo_show_page ()"><code class="function">cairo_show_page()</code></a> if you want to get an
|
2550
|
+
empty page after the emission.
|
2551
|
+
</p>
|
2552
|
+
<p>
|
2553
|
+
This is a convenience function that simply calls
|
2554
|
+
<a class="link" href="cairo-surface.html#cairo-surface-copy-page" title="cairo_surface_copy_page ()"><code class="function">cairo_surface_copy_page()</code></a> on <em class="parameter"><code>cr</code></em>'s target.</p>
|
2555
|
+
<p>
|
2556
|
+
|
2557
|
+
</p>
|
2558
|
+
<div class="variablelist"><table border="0">
|
2559
|
+
<col align="left" valign="top">
|
2560
|
+
<tbody><tr>
|
2561
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2562
|
+
<td> a cairo context
|
2563
|
+
</td>
|
2564
|
+
</tr></tbody>
|
2565
|
+
</table></div>
|
2566
|
+
</div>
|
2567
|
+
<hr>
|
2568
|
+
<div class="refsect2" lang="en">
|
2569
|
+
<a name="cairo-show-page"></a><h3>cairo_show_page ()</h3>
|
2570
|
+
<pre class="programlisting">void cairo_show_page (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
2571
|
+
<p>
|
2572
|
+
Emits and clears the current page for backends that support multiple
|
2573
|
+
pages. Use <a class="link" href="cairo-context.html#cairo-copy-page" title="cairo_copy_page ()"><code class="function">cairo_copy_page()</code></a> if you don't want to clear the page.
|
2574
|
+
</p>
|
2575
|
+
<p>
|
2576
|
+
This is a convenience function that simply calls
|
2577
|
+
<a class="link" href="cairo-surface.html#cairo-surface-show-page" title="cairo_surface_show_page ()"><code class="function">cairo_surface_show_page()</code></a> on <em class="parameter"><code>cr</code></em>'s target.</p>
|
2578
|
+
<p>
|
2579
|
+
|
2580
|
+
</p>
|
2581
|
+
<div class="variablelist"><table border="0">
|
2582
|
+
<col align="left" valign="top">
|
2583
|
+
<tbody><tr>
|
2584
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2585
|
+
<td> a cairo context
|
2586
|
+
</td>
|
2587
|
+
</tr></tbody>
|
2588
|
+
</table></div>
|
2589
|
+
</div>
|
2590
|
+
<hr>
|
2591
|
+
<div class="refsect2" lang="en">
|
2592
|
+
<a name="cairo-get-reference-count"></a><h3>cairo_get_reference_count ()</h3>
|
2593
|
+
<pre class="programlisting">unsigned int cairo_get_reference_count (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
2594
|
+
<p>
|
2595
|
+
Returns the current reference count of <em class="parameter"><code>cr</code></em>.</p>
|
2596
|
+
<p>
|
2597
|
+
|
2598
|
+
</p>
|
2599
|
+
<div class="variablelist"><table border="0">
|
2600
|
+
<col align="left" valign="top">
|
2601
|
+
<tbody>
|
2602
|
+
<tr>
|
2603
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2604
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
2605
|
+
</td>
|
2606
|
+
</tr>
|
2607
|
+
<tr>
|
2608
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2609
|
+
<td> the current reference count of <em class="parameter"><code>cr</code></em>. If the
|
2610
|
+
object is a nil object, 0 will be returned.
|
2611
|
+
|
2612
|
+
</td>
|
2613
|
+
</tr>
|
2614
|
+
</tbody>
|
2615
|
+
</table></div>
|
2616
|
+
<p class="since">Since 1.4
|
2617
|
+
</p>
|
2618
|
+
</div>
|
2619
|
+
<hr>
|
2620
|
+
<div class="refsect2" lang="en">
|
2621
|
+
<a name="cairo-set-user-data"></a><h3>cairo_set_user_data ()</h3>
|
2622
|
+
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> cairo_set_user_data (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
2623
|
+
const <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t">cairo_user_data_key_t</a> *key,
|
2624
|
+
void *user_data,
|
2625
|
+
<a class="link" href="cairo-types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()">cairo_destroy_func_t</a> destroy);</pre>
|
2626
|
+
<p>
|
2627
|
+
Attach user data to <em class="parameter"><code>cr</code></em>. To remove user data from a surface,
|
2628
|
+
call this function with the key that was used to set it and <code class="literal">NULL</code>
|
2629
|
+
for <em class="parameter"><code>data</code></em>.</p>
|
2630
|
+
<p>
|
2631
|
+
|
2632
|
+
</p>
|
2633
|
+
<div class="variablelist"><table border="0">
|
2634
|
+
<col align="left" valign="top">
|
2635
|
+
<tbody>
|
2636
|
+
<tr>
|
2637
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2638
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
2639
|
+
</td>
|
2640
|
+
</tr>
|
2641
|
+
<tr>
|
2642
|
+
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
|
2643
|
+
<td> the address of a <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> to attach the user data to
|
2644
|
+
</td>
|
2645
|
+
</tr>
|
2646
|
+
<tr>
|
2647
|
+
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
|
2648
|
+
<td> the user data to attach to the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
2649
|
+
</td>
|
2650
|
+
</tr>
|
2651
|
+
<tr>
|
2652
|
+
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
|
2653
|
+
<td> a <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> which will be called when the
|
2654
|
+
<a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is destroyed or when new user data is attached using the
|
2655
|
+
same key.
|
2656
|
+
</td>
|
2657
|
+
</tr>
|
2658
|
+
<tr>
|
2659
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2660
|
+
<td> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a
|
2661
|
+
slot could not be allocated for the user data.
|
2662
|
+
|
2663
|
+
</td>
|
2664
|
+
</tr>
|
2665
|
+
</tbody>
|
2666
|
+
</table></div>
|
2667
|
+
<p class="since">Since 1.4
|
2668
|
+
</p>
|
2669
|
+
</div>
|
2670
|
+
<hr>
|
2671
|
+
<div class="refsect2" lang="en">
|
2672
|
+
<a name="cairo-get-user-data"></a><h3>cairo_get_user_data ()</h3>
|
2673
|
+
<pre class="programlisting">void* cairo_get_user_data (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
2674
|
+
const <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t">cairo_user_data_key_t</a> *key);</pre>
|
2675
|
+
<p>
|
2676
|
+
Return user data previously attached to <em class="parameter"><code>cr</code></em> using the specified
|
2677
|
+
key. If no user data has been attached with the given key this
|
2678
|
+
function returns <code class="literal">NULL</code>.</p>
|
2679
|
+
<p>
|
2680
|
+
|
2681
|
+
</p>
|
2682
|
+
<div class="variablelist"><table border="0">
|
2683
|
+
<col align="left" valign="top">
|
2684
|
+
<tbody>
|
2685
|
+
<tr>
|
2686
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2687
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
2688
|
+
</td>
|
2689
|
+
</tr>
|
2690
|
+
<tr>
|
2691
|
+
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
|
2692
|
+
<td> the address of the <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> the user data was
|
2693
|
+
attached to
|
2694
|
+
</td>
|
2695
|
+
</tr>
|
2696
|
+
<tr>
|
2697
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2698
|
+
<td> the user data previously attached or <code class="literal">NULL</code>.
|
2699
|
+
|
2700
|
+
</td>
|
2701
|
+
</tr>
|
2702
|
+
</tbody>
|
2703
|
+
</table></div>
|
2704
|
+
<p class="since">Since 1.4
|
2705
|
+
</p>
|
2706
|
+
</div>
|
2707
|
+
</div>
|
2708
|
+
<div class="refsect1" lang="en">
|
2709
|
+
<a name="cairo-context.see-also"></a><h2>See Also</h2>
|
2710
|
+
<p>
|
2711
|
+
</p>
|
2712
|
+
<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>
|
2713
|
+
<p>
|
2714
|
+
</p>
|
2715
|
+
</div>
|
2716
|
+
</div>
|
2717
|
+
<div class="footer">
|
2718
|
+
<hr>
|
2719
|
+
Generated by GTK-Doc V1.10</div>
|
2720
|
+
</body>
|
2721
|
+
</html>
|