gdk_pixbuf2 2.1.0-x86-mingw32 → 2.2.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/1.9/gdk_pixbuf2.so +0 -0
- data/lib/2.0/gdk_pixbuf2.so +0 -0
- data/lib/2.1/gdk_pixbuf2.so +0 -0
- data/vendor/local/bin/gdk-pixbuf-csource.exe +0 -0
- data/vendor/local/bin/gdk-pixbuf-pixdata.exe +0 -0
- data/vendor/local/bin/gdk-pixbuf-query-loaders.exe +0 -0
- data/vendor/local/bin/libgdk_pixbuf-2.0-0.dll +0 -0
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h +1 -3
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h +1 -3
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h +2 -2
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h +1 -3
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h +1 -3
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h +1 -3
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h +1 -3
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h +1 -3
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h +1 -3
- data/vendor/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache +1 -1
- data/vendor/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.a +0 -0
- data/vendor/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll +0 -0
- data/vendor/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll.a +0 -0
- data/vendor/local/lib/girepository-1.0/GdkPixbuf-2.0.typelib +0 -0
- data/vendor/local/lib/libgdk_pixbuf-2.0.dll.a +0 -0
- data/vendor/local/lib/libgdk_pixbuf-2.0.la +1 -1
- data/vendor/local/lib/pkgconfig/gdk-pixbuf-2.0.pc +1 -1
- data/vendor/local/share/gir-1.0/GdkPixbuf-2.0.gir +30 -27
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/GdkPixbufLoader.html +557 -416
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/annotation-glossary.html +10 -12
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-12.html +5 -5
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-14.html +9 -11
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-2.html +22 -24
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-26.html +10 -12
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-28.html +8 -8
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-30.html +5 -5
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-4.html +16 -18
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-6.html +14 -16
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-8.html +6 -6
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-deprecated.html +11 -13
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-full.html +165 -167
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Animations.html +768 -578
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-File-Loading.html +546 -428
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-File-saving.html +549 -474
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Image-Data-in-Memory.html +321 -265
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Inline-data.html +467 -349
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Module-Interface.html +887 -662
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html +122 -91
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Scaling.html +656 -518
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html +631 -484
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Utilities.html +247 -171
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Versioning.html +110 -89
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-X-Drawables-to-Pixbufs.html +119 -98
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Xlib-Rendering.html +275 -230
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-XlibRGB.html +784 -581
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-csource.html +5 -5
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf-Xlib-initialization.html +86 -55
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf-from-drawables.html +5 -5
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf-rendering.html +5 -5
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-query-loaders.html +5 -5
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf.devhelp2 +153 -192
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/index.html +3 -3
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/index.sgml +98 -97
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/license.html +4 -4
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/rn01.html +4 -4
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/rn02.html +4 -4
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/style.css +247 -94
- data/vendor/local/share/locale/af/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ang/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ar/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/as/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ast/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/az/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/be/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/be@latin/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bn_IN/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/br/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bs/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/crh/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/csb/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/cy/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/dz/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/en@shaw/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/en_CA/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/en_GB/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/et/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/fa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/gu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hy/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ia/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/io/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/is/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ka/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/km/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/kn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ku/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/li/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mai/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ml/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ms/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/my/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nds/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ne/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nso/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/oc/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/or/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ps/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/si/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sq/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sr@ije/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ta/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/te/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/tg/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/th/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/tk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/tt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ug/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/uz/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/uz@cyrillic/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/wa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/xh/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/yi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/man/man1/gdk-pixbuf-csource.1 +1 -1
- data/vendor/local/share/man/man1/gdk-pixbuf-query-loaders.1 +1 -1
- metadata +4 -4
@@ -8,15 +8,14 @@
|
|
8
8
|
<link rel="up" href="rn01.html" title="API Reference">
|
9
9
|
<link rel="prev" href="gdk-pixbuf-The-GdkPixbuf-Structure.html" title="The GdkPixbuf Structure">
|
10
10
|
<link rel="next" href="gdk-pixbuf-File-Loading.html" title="File Loading">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.
|
11
|
+
<meta name="generator" content="GTK-Doc V1.20.1 (XML mode)">
|
12
12
|
<link rel="stylesheet" href="style.css" type="text/css">
|
13
13
|
</head>
|
14
14
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
15
|
-
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="
|
16
|
-
<td width="100%" align="left">
|
17
|
-
<a href="#" class="shortcut">Top</a>
|
18
|
-
|
19
|
-
<a href="#gdk-pixbuf-Reference-Counting-and-Memory-Mangement.description" class="shortcut">Description</a>
|
15
|
+
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
16
|
+
<td width="100%" align="left" class="shortcuts">
|
17
|
+
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
18
|
+
<a href="#gdk-pixbuf-Reference-Counting-and-Memory-Mangement.description" class="shortcut">Description</a></span>
|
20
19
|
</td>
|
21
20
|
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
22
21
|
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
@@ -30,148 +29,180 @@
|
|
30
29
|
<h2><span class="refentrytitle"><a name="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.top_of_page"></a>Reference Counting and Memory Mangement</span></h2>
|
31
30
|
<p>Reference Counting and Memory Mangement — Functions for reference counting and memory management on pixbufs.</p>
|
32
31
|
</td>
|
33
|
-
<td valign="top" align="right"></td>
|
32
|
+
<td class="gallery_image" valign="top" align="right"></td>
|
34
33
|
</tr></table></div>
|
35
|
-
<div class="
|
36
|
-
<a name="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.
|
37
|
-
<
|
38
|
-
|
39
|
-
|
40
|
-
<
|
41
|
-
|
42
|
-
<
|
43
|
-
|
34
|
+
<div class="refsect1">
|
35
|
+
<a name="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.functions"></a><h2>Functions</h2>
|
36
|
+
<div class="informaltable"><table width="100%" border="0">
|
37
|
+
<colgroup>
|
38
|
+
<col width="150px" class="functions_return">
|
39
|
+
<col class="functions_name">
|
40
|
+
</colgroup>
|
41
|
+
<tbody>
|
42
|
+
<tr>
|
43
|
+
<td class="function_type">
|
44
|
+
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
|
45
|
+
</td>
|
46
|
+
<td class="function_name">
|
47
|
+
<a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#gdk-pixbuf-ref" title="gdk_pixbuf_ref ()">gdk_pixbuf_ref</a> <span class="c_punctuation">()</span>
|
48
|
+
</td>
|
49
|
+
</tr>
|
50
|
+
<tr>
|
51
|
+
<td class="function_type">
|
52
|
+
<span class="returnvalue">void</span>
|
53
|
+
</td>
|
54
|
+
<td class="function_name">
|
55
|
+
<a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#gdk-pixbuf-unref" title="gdk_pixbuf_unref ()">gdk_pixbuf_unref</a> <span class="c_punctuation">()</span>
|
56
|
+
</td>
|
57
|
+
</tr>
|
58
|
+
<tr>
|
59
|
+
<td class="function_type">
|
60
|
+
<span class="returnvalue">void</span>
|
61
|
+
</td>
|
62
|
+
<td class="function_name">
|
63
|
+
<span class="c_punctuation">(</span><a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#GdkPixbufDestroyNotify" title="GdkPixbufDestroyNotify ()">*GdkPixbufDestroyNotify</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
|
64
|
+
</td>
|
65
|
+
</tr>
|
66
|
+
</tbody>
|
67
|
+
</table></div>
|
68
|
+
</div>
|
69
|
+
<div class="refsect1">
|
70
|
+
<a name="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.includes"></a><h2>Includes</h2>
|
71
|
+
<pre class="synopsis">#include <gdk-pixbuf/gdk-pixbuf.h>
|
44
72
|
</pre>
|
45
73
|
</div>
|
46
74
|
<div class="refsect1">
|
47
75
|
<a name="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.description"></a><h2>Description</h2>
|
48
|
-
<p>
|
49
|
-
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structures are reference counted. This means that an
|
76
|
+
<p><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structures are reference counted. This means that an
|
50
77
|
application can share a single pixbuf among many parts of the
|
51
78
|
code. When a piece of the program needs to keep a pointer to a
|
52
79
|
pixbuf, it should add a reference to it by calling <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>.
|
53
80
|
When it no longer needs the pixbuf, it should subtract a reference
|
54
81
|
by calling <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. The pixbuf will be destroyed when
|
55
82
|
its reference count drops to zero. Newly-created <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
|
56
|
-
structures start with a reference count of one
|
57
|
-
|
58
|
-
<
|
59
|
-
</p>
|
60
|
-
<
|
61
|
-
<h3 class="title">Note</h3>
|
62
|
-
As <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> is derived from <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> now, <a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#gdk-pixbuf-ref" title="gdk_pixbuf_ref ()"><code class="function">gdk_pixbuf_ref()</code></a> and
|
63
|
-
<a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#gdk-pixbuf-unref" title="gdk_pixbuf_unref ()"><code class="function">gdk_pixbuf_unref()</code></a> are deprecated in favour of <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>
|
64
|
-
and <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> resp.
|
65
|
-
</div>
|
66
|
-
<p>
|
67
|
-
</p>
|
68
|
-
<p>
|
69
|
-
<span class="emphasis"><em>Finalizing</em></span> a pixbuf means to free its pixel
|
83
|
+
structures start with a reference count of one.</p>
|
84
|
+
<p>> As <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> is derived from <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> now, <a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#gdk-pixbuf-ref" title="gdk_pixbuf_ref ()"><code class="function">gdk_pixbuf_ref()</code></a> and
|
85
|
+
> <a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#gdk-pixbuf-unref" title="gdk_pixbuf_unref ()"><code class="function">gdk_pixbuf_unref()</code></a> are deprecated in favour of <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>
|
86
|
+
> and <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> resp.</p>
|
87
|
+
<p>Finalizing a pixbuf means to free its pixel
|
70
88
|
data and to free the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structure itself. Most of the
|
71
89
|
library functions that create <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structures create the
|
72
90
|
pixel data by themselves and define the way it should be freed;
|
73
91
|
you do not need to worry about those. The only function that lets
|
74
92
|
you specify how to free the pixel data is
|
75
|
-
<a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data
|
93
|
+
<a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data ()"><code class="function">gdk_pixbuf_new_from_data()</code></a>. Since you pass it a pre-allocated
|
76
94
|
pixel buffer, you must also specify a way to free that data. This
|
77
|
-
is done with a function of type <a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#GdkPixbufDestroyNotify" title="GdkPixbufDestroyNotify
|
78
|
-
pixbuf created with <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data
|
95
|
+
is done with a function of type <a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#GdkPixbufDestroyNotify" title="GdkPixbufDestroyNotify ()"><span class="type">GdkPixbufDestroyNotify</span></a>. When a
|
96
|
+
pixbuf created with <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data ()"><code class="function">gdk_pixbuf_new_from_data()</code></a> is finalized, your
|
79
97
|
destroy notification function will be called, and it is its
|
80
|
-
responsibility to free the pixel array
|
81
|
-
</p>
|
98
|
+
responsibility to free the pixel array.</p>
|
82
99
|
</div>
|
83
100
|
<div class="refsect1">
|
84
|
-
<a name="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.
|
101
|
+
<a name="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.functions_details"></a><h2>Functions</h2>
|
85
102
|
<div class="refsect2">
|
86
|
-
<a name="gdk-pixbuf-ref"></a><h3>gdk_pixbuf_ref
|
87
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a>
|
103
|
+
<a name="gdk-pixbuf-ref"></a><h3>gdk_pixbuf_ref ()</h3>
|
104
|
+
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
|
105
|
+
gdk_pixbuf_ref (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
|
88
106
|
<div class="warning">
|
89
|
-
<
|
90
|
-
<p
|
107
|
+
<p><code class="literal">gdk_pixbuf_ref</code> has been deprecated since version 2.0 and should not be used in newly-written code.</p>
|
108
|
+
<p>Use <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>.</p>
|
91
109
|
</div>
|
92
|
-
<p>
|
93
|
-
|
94
|
-
</
|
95
|
-
<div class="
|
110
|
+
<p>Adds a reference to a pixbuf.</p>
|
111
|
+
<div class="refsect3">
|
112
|
+
<a name="id-1.2.5.6.2.6"></a><h4>Parameters</h4>
|
113
|
+
<div class="informaltable"><table width="100%" border="0">
|
96
114
|
<colgroup>
|
97
|
-
<col
|
98
|
-
<col>
|
115
|
+
<col width="150px" class="parameters_name">
|
116
|
+
<col class="parameters_description">
|
117
|
+
<col width="200px" class="parameters_annotations">
|
99
118
|
</colgroup>
|
100
|
-
<tbody>
|
101
|
-
<
|
102
|
-
<td
|
103
|
-
<td>
|
104
|
-
</tr>
|
105
|
-
<tr>
|
106
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
107
|
-
<td>The same as the <em class="parameter"><code>pixbuf</code></em> argument.</td>
|
108
|
-
</tr>
|
109
|
-
</tbody>
|
119
|
+
<tbody><tr>
|
120
|
+
<td class="parameter_name"><p>pixbuf</p></td>
|
121
|
+
<td class="parameter_description"><p>A pixbuf.</p></td>
|
122
|
+
<td class="parameter_annotations"> </td>
|
123
|
+
</tr></tbody>
|
110
124
|
</table></div>
|
111
125
|
</div>
|
126
|
+
<div class="refsect3">
|
127
|
+
<a name="id-1.2.5.6.2.7"></a><h4>Returns</h4>
|
128
|
+
<p> The same as the <em class="parameter"><code>pixbuf</code></em>
|
129
|
+
argument.</p>
|
130
|
+
<p></p>
|
131
|
+
</div>
|
132
|
+
</div>
|
112
133
|
<hr>
|
113
134
|
<div class="refsect2">
|
114
|
-
<a name="gdk-pixbuf-unref"></a><h3>gdk_pixbuf_unref
|
115
|
-
<pre class="programlisting"><span class="returnvalue">void</span>
|
135
|
+
<a name="gdk-pixbuf-unref"></a><h3>gdk_pixbuf_unref ()</h3>
|
136
|
+
<pre class="programlisting"><span class="returnvalue">void</span>
|
137
|
+
gdk_pixbuf_unref (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
|
116
138
|
<div class="warning">
|
117
|
-
<
|
118
|
-
<p
|
139
|
+
<p><code class="literal">gdk_pixbuf_unref</code> has been deprecated since version 2.0 and should not be used in newly-written code.</p>
|
140
|
+
<p>Use <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
|
119
141
|
</div>
|
120
|
-
<p>
|
121
|
-
|
122
|
-
</
|
123
|
-
<div class="
|
142
|
+
<p>Removes a reference from a pixbuf.</p>
|
143
|
+
<div class="refsect3">
|
144
|
+
<a name="id-1.2.5.6.3.6"></a><h4>Parameters</h4>
|
145
|
+
<div class="informaltable"><table width="100%" border="0">
|
124
146
|
<colgroup>
|
125
|
-
<col
|
126
|
-
<col>
|
147
|
+
<col width="150px" class="parameters_name">
|
148
|
+
<col class="parameters_description">
|
149
|
+
<col width="200px" class="parameters_annotations">
|
127
150
|
</colgroup>
|
128
151
|
<tbody><tr>
|
129
|
-
<td
|
130
|
-
<td>A pixbuf.</td>
|
152
|
+
<td class="parameter_name"><p>pixbuf</p></td>
|
153
|
+
<td class="parameter_description"><p>A pixbuf.</p></td>
|
154
|
+
<td class="parameter_annotations"> </td>
|
131
155
|
</tr></tbody>
|
132
156
|
</table></div>
|
133
157
|
</div>
|
158
|
+
</div>
|
134
159
|
<hr>
|
135
160
|
<div class="refsect2">
|
136
|
-
<a name="GdkPixbufDestroyNotify"></a><h3>GdkPixbufDestroyNotify
|
137
|
-
<pre class="programlisting"><span class="returnvalue">void</span>
|
138
|
-
|
139
|
-
<
|
140
|
-
A function of this type is responsible for freeing the pixel array
|
141
|
-
of a pixbuf. The <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data
|
161
|
+
<a name="GdkPixbufDestroyNotify"></a><h3>GdkPixbufDestroyNotify ()</h3>
|
162
|
+
<pre class="programlisting"><span class="returnvalue">void</span>
|
163
|
+
<span class="c_punctuation">(</span>*GdkPixbufDestroyNotify<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *pixels</code></em>,
|
164
|
+
<em class="parameter"><code><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
|
165
|
+
<p>A function of this type is responsible for freeing the pixel array
|
166
|
+
of a pixbuf. The <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data ()"><code class="function">gdk_pixbuf_new_from_data()</code></a> function lets you
|
142
167
|
pass in a pre-allocated pixel array so that a pixbuf can be
|
143
168
|
created from it; in this case you will need to pass in a function
|
144
|
-
of <a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#GdkPixbufDestroyNotify" title="GdkPixbufDestroyNotify
|
145
|
-
when the pixbuf is finalized
|
146
|
-
|
147
|
-
<
|
169
|
+
of <a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#GdkPixbufDestroyNotify" title="GdkPixbufDestroyNotify ()"><span class="type">GdkPixbufDestroyNotify</span></a> so that the pixel data can be freed
|
170
|
+
when the pixbuf is finalized.</p>
|
171
|
+
<div class="refsect3">
|
172
|
+
<a name="id-1.2.5.6.4.5"></a><h4>Parameters</h4>
|
173
|
+
<div class="informaltable"><table width="100%" border="0">
|
148
174
|
<colgroup>
|
149
|
-
<col
|
150
|
-
<col>
|
175
|
+
<col width="150px" class="parameters_name">
|
176
|
+
<col class="parameters_description">
|
177
|
+
<col width="200px" class="parameters_annotations">
|
151
178
|
</colgroup>
|
152
179
|
<tbody>
|
153
180
|
<tr>
|
154
|
-
<td
|
155
|
-
<td>The pixel array of the pixbuf
|
156
|
-
that is being finalized.
|
157
|
-
</td>
|
181
|
+
<td class="parameter_name"><p>pixels</p></td>
|
182
|
+
<td class="parameter_description"><p> The pixel array of the pixbuf
|
183
|
+
that is being finalized. </p></td>
|
184
|
+
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
|
158
185
|
</tr>
|
159
186
|
<tr>
|
160
|
-
<td
|
161
|
-
<td
|
162
|
-
</td>
|
187
|
+
<td class="parameter_name"><p>data</p></td>
|
188
|
+
<td class="parameter_description"><p> User closure data. </p></td>
|
189
|
+
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
|
163
190
|
</tr>
|
164
191
|
</tbody>
|
165
192
|
</table></div>
|
166
193
|
</div>
|
167
194
|
</div>
|
195
|
+
</div>
|
196
|
+
<div class="refsect1">
|
197
|
+
<a name="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.other_details"></a><h2>Types and Values</h2>
|
198
|
+
</div>
|
168
199
|
<div class="refsect1">
|
169
200
|
<a name="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.see-also"></a><h2>See Also</h2>
|
170
|
-
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data
|
201
|
+
<p><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data ()"><code class="function">gdk_pixbuf_new_from_data()</code></a>.</p>
|
171
202
|
</div>
|
172
203
|
</div>
|
173
204
|
<div class="footer">
|
174
205
|
<hr>
|
175
|
-
Generated by GTK-Doc V1.
|
206
|
+
Generated by GTK-Doc V1.20.1</div>
|
176
207
|
</body>
|
177
208
|
</html>
|
@@ -8,15 +8,14 @@
|
|
8
8
|
<link rel="up" href="rn01.html" title="API Reference">
|
9
9
|
<link rel="prev" href="gdk-pixbuf-Inline-data.html" title="Inline data">
|
10
10
|
<link rel="next" href="gdk-pixbuf-gdk-pixbuf-rendering.html" title="Rendering">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.
|
11
|
+
<meta name="generator" content="GTK-Doc V1.20.1 (XML mode)">
|
12
12
|
<link rel="stylesheet" href="style.css" type="text/css">
|
13
13
|
</head>
|
14
14
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
15
|
-
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="
|
16
|
-
<td width="100%" align="left">
|
17
|
-
<a href="#" class="shortcut">Top</a>
|
18
|
-
|
19
|
-
<a href="#gdk-pixbuf-Scaling.description" class="shortcut">Description</a>
|
15
|
+
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
16
|
+
<td width="100%" align="left" class="shortcuts">
|
17
|
+
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
18
|
+
<a href="#gdk-pixbuf-Scaling.description" class="shortcut">Description</a></span>
|
20
19
|
</td>
|
21
20
|
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
22
21
|
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
@@ -30,747 +29,886 @@
|
|
30
29
|
<h2><span class="refentrytitle"><a name="gdk-pixbuf-Scaling.top_of_page"></a>Scaling</span></h2>
|
31
30
|
<p>Scaling — Scaling pixbufs and scaling and compositing pixbufs</p>
|
32
31
|
</td>
|
33
|
-
<td valign="top" align="right"></td>
|
32
|
+
<td class="gallery_image" valign="top" align="right"></td>
|
34
33
|
</tr></table></div>
|
35
|
-
<div class="
|
36
|
-
<a name="gdk-pixbuf-Scaling.
|
37
|
-
<
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
<
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
<a class="link" href="gdk-pixbuf-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
<
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
<a class="link" href="gdk-pixbuf-
|
97
|
-
|
34
|
+
<div class="refsect1">
|
35
|
+
<a name="gdk-pixbuf-Scaling.functions"></a><h2>Functions</h2>
|
36
|
+
<div class="informaltable"><table width="100%" border="0">
|
37
|
+
<colgroup>
|
38
|
+
<col width="150px" class="functions_return">
|
39
|
+
<col class="functions_name">
|
40
|
+
</colgroup>
|
41
|
+
<tbody>
|
42
|
+
<tr>
|
43
|
+
<td class="function_type">
|
44
|
+
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
|
45
|
+
</td>
|
46
|
+
<td class="function_name">
|
47
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale-simple" title="gdk_pixbuf_scale_simple ()">gdk_pixbuf_scale_simple</a> <span class="c_punctuation">()</span>
|
48
|
+
</td>
|
49
|
+
</tr>
|
50
|
+
<tr>
|
51
|
+
<td class="function_type">
|
52
|
+
<span class="returnvalue">void</span>
|
53
|
+
</td>
|
54
|
+
<td class="function_name">
|
55
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale" title="gdk_pixbuf_scale ()">gdk_pixbuf_scale</a> <span class="c_punctuation">()</span>
|
56
|
+
</td>
|
57
|
+
</tr>
|
58
|
+
<tr>
|
59
|
+
<td class="function_type">
|
60
|
+
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
|
61
|
+
</td>
|
62
|
+
<td class="function_name">
|
63
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color-simple" title="gdk_pixbuf_composite_color_simple ()">gdk_pixbuf_composite_color_simple</a> <span class="c_punctuation">()</span>
|
64
|
+
</td>
|
65
|
+
</tr>
|
66
|
+
<tr>
|
67
|
+
<td class="function_type">
|
68
|
+
<span class="returnvalue">void</span>
|
69
|
+
</td>
|
70
|
+
<td class="function_name">
|
71
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite" title="gdk_pixbuf_composite ()">gdk_pixbuf_composite</a> <span class="c_punctuation">()</span>
|
72
|
+
</td>
|
73
|
+
</tr>
|
74
|
+
<tr>
|
75
|
+
<td class="function_type">
|
76
|
+
<span class="returnvalue">void</span>
|
77
|
+
</td>
|
78
|
+
<td class="function_name">
|
79
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color" title="gdk_pixbuf_composite_color ()">gdk_pixbuf_composite_color</a> <span class="c_punctuation">()</span>
|
80
|
+
</td>
|
81
|
+
</tr>
|
82
|
+
<tr>
|
83
|
+
<td class="function_type">
|
84
|
+
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
|
85
|
+
</td>
|
86
|
+
<td class="function_name">
|
87
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-rotate-simple" title="gdk_pixbuf_rotate_simple ()">gdk_pixbuf_rotate_simple</a> <span class="c_punctuation">()</span>
|
88
|
+
</td>
|
89
|
+
</tr>
|
90
|
+
<tr>
|
91
|
+
<td class="function_type">
|
92
|
+
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
|
93
|
+
</td>
|
94
|
+
<td class="function_name">
|
95
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-flip" title="gdk_pixbuf_flip ()">gdk_pixbuf_flip</a> <span class="c_punctuation">()</span>
|
96
|
+
</td>
|
97
|
+
</tr>
|
98
|
+
</tbody>
|
99
|
+
</table></div>
|
100
|
+
</div>
|
101
|
+
<div class="refsect1">
|
102
|
+
<a name="gdk-pixbuf-Scaling.other"></a><h2>Types and Values</h2>
|
103
|
+
<div class="informaltable"><table width="100%" border="0">
|
104
|
+
<colgroup>
|
105
|
+
<col width="150px" class="name">
|
106
|
+
<col class="description">
|
107
|
+
</colgroup>
|
108
|
+
<tbody>
|
109
|
+
<tr>
|
110
|
+
<td class="datatype_keyword">enum</td>
|
111
|
+
<td class="function_name"><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType">GdkInterpType</a></td>
|
112
|
+
</tr>
|
113
|
+
<tr>
|
114
|
+
<td class="datatype_keyword">enum</td>
|
115
|
+
<td class="function_name"><a class="link" href="gdk-pixbuf-Scaling.html#GdkPixbufRotation" title="enum GdkPixbufRotation">GdkPixbufRotation</a></td>
|
116
|
+
</tr>
|
117
|
+
</tbody>
|
118
|
+
</table></div>
|
119
|
+
</div>
|
120
|
+
<div class="refsect1">
|
121
|
+
<a name="gdk-pixbuf-Scaling.includes"></a><h2>Includes</h2>
|
122
|
+
<pre class="synopsis">#include <gdk-pixbuf/gdk-pixbuf.h>
|
98
123
|
</pre>
|
99
124
|
</div>
|
100
125
|
<div class="refsect1">
|
101
126
|
<a name="gdk-pixbuf-Scaling.description"></a><h2>Description</h2>
|
102
|
-
<p>
|
103
|
-
The GdkPixBuf contains functions to scale pixbufs, to scale
|
127
|
+
<p>The GdkPixBuf contains functions to scale pixbufs, to scale
|
104
128
|
pixbufs and composite against an existing image, and to scale
|
105
129
|
pixbufs and composite against a solid color or checkerboard.
|
106
130
|
Compositing a checkerboard is a common way to show an image with
|
107
|
-
an alpha channel in image-viewing and editing software
|
108
|
-
|
109
|
-
<
|
110
|
-
Since the full-featured functions (<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale" title="gdk_pixbuf_scale ()"><code class="function">gdk_pixbuf_scale()</code></a>,
|
111
|
-
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite" title="gdk_pixbuf_composite ()"><code class="function">gdk_pixbuf_composite()</code></a>, and <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color" title="gdk_pixbuf_composite_color ()"><code class="function">gdk_pixbuf_composite_color()</code></a>) are
|
131
|
+
an alpha channel in image-viewing and editing software.</p>
|
132
|
+
<p>Since the full-featured functions (<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale" title="gdk_pixbuf_scale ()"><code class="function">gdk_pixbuf_scale()</code></a>,
|
133
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite" title="gdk_pixbuf_composite ()"><code class="function">gdk_pixbuf_composite()</code></a>, and <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color" title="gdk_pixbuf_composite_color ()"><code class="function">gdk_pixbuf_composite_color()</code></a>) are
|
112
134
|
rather complex to use and have many arguments, two simple
|
113
|
-
convenience functions are provided, <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale-simple" title="gdk_pixbuf_scale_simple
|
114
|
-
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color-simple" title="gdk_pixbuf_composite_color_simple
|
135
|
+
convenience functions are provided, <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale-simple" title="gdk_pixbuf_scale_simple ()"><code class="function">gdk_pixbuf_scale_simple()</code></a> and
|
136
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color-simple" title="gdk_pixbuf_composite_color_simple ()"><code class="function">gdk_pixbuf_composite_color_simple()</code></a> which create a new pixbuf of a
|
115
137
|
given size, scale an original image to fit, and then return the
|
116
|
-
new pixbuf
|
117
|
-
|
118
|
-
<p>
|
119
|
-
Scaling and compositing functions take advantage of MMX hardware
|
138
|
+
new pixbuf.</p>
|
139
|
+
<p>Scaling and compositing functions take advantage of MMX hardware
|
120
140
|
acceleration on systems where MMX is supported. If gdk-pixbuf is built
|
121
141
|
with the Sun mediaLib library, these functions are instead accelerated
|
122
142
|
using mediaLib, which provides hardware acceleration on Intel, AMD,
|
123
143
|
and Sparc chipsets. If desired, mediaLib support can be turned off by
|
124
|
-
setting the GDK_DISABLE_MEDIALIB environment variable.
|
125
|
-
|
126
|
-
<p>
|
127
|
-
The following example demonstrates handling an expose event by
|
144
|
+
setting the <code class="literal">GDK_DISABLE_MEDIALIB</code> environment variable. </p>
|
145
|
+
<p>The following example demonstrates handling an expose event by
|
128
146
|
rendering the appropriate area of a source image (which is scaled
|
129
147
|
to fit the widget) onto the widget's window. The source image is
|
130
148
|
rendered against a checkerboard, which provides a visual
|
131
149
|
representation of the alpha channel if the image has one. If the
|
132
150
|
image doesn't have an alpha channel, calling
|
133
|
-
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color" title="gdk_pixbuf_composite_color
|
134
|
-
as calling <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale" title="gdk_pixbuf_scale
|
135
|
-
|
136
|
-
<
|
137
|
-
|
138
|
-
<
|
139
|
-
<
|
140
|
-
<
|
141
|
-
<
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
151
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color" title="gdk_pixbuf_composite_color ()"><code class="function">gdk_pixbuf_composite_color()</code></a> function has exactly the same effect
|
152
|
+
as calling <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale" title="gdk_pixbuf_scale ()"><code class="function">gdk_pixbuf_scale()</code></a>.</p>
|
153
|
+
<div class="refsect3">
|
154
|
+
<a name="id-1.2.10.6.6"></a><h4>Handling an expose event</h4>
|
155
|
+
<div class="informalexample">
|
156
|
+
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
157
|
+
<tbody>
|
158
|
+
<tr>
|
159
|
+
<td class="listing_lines" align="right"><pre>1
|
160
|
+
2
|
161
|
+
3
|
162
|
+
4
|
163
|
+
5
|
164
|
+
6
|
165
|
+
7
|
166
|
+
8
|
167
|
+
9
|
168
|
+
10
|
169
|
+
11
|
170
|
+
12
|
171
|
+
13
|
172
|
+
14
|
173
|
+
15
|
174
|
+
16
|
175
|
+
17
|
176
|
+
18
|
177
|
+
19
|
178
|
+
20
|
179
|
+
21
|
180
|
+
22
|
181
|
+
23
|
182
|
+
24</pre></td>
|
183
|
+
<td class="listing_code"><pre class="programlisting"><span class="normal"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a></span>
|
184
|
+
<span class="function">expose_cb</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">widget</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">GdkEventExpose</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">event</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> data</span><span class="symbol">)</span>
|
185
|
+
<span class="cbracket">{</span>
|
186
|
+
<span class="normal"> </span><span class="usertype">GdkPixbuf</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">dest</span><span class="symbol">;</span>
|
148
187
|
|
149
|
-
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB
|
188
|
+
<span class="normal"> dest </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new">gdk_pixbuf_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GDK_COLORSPACE_RGB</span><span class="symbol">,</span><span class="normal"> <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">8</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">width</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">height</span><span class="symbol">);</span>
|
150
189
|
|
151
|
-
gdk_pixbuf_composite_color (pixbuf
|
152
|
-
0
|
153
|
-
|
154
|
-
(double) widget
|
155
|
-
(double) widget
|
156
|
-
GDK_INTERP_BILINEAR
|
157
|
-
event
|
190
|
+
<span class="normal"> </span><span class="function"><a href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color">gdk_pixbuf_composite_color</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pixbuf</span><span class="symbol">,</span><span class="normal"> dest</span><span class="symbol">,</span>
|
191
|
+
<span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">width</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">height</span><span class="symbol">,</span>
|
192
|
+
<span class="normal"> </span><span class="symbol">-</span><span class="normal">event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="normal">event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">,</span>
|
193
|
+
<span class="normal"> </span><span class="symbol">(</span><span class="type">double</span><span class="symbol">)</span><span class="normal"> widget</span><span class="symbol">-></span><span class="normal">allocation</span><span class="symbol">.</span><span class="normal">width </span><span class="symbol">/</span><span class="normal"> </span><span class="function"><a href="gdk-pixbuf-The-GdkPixbuf-Structure.html#gdk-pixbuf-get-width">gdk_pixbuf_get_width</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pixbuf</span><span class="symbol">),</span>
|
194
|
+
<span class="normal"> </span><span class="symbol">(</span><span class="type">double</span><span class="symbol">)</span><span class="normal"> widget</span><span class="symbol">-></span><span class="normal">allocation</span><span class="symbol">.</span><span class="normal">height </span><span class="symbol">/</span><span class="normal"> </span><span class="function"><a href="gdk-pixbuf-The-GdkPixbuf-Structure.html#gdk-pixbuf-get-height">gdk_pixbuf_get_height</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pixbuf</span><span class="symbol">),</span>
|
195
|
+
<span class="normal"> GDK_INTERP_BILINEAR</span><span class="symbol">,</span><span class="normal"> </span><span class="number">255</span><span class="symbol">,</span>
|
196
|
+
<span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">,</span><span class="normal"> </span><span class="number">16</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0xaaaaaa</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0x555555</span><span class="symbol">);</span>
|
158
197
|
|
159
|
-
gdk_draw_pixbuf (widget
|
160
|
-
0
|
161
|
-
event
|
162
|
-
GDK_RGB_DITHER_NORMAL
|
163
|
-
|
164
|
-
gdk_pixbuf_unref (dest)
|
165
|
-
|
166
|
-
return TRUE
|
167
|
-
}
|
168
|
-
</
|
169
|
-
|
170
|
-
</
|
198
|
+
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gdk3/gdk2-Drawing-Primitives.html#gdk-draw-pixbuf">gdk_draw_pixbuf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">-></span><span class="normal">window</span><span class="symbol">,</span><span class="normal"> widget</span><span class="symbol">-></span><span class="normal">style</span><span class="symbol">-></span><span class="normal">fg_gc</span><span class="symbol">[</span><span class="normal"><a href="http://library.gnome.org/devel/gtk3/gtk2-Standard-Enumerations.html#GTK-STATE-NORMAL:CAPS">GTK_STATE_NORMAL</a></span><span class="symbol">],</span><span class="normal"> dest</span><span class="symbol">,</span>
|
199
|
+
<span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">,</span>
|
200
|
+
<span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">width</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">height</span><span class="symbol">,</span>
|
201
|
+
<span class="normal"> <a href="http://library.gnome.org/devel/gdk3/gdk2-GdkRGB.html#GDK-RGB-DITHER-NORMAL:CAPS">GDK_RGB_DITHER_NORMAL</a></span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">);</span>
|
202
|
+
<span class="normal"> </span>
|
203
|
+
<span class="normal"> </span><span class="function"><a href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#gdk-pixbuf-unref">gdk_pixbuf_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">dest</span><span class="symbol">);</span>
|
204
|
+
<span class="normal"> </span>
|
205
|
+
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">;</span>
|
206
|
+
<span class="cbracket">}</span></pre></td>
|
207
|
+
</tr>
|
208
|
+
</tbody>
|
209
|
+
</table>
|
171
210
|
</div>
|
211
|
+
|
212
|
+
<p></p>
|
172
213
|
</div>
|
173
|
-
<p><br class="example-break">
|
174
|
-
</p>
|
175
214
|
</div>
|
176
215
|
<div class="refsect1">
|
177
|
-
<a name="gdk-pixbuf-Scaling.
|
178
|
-
<div class="refsect2">
|
179
|
-
<a name="GdkInterpType"></a><h3>enum GdkInterpType</h3>
|
180
|
-
<pre class="programlisting">typedef enum {
|
181
|
-
GDK_INTERP_NEAREST,
|
182
|
-
GDK_INTERP_TILES,
|
183
|
-
GDK_INTERP_BILINEAR,
|
184
|
-
GDK_INTERP_HYPER
|
185
|
-
} GdkInterpType;
|
186
|
-
</pre>
|
187
|
-
<p>
|
188
|
-
This enumeration describes the different interpolation modes that
|
189
|
-
can be used with the scaling functions. <em class="parameter"><code>GDK_INTERP_NEAREST</code></em> is
|
190
|
-
the fastest scaling method, but has horrible quality when
|
191
|
-
scaling down. <em class="parameter"><code>GDK_INTERP_BILINEAR</code></em> is the best choice if you
|
192
|
-
aren't sure what to choose, it has a good speed/quality balance.
|
193
|
-
</p>
|
194
|
-
<p>
|
195
|
-
</p>
|
196
|
-
<div class="note">
|
197
|
-
<h3 class="title">Note</h3>
|
198
|
-
Cubic filtering is missing from the list; hyperbolic
|
199
|
-
interpolation is just as fast and results in higher quality.
|
200
|
-
</div>
|
201
|
-
<p>
|
202
|
-
</p>
|
203
|
-
<div class="variablelist"><table border="0" class="variablelist">
|
204
|
-
<colgroup>
|
205
|
-
<col align="left" valign="top">
|
206
|
-
<col>
|
207
|
-
</colgroup>
|
208
|
-
<tbody>
|
209
|
-
<tr>
|
210
|
-
<td><p><a name="GDK-INTERP-NEAREST:CAPS"></a><span class="term"><code class="literal">GDK_INTERP_NEAREST</code></span></p></td>
|
211
|
-
<td>Nearest neighbor sampling; this is the fastest
|
212
|
-
and lowest quality mode. Quality is normally unacceptable when scaling
|
213
|
-
down, but may be OK when scaling up.
|
214
|
-
</td>
|
215
|
-
</tr>
|
216
|
-
<tr>
|
217
|
-
<td><p><a name="GDK-INTERP-TILES:CAPS"></a><span class="term"><code class="literal">GDK_INTERP_TILES</code></span></p></td>
|
218
|
-
<td>This is an accurate simulation of the PostScript
|
219
|
-
image operator without any interpolation enabled. Each pixel is
|
220
|
-
rendered as a tiny parallelogram of solid color, the edges of which
|
221
|
-
are implemented with antialiasing. It resembles nearest neighbor for
|
222
|
-
enlargement, and bilinear for reduction.
|
223
|
-
</td>
|
224
|
-
</tr>
|
225
|
-
<tr>
|
226
|
-
<td><p><a name="GDK-INTERP-BILINEAR:CAPS"></a><span class="term"><code class="literal">GDK_INTERP_BILINEAR</code></span></p></td>
|
227
|
-
<td>Best quality/speed balance; use this mode by
|
228
|
-
default. Bilinear interpolation. For enlargement, it is
|
229
|
-
equivalent to point-sampling the ideal bilinear-interpolated image.
|
230
|
-
For reduction, it is equivalent to laying down small tiles and
|
231
|
-
integrating over the coverage area.
|
232
|
-
</td>
|
233
|
-
</tr>
|
234
|
-
<tr>
|
235
|
-
<td><p><a name="GDK-INTERP-HYPER:CAPS"></a><span class="term"><code class="literal">GDK_INTERP_HYPER</code></span></p></td>
|
236
|
-
<td>This is the slowest and highest quality
|
237
|
-
reconstruction function. It is derived from the hyperbolic filters in
|
238
|
-
Wolberg's "Digital Image Warping", and is formally defined as the
|
239
|
-
hyperbolic-filter sampling the ideal hyperbolic-filter interpolated
|
240
|
-
image (the filter is designed to be idempotent for 1:1 pixel mapping).
|
241
|
-
</td>
|
242
|
-
</tr>
|
243
|
-
</tbody>
|
244
|
-
</table></div>
|
245
|
-
</div>
|
246
|
-
<hr>
|
216
|
+
<a name="gdk-pixbuf-Scaling.functions_details"></a><h2>Functions</h2>
|
247
217
|
<div class="refsect2">
|
248
|
-
<a name="gdk-pixbuf-scale-simple"></a><h3>gdk_pixbuf_scale_simple
|
249
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a>
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
<
|
254
|
-
Create a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> containing a copy of <em class="parameter"><code>src</code></em>
|
255
|
-
|
218
|
+
<a name="gdk-pixbuf-scale-simple"></a><h3>gdk_pixbuf_scale_simple ()</h3>
|
219
|
+
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
|
220
|
+
gdk_pixbuf_scale_simple (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
|
221
|
+
<em class="parameter"><code><span class="type">int</span> dest_width</code></em>,
|
222
|
+
<em class="parameter"><code><span class="type">int</span> dest_height</code></em>,
|
223
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType"><span class="type">GdkInterpType</span></a> interp_type</code></em>);</pre>
|
224
|
+
<p>Create a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> containing a copy of <em class="parameter"><code>src</code></em>
|
225
|
+
scaled to
|
226
|
+
<em class="parameter"><code>dest_width</code></em>
|
227
|
+
x <em class="parameter"><code>dest_height</code></em>
|
228
|
+
. Leaves <em class="parameter"><code>src</code></em>
|
229
|
+
unaffected. <em class="parameter"><code>interp_type</code></em>
|
230
|
+
|
256
231
|
should be <a class="link" href="gdk-pixbuf-Scaling.html#GDK-INTERP-NEAREST:CAPS"><span class="type">GDK_INTERP_NEAREST</span></a> if you want maximum speed (but when
|
257
232
|
scaling down <a class="link" href="gdk-pixbuf-Scaling.html#GDK-INTERP-NEAREST:CAPS"><span class="type">GDK_INTERP_NEAREST</span></a> is usually unusably ugly). The
|
258
|
-
default <em class="parameter"><code>interp_type</code></em>
|
259
|
-
|
260
|
-
|
261
|
-
<p>
|
262
|
-
|
263
|
-
pointing into <em class="parameter"><code>src</code></em
|
264
|
-
</p>
|
265
|
-
<p>
|
266
|
-
|
267
|
-
|
268
|
-
</
|
269
|
-
<div class="
|
233
|
+
default <em class="parameter"><code>interp_type</code></em>
|
234
|
+
should be <a class="link" href="gdk-pixbuf-Scaling.html#GDK-INTERP-BILINEAR:CAPS"><span class="type">GDK_INTERP_BILINEAR</span></a> which offers
|
235
|
+
reasonable quality and speed.</p>
|
236
|
+
<p>You can scale a sub-portion of <em class="parameter"><code>src</code></em>
|
237
|
+
by creating a sub-pixbuf
|
238
|
+
pointing into <em class="parameter"><code>src</code></em>
|
239
|
+
; see <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-subpixbuf" title="gdk_pixbuf_new_subpixbuf ()"><code class="function">gdk_pixbuf_new_subpixbuf()</code></a>.</p>
|
240
|
+
<p>For more complicated scaling/compositing see <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale" title="gdk_pixbuf_scale ()"><code class="function">gdk_pixbuf_scale()</code></a>
|
241
|
+
and <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite" title="gdk_pixbuf_composite ()"><code class="function">gdk_pixbuf_composite()</code></a>.</p>
|
242
|
+
<div class="refsect3">
|
243
|
+
<a name="id-1.2.10.7.2.7"></a><h4>Parameters</h4>
|
244
|
+
<div class="informaltable"><table width="100%" border="0">
|
270
245
|
<colgroup>
|
271
|
-
<col
|
272
|
-
<col>
|
246
|
+
<col width="150px" class="parameters_name">
|
247
|
+
<col class="parameters_description">
|
248
|
+
<col width="200px" class="parameters_annotations">
|
273
249
|
</colgroup>
|
274
250
|
<tbody>
|
275
251
|
<tr>
|
276
|
-
<td
|
277
|
-
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
|
278
|
-
</td>
|
279
|
-
</tr>
|
280
|
-
<tr>
|
281
|
-
<td><p><span class="term"><em class="parameter"><code>dest_width</code></em> :</span></p></td>
|
282
|
-
<td>the width of destination image</td>
|
252
|
+
<td class="parameter_name"><p>src</p></td>
|
253
|
+
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
|
254
|
+
<td class="parameter_annotations"> </td>
|
283
255
|
</tr>
|
284
256
|
<tr>
|
285
|
-
<td
|
286
|
-
<td>the
|
257
|
+
<td class="parameter_name"><p>dest_width</p></td>
|
258
|
+
<td class="parameter_description"><p>the width of destination image</p></td>
|
259
|
+
<td class="parameter_annotations"> </td>
|
287
260
|
</tr>
|
288
261
|
<tr>
|
289
|
-
<td
|
290
|
-
<td>the
|
262
|
+
<td class="parameter_name"><p>dest_height</p></td>
|
263
|
+
<td class="parameter_description"><p>the height of destination image</p></td>
|
264
|
+
<td class="parameter_annotations"> </td>
|
291
265
|
</tr>
|
292
266
|
<tr>
|
293
|
-
<td
|
294
|
-
<td
|
295
|
-
|
296
|
-
</td>
|
267
|
+
<td class="parameter_name"><p>interp_type</p></td>
|
268
|
+
<td class="parameter_description"><p>the interpolation type for the transformation.</p></td>
|
269
|
+
<td class="parameter_annotations"> </td>
|
297
270
|
</tr>
|
298
271
|
</tbody>
|
299
272
|
</table></div>
|
300
273
|
</div>
|
274
|
+
<div class="refsect3">
|
275
|
+
<a name="id-1.2.10.7.2.8"></a><h4>Returns</h4>
|
276
|
+
<p> the new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not enough memory could be
|
277
|
+
allocated for it. </p>
|
278
|
+
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
|
279
|
+
</div>
|
280
|
+
</div>
|
301
281
|
<hr>
|
302
282
|
<div class="refsect2">
|
303
|
-
<a name="gdk-pixbuf-scale"></a><h3>gdk_pixbuf_scale
|
304
|
-
<pre class="programlisting"><span class="returnvalue">void</span>
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
<
|
316
|
-
Creates a transformation of the source image <em class="parameter"><code>src</code></em>
|
317
|
-
|
318
|
-
|
319
|
-
<em class="parameter"><code>
|
320
|
-
|
321
|
-
</
|
322
|
-
|
323
|
-
|
283
|
+
<a name="gdk-pixbuf-scale"></a><h3>gdk_pixbuf_scale ()</h3>
|
284
|
+
<pre class="programlisting"><span class="returnvalue">void</span>
|
285
|
+
gdk_pixbuf_scale (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
|
286
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *dest</code></em>,
|
287
|
+
<em class="parameter"><code><span class="type">int</span> dest_x</code></em>,
|
288
|
+
<em class="parameter"><code><span class="type">int</span> dest_y</code></em>,
|
289
|
+
<em class="parameter"><code><span class="type">int</span> dest_width</code></em>,
|
290
|
+
<em class="parameter"><code><span class="type">int</span> dest_height</code></em>,
|
291
|
+
<em class="parameter"><code><span class="type">double</span> offset_x</code></em>,
|
292
|
+
<em class="parameter"><code><span class="type">double</span> offset_y</code></em>,
|
293
|
+
<em class="parameter"><code><span class="type">double</span> scale_x</code></em>,
|
294
|
+
<em class="parameter"><code><span class="type">double</span> scale_y</code></em>,
|
295
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType"><span class="type">GdkInterpType</span></a> interp_type</code></em>);</pre>
|
296
|
+
<p>Creates a transformation of the source image <em class="parameter"><code>src</code></em>
|
297
|
+
by scaling by
|
298
|
+
<em class="parameter"><code>scale_x</code></em>
|
299
|
+
and <em class="parameter"><code>scale_y</code></em>
|
300
|
+
then translating by <em class="parameter"><code>offset_x</code></em>
|
301
|
+
and <em class="parameter"><code>offset_y</code></em>
|
302
|
+
,
|
303
|
+
then renders the rectangle (<em class="parameter"><code>dest_x</code></em>
|
304
|
+
, <em class="parameter"><code>dest_y</code></em>
|
305
|
+
, <em class="parameter"><code>dest_width</code></em>
|
306
|
+
,
|
307
|
+
<em class="parameter"><code>dest_height</code></em>
|
308
|
+
) of the resulting image onto the destination image
|
309
|
+
replacing the previous contents.</p>
|
310
|
+
<p>Try to use <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale-simple" title="gdk_pixbuf_scale_simple ()"><code class="function">gdk_pixbuf_scale_simple()</code></a> first, this function is
|
324
311
|
the industrial-strength power tool you can fall back to if
|
325
|
-
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale-simple" title="gdk_pixbuf_scale_simple
|
326
|
-
|
327
|
-
<p>
|
328
|
-
If the source rectangle overlaps the destination rectangle on the
|
312
|
+
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale-simple" title="gdk_pixbuf_scale_simple ()"><code class="function">gdk_pixbuf_scale_simple()</code></a> isn't powerful enough.</p>
|
313
|
+
<p>If the source rectangle overlaps the destination rectangle on the
|
329
314
|
same pixbuf, it will be overwritten during the scaling which
|
330
|
-
results in rendering artifacts
|
331
|
-
|
332
|
-
<
|
315
|
+
results in rendering artifacts.</p>
|
316
|
+
<div class="refsect3">
|
317
|
+
<a name="id-1.2.10.7.3.7"></a><h4>Parameters</h4>
|
318
|
+
<div class="informaltable"><table width="100%" border="0">
|
333
319
|
<colgroup>
|
334
|
-
<col
|
335
|
-
<col>
|
320
|
+
<col width="150px" class="parameters_name">
|
321
|
+
<col class="parameters_description">
|
322
|
+
<col width="200px" class="parameters_annotations">
|
336
323
|
</colgroup>
|
337
324
|
<tbody>
|
338
325
|
<tr>
|
339
|
-
<td
|
340
|
-
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
|
341
|
-
</td>
|
326
|
+
<td class="parameter_name"><p>src</p></td>
|
327
|
+
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
|
328
|
+
<td class="parameter_annotations"> </td>
|
342
329
|
</tr>
|
343
330
|
<tr>
|
344
|
-
<td
|
345
|
-
<td>the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> into which to render the results</td>
|
331
|
+
<td class="parameter_name"><p>dest</p></td>
|
332
|
+
<td class="parameter_description"><p>the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> into which to render the results</p></td>
|
333
|
+
<td class="parameter_annotations"> </td>
|
346
334
|
</tr>
|
347
335
|
<tr>
|
348
|
-
<td
|
349
|
-
<td>the left coordinate for region to render</td>
|
336
|
+
<td class="parameter_name"><p>dest_x</p></td>
|
337
|
+
<td class="parameter_description"><p>the left coordinate for region to render</p></td>
|
338
|
+
<td class="parameter_annotations"> </td>
|
350
339
|
</tr>
|
351
340
|
<tr>
|
352
|
-
<td
|
353
|
-
<td>the top coordinate for region to render</td>
|
341
|
+
<td class="parameter_name"><p>dest_y</p></td>
|
342
|
+
<td class="parameter_description"><p>the top coordinate for region to render</p></td>
|
343
|
+
<td class="parameter_annotations"> </td>
|
354
344
|
</tr>
|
355
345
|
<tr>
|
356
|
-
<td
|
357
|
-
<td>the width of the region to render</td>
|
346
|
+
<td class="parameter_name"><p>dest_width</p></td>
|
347
|
+
<td class="parameter_description"><p>the width of the region to render</p></td>
|
348
|
+
<td class="parameter_annotations"> </td>
|
358
349
|
</tr>
|
359
350
|
<tr>
|
360
|
-
<td
|
361
|
-
<td>the height of the region to render</td>
|
351
|
+
<td class="parameter_name"><p>dest_height</p></td>
|
352
|
+
<td class="parameter_description"><p>the height of the region to render</p></td>
|
353
|
+
<td class="parameter_annotations"> </td>
|
362
354
|
</tr>
|
363
355
|
<tr>
|
364
|
-
<td
|
365
|
-
<td>the offset in the X direction (currently rounded to an integer)</td>
|
356
|
+
<td class="parameter_name"><p>offset_x</p></td>
|
357
|
+
<td class="parameter_description"><p>the offset in the X direction (currently rounded to an integer)</p></td>
|
358
|
+
<td class="parameter_annotations"> </td>
|
366
359
|
</tr>
|
367
360
|
<tr>
|
368
|
-
<td
|
369
|
-
<td>the offset in the Y direction (currently rounded to an integer)</td>
|
361
|
+
<td class="parameter_name"><p>offset_y</p></td>
|
362
|
+
<td class="parameter_description"><p>the offset in the Y direction (currently rounded to an integer)</p></td>
|
363
|
+
<td class="parameter_annotations"> </td>
|
370
364
|
</tr>
|
371
365
|
<tr>
|
372
|
-
<td
|
373
|
-
<td>the scale factor in the X direction</td>
|
366
|
+
<td class="parameter_name"><p>scale_x</p></td>
|
367
|
+
<td class="parameter_description"><p>the scale factor in the X direction</p></td>
|
368
|
+
<td class="parameter_annotations"> </td>
|
374
369
|
</tr>
|
375
370
|
<tr>
|
376
|
-
<td
|
377
|
-
<td>the scale factor in the Y direction</td>
|
371
|
+
<td class="parameter_name"><p>scale_y</p></td>
|
372
|
+
<td class="parameter_description"><p>the scale factor in the Y direction</p></td>
|
373
|
+
<td class="parameter_annotations"> </td>
|
378
374
|
</tr>
|
379
375
|
<tr>
|
380
|
-
<td
|
381
|
-
<td>the interpolation type for the transformation.</td>
|
376
|
+
<td class="parameter_name"><p>interp_type</p></td>
|
377
|
+
<td class="parameter_description"><p>the interpolation type for the transformation.</p></td>
|
378
|
+
<td class="parameter_annotations"> </td>
|
382
379
|
</tr>
|
383
380
|
</tbody>
|
384
381
|
</table></div>
|
385
382
|
</div>
|
383
|
+
</div>
|
386
384
|
<hr>
|
387
385
|
<div class="refsect2">
|
388
|
-
<a name="gdk-pixbuf-composite-color-simple"></a><h3>gdk_pixbuf_composite_color_simple
|
389
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a>
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
<
|
398
|
-
Creates a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> by scaling <em class="parameter"><code>src</code></em>
|
399
|
-
<em class="parameter"><code>
|
400
|
-
|
401
|
-
</
|
402
|
-
|
386
|
+
<a name="gdk-pixbuf-composite-color-simple"></a><h3>gdk_pixbuf_composite_color_simple ()</h3>
|
387
|
+
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
|
388
|
+
gdk_pixbuf_composite_color_simple (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
|
389
|
+
<em class="parameter"><code><span class="type">int</span> dest_width</code></em>,
|
390
|
+
<em class="parameter"><code><span class="type">int</span> dest_height</code></em>,
|
391
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType"><span class="type">GdkInterpType</span></a> interp_type</code></em>,
|
392
|
+
<em class="parameter"><code><span class="type">int</span> overall_alpha</code></em>,
|
393
|
+
<em class="parameter"><code><span class="type">int</span> check_size</code></em>,
|
394
|
+
<em class="parameter"><code><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> color1</code></em>,
|
395
|
+
<em class="parameter"><code><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> color2</code></em>);</pre>
|
396
|
+
<p>Creates a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> by scaling <em class="parameter"><code>src</code></em>
|
397
|
+
to <em class="parameter"><code>dest_width</code></em>
|
398
|
+
x
|
399
|
+
<em class="parameter"><code>dest_height</code></em>
|
400
|
+
and compositing the result with a checkboard of colors
|
401
|
+
<em class="parameter"><code>color1</code></em>
|
402
|
+
and <em class="parameter"><code>color2</code></em>
|
403
|
+
.</p>
|
404
|
+
<div class="refsect3">
|
405
|
+
<a name="id-1.2.10.7.4.5"></a><h4>Parameters</h4>
|
406
|
+
<div class="informaltable"><table width="100%" border="0">
|
403
407
|
<colgroup>
|
404
|
-
<col
|
405
|
-
<col>
|
408
|
+
<col width="150px" class="parameters_name">
|
409
|
+
<col class="parameters_description">
|
410
|
+
<col width="200px" class="parameters_annotations">
|
406
411
|
</colgroup>
|
407
412
|
<tbody>
|
408
413
|
<tr>
|
409
|
-
<td
|
410
|
-
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
|
411
|
-
</td>
|
414
|
+
<td class="parameter_name"><p>src</p></td>
|
415
|
+
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
|
416
|
+
<td class="parameter_annotations"> </td>
|
412
417
|
</tr>
|
413
418
|
<tr>
|
414
|
-
<td
|
415
|
-
<td>the width of destination image</td>
|
419
|
+
<td class="parameter_name"><p>dest_width</p></td>
|
420
|
+
<td class="parameter_description"><p>the width of destination image</p></td>
|
421
|
+
<td class="parameter_annotations"> </td>
|
416
422
|
</tr>
|
417
423
|
<tr>
|
418
|
-
<td
|
419
|
-
<td>the height of destination image</td>
|
424
|
+
<td class="parameter_name"><p>dest_height</p></td>
|
425
|
+
<td class="parameter_description"><p>the height of destination image</p></td>
|
426
|
+
<td class="parameter_annotations"> </td>
|
420
427
|
</tr>
|
421
428
|
<tr>
|
422
|
-
<td
|
423
|
-
<td>the interpolation type for the transformation.</td>
|
429
|
+
<td class="parameter_name"><p>interp_type</p></td>
|
430
|
+
<td class="parameter_description"><p>the interpolation type for the transformation.</p></td>
|
431
|
+
<td class="parameter_annotations"> </td>
|
424
432
|
</tr>
|
425
433
|
<tr>
|
426
|
-
<td
|
427
|
-
<td>overall alpha for source image (0..255)</td>
|
434
|
+
<td class="parameter_name"><p>overall_alpha</p></td>
|
435
|
+
<td class="parameter_description"><p>overall alpha for source image (0..255)</p></td>
|
436
|
+
<td class="parameter_annotations"> </td>
|
428
437
|
</tr>
|
429
438
|
<tr>
|
430
|
-
<td
|
431
|
-
<td>the size of checks in the checkboard (must be a power of two)</td>
|
439
|
+
<td class="parameter_name"><p>check_size</p></td>
|
440
|
+
<td class="parameter_description"><p>the size of checks in the checkboard (must be a power of two)</p></td>
|
441
|
+
<td class="parameter_annotations"> </td>
|
432
442
|
</tr>
|
433
443
|
<tr>
|
434
|
-
<td
|
435
|
-
<td>the color of check at upper left</td>
|
444
|
+
<td class="parameter_name"><p>color1</p></td>
|
445
|
+
<td class="parameter_description"><p>the color of check at upper left</p></td>
|
446
|
+
<td class="parameter_annotations"> </td>
|
436
447
|
</tr>
|
437
448
|
<tr>
|
438
|
-
<td
|
439
|
-
<td>the color of the other check</td>
|
440
|
-
</
|
441
|
-
<tr>
|
442
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
443
|
-
<td>the new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not enough memory could be
|
444
|
-
allocated for it. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
|
445
|
-
</td>
|
449
|
+
<td class="parameter_name"><p>color2</p></td>
|
450
|
+
<td class="parameter_description"><p>the color of the other check</p></td>
|
451
|
+
<td class="parameter_annotations"> </td>
|
446
452
|
</tr>
|
447
453
|
</tbody>
|
448
454
|
</table></div>
|
449
455
|
</div>
|
456
|
+
<div class="refsect3">
|
457
|
+
<a name="id-1.2.10.7.4.6"></a><h4>Returns</h4>
|
458
|
+
<p> the new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not enough memory could be
|
459
|
+
allocated for it. </p>
|
460
|
+
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
|
461
|
+
</div>
|
462
|
+
</div>
|
450
463
|
<hr>
|
451
464
|
<div class="refsect2">
|
452
|
-
<a name="gdk-pixbuf-composite"></a><h3>gdk_pixbuf_composite
|
453
|
-
<pre class="programlisting"><span class="returnvalue">void</span>
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
<
|
466
|
-
Creates a transformation of the source image <em class="parameter"><code>src</code></em>
|
467
|
-
|
465
|
+
<a name="gdk-pixbuf-composite"></a><h3>gdk_pixbuf_composite ()</h3>
|
466
|
+
<pre class="programlisting"><span class="returnvalue">void</span>
|
467
|
+
gdk_pixbuf_composite (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
|
468
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *dest</code></em>,
|
469
|
+
<em class="parameter"><code><span class="type">int</span> dest_x</code></em>,
|
470
|
+
<em class="parameter"><code><span class="type">int</span> dest_y</code></em>,
|
471
|
+
<em class="parameter"><code><span class="type">int</span> dest_width</code></em>,
|
472
|
+
<em class="parameter"><code><span class="type">int</span> dest_height</code></em>,
|
473
|
+
<em class="parameter"><code><span class="type">double</span> offset_x</code></em>,
|
474
|
+
<em class="parameter"><code><span class="type">double</span> offset_y</code></em>,
|
475
|
+
<em class="parameter"><code><span class="type">double</span> scale_x</code></em>,
|
476
|
+
<em class="parameter"><code><span class="type">double</span> scale_y</code></em>,
|
477
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType"><span class="type">GdkInterpType</span></a> interp_type</code></em>,
|
478
|
+
<em class="parameter"><code><span class="type">int</span> overall_alpha</code></em>);</pre>
|
479
|
+
<p>Creates a transformation of the source image <em class="parameter"><code>src</code></em>
|
480
|
+
by scaling by
|
481
|
+
<em class="parameter"><code>scale_x</code></em>
|
482
|
+
and <em class="parameter"><code>scale_y</code></em>
|
483
|
+
then translating by <em class="parameter"><code>offset_x</code></em>
|
484
|
+
and <em class="parameter"><code>offset_y</code></em>
|
485
|
+
.
|
468
486
|
This gives an image in the coordinates of the destination pixbuf.
|
469
|
-
The rectangle (<em class="parameter"><code>dest_x</code></em
|
487
|
+
The rectangle (<em class="parameter"><code>dest_x</code></em>
|
488
|
+
, <em class="parameter"><code>dest_y</code></em>
|
489
|
+
, <em class="parameter"><code>dest_width</code></em>
|
490
|
+
, <em class="parameter"><code>dest_height</code></em>
|
491
|
+
)
|
470
492
|
is then composited onto the corresponding rectangle of the
|
471
|
-
original destination image
|
472
|
-
|
473
|
-
<p>
|
474
|
-
When the destination rectangle contains parts not in the source
|
493
|
+
original destination image.</p>
|
494
|
+
<p>When the destination rectangle contains parts not in the source
|
475
495
|
image, the data at the edges of the source image is replicated
|
476
|
-
to infinity.
|
477
|
-
|
478
|
-
<
|
479
|
-
</
|
480
|
-
<div class="
|
481
|
-
<a name="pixbuf-composite-diagram"></a><p class="title"><b>Figure 1. Compositing of pixbufs</b></p>
|
482
|
-
<div class="figure-contents"><div><img src="composite.png" alt="Compositing of pixbufs"></div></div>
|
483
|
-
</div>
|
484
|
-
<p><br class="figure-break">
|
485
|
-
</p>
|
486
|
-
<div class="variablelist"><table border="0" class="variablelist">
|
496
|
+
to infinity. </p>
|
497
|
+
<p><span class="inlinemediaobject"><img src="composite.png"></span></p>
|
498
|
+
<div class="refsect3">
|
499
|
+
<a name="id-1.2.10.7.5.7"></a><h4>Parameters</h4>
|
500
|
+
<div class="informaltable"><table width="100%" border="0">
|
487
501
|
<colgroup>
|
488
|
-
<col
|
489
|
-
<col>
|
502
|
+
<col width="150px" class="parameters_name">
|
503
|
+
<col class="parameters_description">
|
504
|
+
<col width="200px" class="parameters_annotations">
|
490
505
|
</colgroup>
|
491
506
|
<tbody>
|
492
507
|
<tr>
|
493
|
-
<td
|
494
|
-
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
|
495
|
-
</td>
|
508
|
+
<td class="parameter_name"><p>src</p></td>
|
509
|
+
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
|
510
|
+
<td class="parameter_annotations"> </td>
|
496
511
|
</tr>
|
497
512
|
<tr>
|
498
|
-
<td
|
499
|
-
<td>the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> into which to render the results</td>
|
513
|
+
<td class="parameter_name"><p>dest</p></td>
|
514
|
+
<td class="parameter_description"><p>the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> into which to render the results</p></td>
|
515
|
+
<td class="parameter_annotations"> </td>
|
500
516
|
</tr>
|
501
517
|
<tr>
|
502
|
-
<td
|
503
|
-
<td>the left coordinate for region to render</td>
|
518
|
+
<td class="parameter_name"><p>dest_x</p></td>
|
519
|
+
<td class="parameter_description"><p>the left coordinate for region to render</p></td>
|
520
|
+
<td class="parameter_annotations"> </td>
|
504
521
|
</tr>
|
505
522
|
<tr>
|
506
|
-
<td
|
507
|
-
<td>the top coordinate for region to render</td>
|
523
|
+
<td class="parameter_name"><p>dest_y</p></td>
|
524
|
+
<td class="parameter_description"><p>the top coordinate for region to render</p></td>
|
525
|
+
<td class="parameter_annotations"> </td>
|
508
526
|
</tr>
|
509
527
|
<tr>
|
510
|
-
<td
|
511
|
-
<td>the width of the region to render</td>
|
528
|
+
<td class="parameter_name"><p>dest_width</p></td>
|
529
|
+
<td class="parameter_description"><p>the width of the region to render</p></td>
|
530
|
+
<td class="parameter_annotations"> </td>
|
512
531
|
</tr>
|
513
532
|
<tr>
|
514
|
-
<td
|
515
|
-
<td>the height of the region to render</td>
|
533
|
+
<td class="parameter_name"><p>dest_height</p></td>
|
534
|
+
<td class="parameter_description"><p>the height of the region to render</p></td>
|
535
|
+
<td class="parameter_annotations"> </td>
|
516
536
|
</tr>
|
517
537
|
<tr>
|
518
|
-
<td
|
519
|
-
<td>the offset in the X direction (currently rounded to an integer)</td>
|
538
|
+
<td class="parameter_name"><p>offset_x</p></td>
|
539
|
+
<td class="parameter_description"><p>the offset in the X direction (currently rounded to an integer)</p></td>
|
540
|
+
<td class="parameter_annotations"> </td>
|
520
541
|
</tr>
|
521
542
|
<tr>
|
522
|
-
<td
|
523
|
-
<td>the offset in the Y direction (currently rounded to an integer)</td>
|
543
|
+
<td class="parameter_name"><p>offset_y</p></td>
|
544
|
+
<td class="parameter_description"><p>the offset in the Y direction (currently rounded to an integer)</p></td>
|
545
|
+
<td class="parameter_annotations"> </td>
|
524
546
|
</tr>
|
525
547
|
<tr>
|
526
|
-
<td
|
527
|
-
<td>the scale factor in the X direction</td>
|
548
|
+
<td class="parameter_name"><p>scale_x</p></td>
|
549
|
+
<td class="parameter_description"><p>the scale factor in the X direction</p></td>
|
550
|
+
<td class="parameter_annotations"> </td>
|
528
551
|
</tr>
|
529
552
|
<tr>
|
530
|
-
<td
|
531
|
-
<td>the scale factor in the Y direction</td>
|
553
|
+
<td class="parameter_name"><p>scale_y</p></td>
|
554
|
+
<td class="parameter_description"><p>the scale factor in the Y direction</p></td>
|
555
|
+
<td class="parameter_annotations"> </td>
|
532
556
|
</tr>
|
533
557
|
<tr>
|
534
|
-
<td
|
535
|
-
<td>the interpolation type for the transformation.</td>
|
558
|
+
<td class="parameter_name"><p>interp_type</p></td>
|
559
|
+
<td class="parameter_description"><p>the interpolation type for the transformation.</p></td>
|
560
|
+
<td class="parameter_annotations"> </td>
|
536
561
|
</tr>
|
537
562
|
<tr>
|
538
|
-
<td
|
539
|
-
<td>overall alpha for source image (0..255)</td>
|
563
|
+
<td class="parameter_name"><p>overall_alpha</p></td>
|
564
|
+
<td class="parameter_description"><p>overall alpha for source image (0..255)</p></td>
|
565
|
+
<td class="parameter_annotations"> </td>
|
540
566
|
</tr>
|
541
567
|
</tbody>
|
542
568
|
</table></div>
|
543
569
|
</div>
|
570
|
+
</div>
|
544
571
|
<hr>
|
545
572
|
<div class="refsect2">
|
546
|
-
<a name="gdk-pixbuf-composite-color"></a><h3>gdk_pixbuf_composite_color
|
547
|
-
<pre class="programlisting"><span class="returnvalue">void</span>
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
<
|
565
|
-
Creates a transformation of the source image <em class="parameter"><code>src</code></em>
|
566
|
-
|
567
|
-
|
568
|
-
<em class="parameter"><code>
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
<
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
<
|
573
|
+
<a name="gdk-pixbuf-composite-color"></a><h3>gdk_pixbuf_composite_color ()</h3>
|
574
|
+
<pre class="programlisting"><span class="returnvalue">void</span>
|
575
|
+
gdk_pixbuf_composite_color (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
|
576
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *dest</code></em>,
|
577
|
+
<em class="parameter"><code><span class="type">int</span> dest_x</code></em>,
|
578
|
+
<em class="parameter"><code><span class="type">int</span> dest_y</code></em>,
|
579
|
+
<em class="parameter"><code><span class="type">int</span> dest_width</code></em>,
|
580
|
+
<em class="parameter"><code><span class="type">int</span> dest_height</code></em>,
|
581
|
+
<em class="parameter"><code><span class="type">double</span> offset_x</code></em>,
|
582
|
+
<em class="parameter"><code><span class="type">double</span> offset_y</code></em>,
|
583
|
+
<em class="parameter"><code><span class="type">double</span> scale_x</code></em>,
|
584
|
+
<em class="parameter"><code><span class="type">double</span> scale_y</code></em>,
|
585
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType"><span class="type">GdkInterpType</span></a> interp_type</code></em>,
|
586
|
+
<em class="parameter"><code><span class="type">int</span> overall_alpha</code></em>,
|
587
|
+
<em class="parameter"><code><span class="type">int</span> check_x</code></em>,
|
588
|
+
<em class="parameter"><code><span class="type">int</span> check_y</code></em>,
|
589
|
+
<em class="parameter"><code><span class="type">int</span> check_size</code></em>,
|
590
|
+
<em class="parameter"><code><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> color1</code></em>,
|
591
|
+
<em class="parameter"><code><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> color2</code></em>);</pre>
|
592
|
+
<p>Creates a transformation of the source image <em class="parameter"><code>src</code></em>
|
593
|
+
by scaling by
|
594
|
+
<em class="parameter"><code>scale_x</code></em>
|
595
|
+
and <em class="parameter"><code>scale_y</code></em>
|
596
|
+
then translating by <em class="parameter"><code>offset_x</code></em>
|
597
|
+
and <em class="parameter"><code>offset_y</code></em>
|
598
|
+
,
|
599
|
+
then composites the rectangle (<em class="parameter"><code>dest_x</code></em>
|
600
|
+
,<em class="parameter"><code>dest_y</code></em>
|
601
|
+
, <em class="parameter"><code>dest_width</code></em>
|
602
|
+
,
|
603
|
+
<em class="parameter"><code>dest_height</code></em>
|
604
|
+
) of the resulting image with a checkboard of the
|
605
|
+
colors <em class="parameter"><code>color1</code></em>
|
606
|
+
and <em class="parameter"><code>color2</code></em>
|
607
|
+
and renders it onto the destination
|
608
|
+
image.</p>
|
609
|
+
<p>See <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color-simple" title="gdk_pixbuf_composite_color_simple ()"><code class="function">gdk_pixbuf_composite_color_simple()</code></a> for a simpler variant of this
|
610
|
+
function suitable for many tasks.</p>
|
611
|
+
<div class="refsect3">
|
612
|
+
<a name="id-1.2.10.7.6.6"></a><h4>Parameters</h4>
|
613
|
+
<div class="informaltable"><table width="100%" border="0">
|
577
614
|
<colgroup>
|
578
|
-
<col
|
579
|
-
<col>
|
615
|
+
<col width="150px" class="parameters_name">
|
616
|
+
<col class="parameters_description">
|
617
|
+
<col width="200px" class="parameters_annotations">
|
580
618
|
</colgroup>
|
581
619
|
<tbody>
|
582
620
|
<tr>
|
583
|
-
<td
|
584
|
-
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
|
585
|
-
</td>
|
621
|
+
<td class="parameter_name"><p>src</p></td>
|
622
|
+
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
|
623
|
+
<td class="parameter_annotations"> </td>
|
586
624
|
</tr>
|
587
625
|
<tr>
|
588
|
-
<td
|
589
|
-
<td>the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> into which to render the results</td>
|
626
|
+
<td class="parameter_name"><p>dest</p></td>
|
627
|
+
<td class="parameter_description"><p>the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> into which to render the results</p></td>
|
628
|
+
<td class="parameter_annotations"> </td>
|
590
629
|
</tr>
|
591
630
|
<tr>
|
592
|
-
<td
|
593
|
-
<td>the left coordinate for region to render</td>
|
631
|
+
<td class="parameter_name"><p>dest_x</p></td>
|
632
|
+
<td class="parameter_description"><p>the left coordinate for region to render</p></td>
|
633
|
+
<td class="parameter_annotations"> </td>
|
594
634
|
</tr>
|
595
635
|
<tr>
|
596
|
-
<td
|
597
|
-
<td>the top coordinate for region to render</td>
|
636
|
+
<td class="parameter_name"><p>dest_y</p></td>
|
637
|
+
<td class="parameter_description"><p>the top coordinate for region to render</p></td>
|
638
|
+
<td class="parameter_annotations"> </td>
|
598
639
|
</tr>
|
599
640
|
<tr>
|
600
|
-
<td
|
601
|
-
<td>the width of the region to render</td>
|
641
|
+
<td class="parameter_name"><p>dest_width</p></td>
|
642
|
+
<td class="parameter_description"><p>the width of the region to render</p></td>
|
643
|
+
<td class="parameter_annotations"> </td>
|
602
644
|
</tr>
|
603
645
|
<tr>
|
604
|
-
<td
|
605
|
-
<td>the height of the region to render</td>
|
646
|
+
<td class="parameter_name"><p>dest_height</p></td>
|
647
|
+
<td class="parameter_description"><p>the height of the region to render</p></td>
|
648
|
+
<td class="parameter_annotations"> </td>
|
606
649
|
</tr>
|
607
650
|
<tr>
|
608
|
-
<td
|
609
|
-
<td>the offset in the X direction (currently rounded to an integer)</td>
|
651
|
+
<td class="parameter_name"><p>offset_x</p></td>
|
652
|
+
<td class="parameter_description"><p>the offset in the X direction (currently rounded to an integer)</p></td>
|
653
|
+
<td class="parameter_annotations"> </td>
|
610
654
|
</tr>
|
611
655
|
<tr>
|
612
|
-
<td
|
613
|
-
<td>the offset in the Y direction (currently rounded to an integer)</td>
|
656
|
+
<td class="parameter_name"><p>offset_y</p></td>
|
657
|
+
<td class="parameter_description"><p>the offset in the Y direction (currently rounded to an integer)</p></td>
|
658
|
+
<td class="parameter_annotations"> </td>
|
614
659
|
</tr>
|
615
660
|
<tr>
|
616
|
-
<td
|
617
|
-
<td>the scale factor in the X direction</td>
|
661
|
+
<td class="parameter_name"><p>scale_x</p></td>
|
662
|
+
<td class="parameter_description"><p>the scale factor in the X direction</p></td>
|
663
|
+
<td class="parameter_annotations"> </td>
|
618
664
|
</tr>
|
619
665
|
<tr>
|
620
|
-
<td
|
621
|
-
<td>the scale factor in the Y direction</td>
|
666
|
+
<td class="parameter_name"><p>scale_y</p></td>
|
667
|
+
<td class="parameter_description"><p>the scale factor in the Y direction</p></td>
|
668
|
+
<td class="parameter_annotations"> </td>
|
622
669
|
</tr>
|
623
670
|
<tr>
|
624
|
-
<td
|
625
|
-
<td>the interpolation type for the transformation.</td>
|
671
|
+
<td class="parameter_name"><p>interp_type</p></td>
|
672
|
+
<td class="parameter_description"><p>the interpolation type for the transformation.</p></td>
|
673
|
+
<td class="parameter_annotations"> </td>
|
626
674
|
</tr>
|
627
675
|
<tr>
|
628
|
-
<td
|
629
|
-
<td>overall alpha for source image (0..255)</td>
|
676
|
+
<td class="parameter_name"><p>overall_alpha</p></td>
|
677
|
+
<td class="parameter_description"><p>overall alpha for source image (0..255)</p></td>
|
678
|
+
<td class="parameter_annotations"> </td>
|
630
679
|
</tr>
|
631
680
|
<tr>
|
632
|
-
<td
|
633
|
-
<td>the X offset for the checkboard (origin of checkboard is at -<em class="parameter"><code>check_x</code></em
|
681
|
+
<td class="parameter_name"><p>check_x</p></td>
|
682
|
+
<td class="parameter_description"><p>the X offset for the checkboard (origin of checkboard is at -<em class="parameter"><code>check_x</code></em>
|
683
|
+
, -<em class="parameter"><code>check_y</code></em>
|
684
|
+
)</p></td>
|
685
|
+
<td class="parameter_annotations"> </td>
|
634
686
|
</tr>
|
635
687
|
<tr>
|
636
|
-
<td
|
637
|
-
<td>the Y offset for the checkboard</td>
|
688
|
+
<td class="parameter_name"><p>check_y</p></td>
|
689
|
+
<td class="parameter_description"><p>the Y offset for the checkboard </p></td>
|
690
|
+
<td class="parameter_annotations"> </td>
|
638
691
|
</tr>
|
639
692
|
<tr>
|
640
|
-
<td
|
641
|
-
<td>the size of checks in the checkboard (must be a power of two)</td>
|
693
|
+
<td class="parameter_name"><p>check_size</p></td>
|
694
|
+
<td class="parameter_description"><p>the size of checks in the checkboard (must be a power of two)</p></td>
|
695
|
+
<td class="parameter_annotations"> </td>
|
642
696
|
</tr>
|
643
697
|
<tr>
|
644
|
-
<td
|
645
|
-
<td>the color of check at upper left</td>
|
698
|
+
<td class="parameter_name"><p>color1</p></td>
|
699
|
+
<td class="parameter_description"><p>the color of check at upper left</p></td>
|
700
|
+
<td class="parameter_annotations"> </td>
|
646
701
|
</tr>
|
647
702
|
<tr>
|
648
|
-
<td
|
649
|
-
<td>the color of the other check</td>
|
703
|
+
<td class="parameter_name"><p>color2</p></td>
|
704
|
+
<td class="parameter_description"><p>the color of the other check</p></td>
|
705
|
+
<td class="parameter_annotations"> </td>
|
650
706
|
</tr>
|
651
707
|
</tbody>
|
652
708
|
</table></div>
|
653
709
|
</div>
|
710
|
+
</div>
|
654
711
|
<hr>
|
655
712
|
<div class="refsect2">
|
656
|
-
<a name="
|
657
|
-
<pre class="programlisting"
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
</
|
664
|
-
<
|
665
|
-
The possible rotations which can be passed to <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-rotate-simple" title="gdk_pixbuf_rotate_simple ()"><code class="function">gdk_pixbuf_rotate_simple()</code></a>.
|
666
|
-
To make them easier to use, their numerical values are the actual degrees.
|
667
|
-
</p>
|
668
|
-
<div class="variablelist"><table border="0" class="variablelist">
|
713
|
+
<a name="gdk-pixbuf-rotate-simple"></a><h3>gdk_pixbuf_rotate_simple ()</h3>
|
714
|
+
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
|
715
|
+
gdk_pixbuf_rotate_simple (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
|
716
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkPixbufRotation" title="enum GdkPixbufRotation"><span class="type">GdkPixbufRotation</span></a> angle</code></em>);</pre>
|
717
|
+
<p>Rotates a pixbuf by a multiple of 90 degrees, and returns the
|
718
|
+
result in a new pixbuf.</p>
|
719
|
+
<div class="refsect3">
|
720
|
+
<a name="id-1.2.10.7.7.5"></a><h4>Parameters</h4>
|
721
|
+
<div class="informaltable"><table width="100%" border="0">
|
669
722
|
<colgroup>
|
670
|
-
<col
|
671
|
-
<col>
|
723
|
+
<col width="150px" class="parameters_name">
|
724
|
+
<col class="parameters_description">
|
725
|
+
<col width="200px" class="parameters_annotations">
|
672
726
|
</colgroup>
|
673
727
|
<tbody>
|
674
728
|
<tr>
|
675
|
-
<td
|
676
|
-
<td>
|
677
|
-
</td>
|
729
|
+
<td class="parameter_name"><p>src</p></td>
|
730
|
+
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
|
731
|
+
<td class="parameter_annotations"> </td>
|
678
732
|
</tr>
|
679
733
|
<tr>
|
680
|
-
<td
|
681
|
-
<td>
|
682
|
-
</td>
|
734
|
+
<td class="parameter_name"><p>angle</p></td>
|
735
|
+
<td class="parameter_description"><p>the angle to rotate by</p></td>
|
736
|
+
<td class="parameter_annotations"> </td>
|
683
737
|
</tr>
|
738
|
+
</tbody>
|
739
|
+
</table></div>
|
740
|
+
</div>
|
741
|
+
<div class="refsect3">
|
742
|
+
<a name="id-1.2.10.7.7.6"></a><h4>Returns</h4>
|
743
|
+
<p> the new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not enough memory could be
|
744
|
+
allocated for it. </p>
|
745
|
+
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
|
746
|
+
</div>
|
747
|
+
<p class="since">Since 2.6</p>
|
748
|
+
</div>
|
749
|
+
<hr>
|
750
|
+
<div class="refsect2">
|
751
|
+
<a name="gdk-pixbuf-flip"></a><h3>gdk_pixbuf_flip ()</h3>
|
752
|
+
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
|
753
|
+
gdk_pixbuf_flip (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
|
754
|
+
<em class="parameter"><code><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> horizontal</code></em>);</pre>
|
755
|
+
<p>Flips a pixbuf horizontally or vertically and returns the
|
756
|
+
result in a new pixbuf.</p>
|
757
|
+
<div class="refsect3">
|
758
|
+
<a name="id-1.2.10.7.8.5"></a><h4>Parameters</h4>
|
759
|
+
<div class="informaltable"><table width="100%" border="0">
|
760
|
+
<colgroup>
|
761
|
+
<col width="150px" class="parameters_name">
|
762
|
+
<col class="parameters_description">
|
763
|
+
<col width="200px" class="parameters_annotations">
|
764
|
+
</colgroup>
|
765
|
+
<tbody>
|
684
766
|
<tr>
|
685
|
-
<td
|
686
|
-
<td>
|
687
|
-
</td>
|
767
|
+
<td class="parameter_name"><p>src</p></td>
|
768
|
+
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
|
769
|
+
<td class="parameter_annotations"> </td>
|
688
770
|
</tr>
|
689
771
|
<tr>
|
690
|
-
<td
|
691
|
-
<td>
|
692
|
-
</td>
|
772
|
+
<td class="parameter_name"><p>horizontal</p></td>
|
773
|
+
<td class="parameter_description"><p><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to flip horizontally, <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to flip vertically</p></td>
|
774
|
+
<td class="parameter_annotations"> </td>
|
693
775
|
</tr>
|
694
776
|
</tbody>
|
695
777
|
</table></div>
|
696
778
|
</div>
|
697
|
-
<
|
779
|
+
<div class="refsect3">
|
780
|
+
<a name="id-1.2.10.7.8.6"></a><h4>Returns</h4>
|
781
|
+
<p> the new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not enough memory could be
|
782
|
+
allocated for it. </p>
|
783
|
+
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
|
784
|
+
</div>
|
785
|
+
<p class="since">Since 2.6</p>
|
786
|
+
</div>
|
787
|
+
</div>
|
788
|
+
<div class="refsect1">
|
789
|
+
<a name="gdk-pixbuf-Scaling.other_details"></a><h2>Types and Values</h2>
|
698
790
|
<div class="refsect2">
|
699
|
-
<a name="
|
700
|
-
<
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
791
|
+
<a name="GdkInterpType"></a><h3>enum GdkInterpType</h3>
|
792
|
+
<p>This enumeration describes the different interpolation modes that
|
793
|
+
can be used with the scaling functions. <em class="parameter"><code>GDK_INTERP_NEAREST</code></em>
|
794
|
+
is
|
795
|
+
the fastest scaling method, but has horrible quality when
|
796
|
+
scaling down. <em class="parameter"><code>GDK_INTERP_BILINEAR</code></em>
|
797
|
+
is the best choice if you
|
798
|
+
aren't sure what to choose, it has a good speed/quality balance.</p>
|
799
|
+
<p> <note>
|
800
|
+
Cubic filtering is missing from the list; hyperbolic
|
801
|
+
interpolation is just as fast and results in higher quality.
|
802
|
+
</note></p>
|
803
|
+
<div class="refsect3">
|
804
|
+
<a name="id-1.2.10.8.2.5"></a><h4>Members</h4>
|
805
|
+
<div class="informaltable"><table width="100%" border="0">
|
707
806
|
<colgroup>
|
708
|
-
<col
|
709
|
-
<col>
|
807
|
+
<col width="300px" class="enum_members_name">
|
808
|
+
<col class="enum_members_description">
|
809
|
+
<col width="200px" class="enum_members_annotations">
|
710
810
|
</colgroup>
|
711
811
|
<tbody>
|
712
812
|
<tr>
|
713
|
-
<td
|
714
|
-
<td
|
813
|
+
<td class="enum_member_name"><p><a name="GDK-INTERP-NEAREST:CAPS"></a>GDK_INTERP_NEAREST</p></td>
|
814
|
+
<td class="enum_member_description">
|
815
|
+
<p>Nearest neighbor sampling; this is the fastest
|
816
|
+
and lowest quality mode. Quality is normally unacceptable when scaling
|
817
|
+
down, but may be OK when scaling up.</p>
|
818
|
+
</td>
|
819
|
+
<td class="enum_member_annotations"> </td>
|
820
|
+
</tr>
|
821
|
+
<tr>
|
822
|
+
<td class="enum_member_name"><p><a name="GDK-INTERP-TILES:CAPS"></a>GDK_INTERP_TILES</p></td>
|
823
|
+
<td class="enum_member_description">
|
824
|
+
<p>This is an accurate simulation of the PostScript
|
825
|
+
image operator without any interpolation enabled. Each pixel is
|
826
|
+
rendered as a tiny parallelogram of solid color, the edges of which
|
827
|
+
are implemented with antialiasing. It resembles nearest neighbor for
|
828
|
+
enlargement, and bilinear for reduction.</p>
|
715
829
|
</td>
|
830
|
+
<td class="enum_member_annotations"> </td>
|
716
831
|
</tr>
|
717
832
|
<tr>
|
718
|
-
<td
|
719
|
-
<td
|
833
|
+
<td class="enum_member_name"><p><a name="GDK-INTERP-BILINEAR:CAPS"></a>GDK_INTERP_BILINEAR</p></td>
|
834
|
+
<td class="enum_member_description">
|
835
|
+
<p>Best quality/speed balance; use this mode by
|
836
|
+
default. Bilinear interpolation. For enlargement, it is
|
837
|
+
equivalent to point-sampling the ideal bilinear-interpolated image.
|
838
|
+
For reduction, it is equivalent to laying down small tiles and
|
839
|
+
integrating over the coverage area.</p>
|
840
|
+
</td>
|
841
|
+
<td class="enum_member_annotations"> </td>
|
720
842
|
</tr>
|
721
843
|
<tr>
|
722
|
-
<td
|
723
|
-
<td
|
724
|
-
|
844
|
+
<td class="enum_member_name"><p><a name="GDK-INTERP-HYPER:CAPS"></a>GDK_INTERP_HYPER</p></td>
|
845
|
+
<td class="enum_member_description">
|
846
|
+
<p>This is the slowest and highest quality
|
847
|
+
reconstruction function. It is derived from the hyperbolic filters in
|
848
|
+
Wolberg's "Digital Image Warping", and is formally defined as the
|
849
|
+
hyperbolic-filter sampling the ideal hyperbolic-filter interpolated
|
850
|
+
image (the filter is designed to be idempotent for 1:1 pixel mapping).</p>
|
725
851
|
</td>
|
852
|
+
<td class="enum_member_annotations"> </td>
|
726
853
|
</tr>
|
727
854
|
</tbody>
|
728
855
|
</table></div>
|
729
|
-
|
856
|
+
</div>
|
730
857
|
</div>
|
731
858
|
<hr>
|
732
859
|
<div class="refsect2">
|
733
|
-
<a name="
|
734
|
-
<
|
735
|
-
|
736
|
-
<
|
737
|
-
|
738
|
-
|
739
|
-
</p>
|
740
|
-
<div class="variablelist"><table border="0" class="variablelist">
|
860
|
+
<a name="GdkPixbufRotation"></a><h3>enum GdkPixbufRotation</h3>
|
861
|
+
<p>The possible rotations which can be passed to <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-rotate-simple" title="gdk_pixbuf_rotate_simple ()"><code class="function">gdk_pixbuf_rotate_simple()</code></a>.
|
862
|
+
To make them easier to use, their numerical values are the actual degrees.</p>
|
863
|
+
<div class="refsect3">
|
864
|
+
<a name="id-1.2.10.8.3.4"></a><h4>Members</h4>
|
865
|
+
<div class="informaltable"><table width="100%" border="0">
|
741
866
|
<colgroup>
|
742
|
-
<col
|
743
|
-
<col>
|
867
|
+
<col width="300px" class="enum_members_name">
|
868
|
+
<col class="enum_members_description">
|
869
|
+
<col width="200px" class="enum_members_annotations">
|
744
870
|
</colgroup>
|
745
871
|
<tbody>
|
746
872
|
<tr>
|
747
|
-
<td
|
748
|
-
<td
|
873
|
+
<td class="enum_member_name"><p><a name="GDK-PIXBUF-ROTATE-NONE:CAPS"></a>GDK_PIXBUF_ROTATE_NONE</p></td>
|
874
|
+
<td class="enum_member_description">
|
875
|
+
<p>No rotation.</p>
|
749
876
|
</td>
|
877
|
+
<td class="enum_member_annotations"> </td>
|
750
878
|
</tr>
|
751
879
|
<tr>
|
752
|
-
<td
|
753
|
-
<td>
|
754
|
-
<
|
880
|
+
<td class="enum_member_name"><p><a name="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"></a>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</p></td>
|
881
|
+
<td class="enum_member_description">
|
882
|
+
<p>Rotate by 90 degrees.</p>
|
883
|
+
</td>
|
884
|
+
<td class="enum_member_annotations"> </td>
|
755
885
|
</tr>
|
756
886
|
<tr>
|
757
|
-
<td
|
758
|
-
<td
|
759
|
-
|
887
|
+
<td class="enum_member_name"><p><a name="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"></a>GDK_PIXBUF_ROTATE_UPSIDEDOWN</p></td>
|
888
|
+
<td class="enum_member_description">
|
889
|
+
<p>Rotate by 180 degrees.</p>
|
760
890
|
</td>
|
891
|
+
<td class="enum_member_annotations"> </td>
|
892
|
+
</tr>
|
893
|
+
<tr>
|
894
|
+
<td class="enum_member_name"><p><a name="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"></a>GDK_PIXBUF_ROTATE_CLOCKWISE</p></td>
|
895
|
+
<td class="enum_member_description">
|
896
|
+
<p>Rotate by 270 degrees.</p>
|
897
|
+
</td>
|
898
|
+
<td class="enum_member_annotations"> </td>
|
761
899
|
</tr>
|
762
900
|
</tbody>
|
763
901
|
</table></div>
|
764
|
-
|
902
|
+
</div>
|
765
903
|
</div>
|
766
904
|
</div>
|
767
905
|
<div class="refsect1">
|
768
906
|
<a name="gdk-pixbuf-Scaling.see-also"></a><h2>See Also</h2>
|
769
|
-
GdkRGB
|
907
|
+
<p><link linkend="gdk-GdkRGB">GdkRGB</link>.</p>
|
770
908
|
</div>
|
771
909
|
</div>
|
772
910
|
<div class="footer">
|
773
911
|
<hr>
|
774
|
-
Generated by GTK-Doc V1.
|
912
|
+
Generated by GTK-Doc V1.20.1</div>
|
775
913
|
</body>
|
776
914
|
</html>
|