~ubuntu-branches/ubuntu/karmic/exo/karmic

« back to all changes in this revision

Viewing changes to docs/reference/xml/exo-gdk-pixbuf-extensions.xml

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2009-08-21 14:28:56 UTC
  • mfrom: (1.1.22 upstream)
  • Revision ID: james.westby@ubuntu.com-20090821142856-xp7o7hl7x9xa2213
Tags: 0.3.102-1ubuntu1
* Merge from Debian unstable, remaining Ubuntu changes:
  - debian/rules:
    + Removed mangling of helpers.rc
    + Add --enable-gtk-doc switch to configure
  - debian/control:
    + Add build-dep on gtk-doc-tools
    + Update Vcs-* fields
  - debian/patches:
    + 04_update_helpers.patch: patched libexo's firefox helper desktop file
      to use firefox-3.0 icon instead of firefox icon
    + xubuntu-default-mount-options.patch: change default mount options for
      vfat, iso9660, ntfs
    + series: refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<refnamediv>
9
9
<refname>Extensions to gdk-pixbuf</refname>
10
10
<refpurpose>Miscelleanous extensions to the gdk-pixbuf library</refpurpose>
11
 
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
12
11
</refnamediv>
13
12
 
14
13
<refsynopsisdiv id="exo-Extensions-to-gdk-pixbuf.synopsis" role="synopsis">
18
17
 
19
18
#include &lt;exo/exo.h&gt;
20
19
 
21
 
<link linkend="GdkPixbuf">GdkPixbuf</link>*          <link linkend="exo-gdk-pixbuf-colorize">exo_gdk_pixbuf_colorize</link>             (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
 
20
<link linkend="GdkPixbuf">GdkPixbuf</link> *         <link linkend="exo-gdk-pixbuf-colorize">exo_gdk_pixbuf_colorize</link>             (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
22
21
                                                         const <link linkend="GdkColor">GdkColor</link> *color);
23
 
<link linkend="GdkPixbuf">GdkPixbuf</link>*          <link linkend="exo-gdk-pixbuf-frame">exo_gdk_pixbuf_frame</link>                (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
 
22
<link linkend="GdkPixbuf">GdkPixbuf</link> *         <link linkend="exo-gdk-pixbuf-frame">exo_gdk_pixbuf_frame</link>                (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
24
23
                                                         const <link linkend="GdkPixbuf">GdkPixbuf</link> *frame,
25
24
                                                         <link linkend="gint">gint</link> left_offset,
26
25
                                                         <link linkend="gint">gint</link> top_offset,
27
26
                                                         <link linkend="gint">gint</link> right_offset,
28
27
                                                         <link linkend="gint">gint</link> bottom_offset);
29
 
<link linkend="GdkPixbuf">GdkPixbuf</link>*          <link linkend="exo-gdk-pixbuf-lucent">exo_gdk_pixbuf_lucent</link>               (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
 
28
<link linkend="GdkPixbuf">GdkPixbuf</link> *         <link linkend="exo-gdk-pixbuf-lucent">exo_gdk_pixbuf_lucent</link>               (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
30
29
                                                         <link linkend="guint">guint</link> percent);
31
 
<link linkend="GdkPixbuf">GdkPixbuf</link>*          <link linkend="exo-gdk-pixbuf-spotlight">exo_gdk_pixbuf_spotlight</link>            (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src);
32
 
<link linkend="GdkPixbuf">GdkPixbuf</link>*          <link linkend="exo-gdk-pixbuf-scale-down">exo_gdk_pixbuf_scale_down</link>           (<link linkend="GdkPixbuf">GdkPixbuf</link> *source,
 
30
<link linkend="GdkPixbuf">GdkPixbuf</link> *         <link linkend="exo-gdk-pixbuf-spotlight">exo_gdk_pixbuf_spotlight</link>            (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src);
 
31
<link linkend="GdkPixbuf">GdkPixbuf</link> *         <link linkend="exo-gdk-pixbuf-scale-down">exo_gdk_pixbuf_scale_down</link>           (<link linkend="GdkPixbuf">GdkPixbuf</link> *source,
33
32
                                                         <link linkend="gboolean">gboolean</link> preserve_aspect_ratio,
34
33
                                                         <link linkend="gint">gint</link> dest_width,
35
34
                                                         <link linkend="gint">gint</link> dest_height);
36
 
<link linkend="GdkPixbuf">GdkPixbuf</link>*          <link linkend="exo-gdk-pixbuf-scale-ratio">exo_gdk_pixbuf_scale_ratio</link>          (<link linkend="GdkPixbuf">GdkPixbuf</link> *source,
 
35
<link linkend="GdkPixbuf">GdkPixbuf</link> *         <link linkend="exo-gdk-pixbuf-scale-ratio">exo_gdk_pixbuf_scale_ratio</link>          (<link linkend="GdkPixbuf">GdkPixbuf</link> *source,
37
36
                                                         <link linkend="gint">gint</link> dest_size);
38
 
<link linkend="GdkPixbuf">GdkPixbuf</link>*          <link linkend="exo-gdk-pixbuf-new-from-file-at-max-size">exo_gdk_pixbuf_new_from_file_at_max_size</link>
 
37
<link linkend="GdkPixbuf">GdkPixbuf</link> *         <link linkend="exo-gdk-pixbuf-new-from-file-at-max-size">exo_gdk_pixbuf_new_from_file_at_max_size</link>
39
38
                                                        (const <link linkend="gchar">gchar</link> *filename,
40
39
                                                         <link linkend="gint">gint</link> max_width,
41
40
                                                         <link linkend="gint">gint</link> max_height,
64
63
<title role="details.title">Details</title>
65
64
<refsect2 id="exo-gdk-pixbuf-colorize" role="function" condition="since:0.3.1.3">
66
65
<title>exo_gdk_pixbuf_colorize ()</title>
67
 
<indexterm zone="exo-gdk-pixbuf-colorize" role="0.3.1.3"><primary>exo_gdk_pixbuf_colorize</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>*          exo_gdk_pixbuf_colorize             (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
 
66
<indexterm zone="exo-gdk-pixbuf-colorize" role="0.3.1.3"><primary sortas="exo_gdk_pixbuf_colorize">exo_gdk_pixbuf_colorize</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link> *         exo_gdk_pixbuf_colorize             (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
68
67
                                                         const <link linkend="GdkColor">GdkColor</link> *color);</programlisting>
69
68
<para>
70
69
Creates a new <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> based on <parameter>src</parameter>, which is
74
73
The caller is responsible to free the returned object
75
74
using <link linkend="g-object-unref"><function>g_object_unref()</function></link> when no longer needed.</para>
76
75
<para>
77
 
 
78
76
</para><variablelist role="params">
79
 
<varlistentry><term><parameter>src</parameter>&nbsp;:</term>
 
77
<varlistentry><term><parameter>src</parameter>&#160;:</term>
80
78
<listitem><simpara> the source <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
81
79
</simpara></listitem></varlistentry>
82
 
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
 
80
<varlistentry><term><parameter>color</parameter>&#160;:</term>
83
81
<listitem><simpara> the new color.
84
82
</simpara></listitem></varlistentry>
85
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the colorized <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
 
83
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the colorized <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
86
84
 
87
85
</simpara></listitem></varlistentry>
88
 
</variablelist><para role="since">Since  0.3.1.3
89
 
</para></refsect2>
 
86
</variablelist><para role="since">Since 0.3.1.3</para></refsect2>
90
87
<refsect2 id="exo-gdk-pixbuf-frame" role="function" condition="since:0.3.1.9">
91
88
<title>exo_gdk_pixbuf_frame ()</title>
92
 
<indexterm zone="exo-gdk-pixbuf-frame" role="0.3.1.9"><primary>exo_gdk_pixbuf_frame</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>*          exo_gdk_pixbuf_frame                (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
 
89
<indexterm zone="exo-gdk-pixbuf-frame" role="0.3.1.9"><primary sortas="exo_gdk_pixbuf_frame">exo_gdk_pixbuf_frame</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link> *         exo_gdk_pixbuf_frame                (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
93
90
                                                         const <link linkend="GdkPixbuf">GdkPixbuf</link> *frame,
94
91
                                                         <link linkend="gint">gint</link> left_offset,
95
92
                                                         <link linkend="gint">gint</link> top_offset,
101
98
<para>
102
99
The caller is responsible to free the returned <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> using <link linkend="g-object-unref"><function>g_object_unref()</function></link>.</para>
103
100
<para>
104
 
 
105
101
</para><variablelist role="params">
106
 
<varlistentry><term><parameter>src</parameter>&nbsp;:</term>
 
102
<varlistentry><term><parameter>src</parameter>&#160;:</term>
107
103
<listitem><simpara> the source <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
108
104
</simpara></listitem></varlistentry>
109
 
<varlistentry><term><parameter>frame</parameter>&nbsp;:</term>
 
105
<varlistentry><term><parameter>frame</parameter>&#160;:</term>
110
106
<listitem><simpara> the frame <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
111
107
</simpara></listitem></varlistentry>
112
 
<varlistentry><term><parameter>left_offset</parameter>&nbsp;:</term>
 
108
<varlistentry><term><parameter>left_offset</parameter>&#160;:</term>
113
109
<listitem><simpara> the left frame offset.
114
110
</simpara></listitem></varlistentry>
115
 
<varlistentry><term><parameter>top_offset</parameter>&nbsp;:</term>
 
111
<varlistentry><term><parameter>top_offset</parameter>&#160;:</term>
116
112
<listitem><simpara> the top frame offset.
117
113
</simpara></listitem></varlistentry>
118
 
<varlistentry><term><parameter>right_offset</parameter>&nbsp;:</term>
 
114
<varlistentry><term><parameter>right_offset</parameter>&#160;:</term>
119
115
<listitem><simpara> the right frame offset.
120
116
</simpara></listitem></varlistentry>
121
 
<varlistentry><term><parameter>bottom_offset</parameter>&nbsp;:</term>
 
117
<varlistentry><term><parameter>bottom_offset</parameter>&#160;:</term>
122
118
<listitem><simpara> the bottom frame offset.
123
119
</simpara></listitem></varlistentry>
124
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the framed version of <parameter>src</parameter>.
 
120
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the framed version of <parameter>src</parameter>.
125
121
 
126
122
</simpara></listitem></varlistentry>
127
 
</variablelist><para role="since">Since  0.3.1.9
128
 
</para></refsect2>
 
123
</variablelist><para role="since">Since 0.3.1.9</para></refsect2>
129
124
<refsect2 id="exo-gdk-pixbuf-lucent" role="function" condition="since:0.3.1.3">
130
125
<title>exo_gdk_pixbuf_lucent ()</title>
131
 
<indexterm zone="exo-gdk-pixbuf-lucent" role="0.3.1.3"><primary>exo_gdk_pixbuf_lucent</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>*          exo_gdk_pixbuf_lucent               (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
 
126
<indexterm zone="exo-gdk-pixbuf-lucent" role="0.3.1.3"><primary sortas="exo_gdk_pixbuf_lucent">exo_gdk_pixbuf_lucent</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link> *         exo_gdk_pixbuf_lucent               (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src,
132
127
                                                         <link linkend="guint">guint</link> percent);</programlisting>
133
128
<para>
134
129
Returns a version of <parameter>src</parameter>, whose pixels translucency is
138
133
The caller is responsible to free the returned object
139
134
using <link linkend="g-object-unref"><function>g_object_unref()</function></link> when no longer needed.</para>
140
135
<para>
141
 
 
142
136
</para><variablelist role="params">
143
 
<varlistentry><term><parameter>src</parameter>&nbsp;:</term>
 
137
<varlistentry><term><parameter>src</parameter>&#160;:</term>
144
138
<listitem><simpara> the source <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
145
139
</simpara></listitem></varlistentry>
146
 
<varlistentry><term><parameter>percent</parameter>&nbsp;:</term>
 
140
<varlistentry><term><parameter>percent</parameter>&#160;:</term>
147
141
<listitem><simpara> the percentage of translucency.
148
142
</simpara></listitem></varlistentry>
149
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a translucent version of <parameter>src</parameter>.
 
143
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a translucent version of <parameter>src</parameter>.
150
144
 
151
145
</simpara></listitem></varlistentry>
152
 
</variablelist><para role="since">Since  0.3.1.3
153
 
</para></refsect2>
 
146
</variablelist><para role="since">Since 0.3.1.3</para></refsect2>
154
147
<refsect2 id="exo-gdk-pixbuf-spotlight" role="function" condition="since:0.3.1.3">
155
148
<title>exo_gdk_pixbuf_spotlight ()</title>
156
 
<indexterm zone="exo-gdk-pixbuf-spotlight" role="0.3.1.3"><primary>exo_gdk_pixbuf_spotlight</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>*          exo_gdk_pixbuf_spotlight            (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src);</programlisting>
 
149
<indexterm zone="exo-gdk-pixbuf-spotlight" role="0.3.1.3"><primary sortas="exo_gdk_pixbuf_spotlight">exo_gdk_pixbuf_spotlight</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link> *         exo_gdk_pixbuf_spotlight            (const <link linkend="GdkPixbuf">GdkPixbuf</link> *src);</programlisting>
157
150
<para>
158
151
Creates a lightened version of <parameter>src</parameter>, suitable for
159
152
prelit state display of icons.
162
155
The caller is responsible to free the returned
163
156
pixbuf using #<link linkend="g-object-unref"><function>g_object_unref()</function></link>.</para>
164
157
<para>
165
 
 
166
158
</para><variablelist role="params">
167
 
<varlistentry><term><parameter>src</parameter>&nbsp;:</term>
 
159
<varlistentry><term><parameter>src</parameter>&#160;:</term>
168
160
<listitem><simpara> the source <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
169
161
</simpara></listitem></varlistentry>
170
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the lightened version of <parameter>src</parameter>.
 
162
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the lightened version of <parameter>src</parameter>.
171
163
 
172
164
</simpara></listitem></varlistentry>
173
 
</variablelist><para role="since">Since  0.3.1.3
174
 
</para></refsect2>
 
165
</variablelist><para role="since">Since 0.3.1.3</para></refsect2>
175
166
<refsect2 id="exo-gdk-pixbuf-scale-down" role="function" condition="since:0.3.1.1">
176
167
<title>exo_gdk_pixbuf_scale_down ()</title>
177
 
<indexterm zone="exo-gdk-pixbuf-scale-down" role="0.3.1.1"><primary>exo_gdk_pixbuf_scale_down</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>*          exo_gdk_pixbuf_scale_down           (<link linkend="GdkPixbuf">GdkPixbuf</link> *source,
 
168
<indexterm zone="exo-gdk-pixbuf-scale-down" role="0.3.1.1"><primary sortas="exo_gdk_pixbuf_scale_down">exo_gdk_pixbuf_scale_down</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link> *         exo_gdk_pixbuf_scale_down           (<link linkend="GdkPixbuf">GdkPixbuf</link> *source,
178
169
                                                         <link linkend="gboolean">gboolean</link> preserve_aspect_ratio,
179
170
                                                         <link linkend="gint">gint</link> dest_width,
180
171
                                                         <link linkend="gint">gint</link> dest_height);</programlisting>
181
172
<para>
182
173
Scales down the <parameter>source</parameter> to fit into the given <parameter>width</parameter> and
183
 
<parameter>height</parameter>. If <parameter>aspect_ratio</parameter> is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> then the aspect ratio
 
174
<parameter>height</parameter>. If <parameter>aspect_ratio</parameter> is <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> then the aspect ratio
184
175
of <parameter>source</parameter> will be preserved.
185
176
</para>
186
177
<para>
193
184
The caller is responsible to free the returned <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>
194
185
using <link linkend="g-object-unref"><function>g_object_unref()</function></link> when no longer needed.</para>
195
186
<para>
196
 
 
197
187
</para><variablelist role="params">
198
 
<varlistentry><term><parameter>source</parameter>&nbsp;:</term>
 
188
<varlistentry><term><parameter>source</parameter>&#160;:</term>
199
189
<listitem><simpara> the source <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
200
190
</simpara></listitem></varlistentry>
201
 
<varlistentry><term><parameter>preserve_aspect_ratio</parameter>&nbsp;:</term>
202
 
<listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to preserve aspect ratio.
 
191
<varlistentry><term><parameter>preserve_aspect_ratio</parameter>&#160;:</term>
 
192
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> to preserve aspect ratio.
203
193
</simpara></listitem></varlistentry>
204
 
<varlistentry><term><parameter>dest_width</parameter>&nbsp;:</term>
 
194
<varlistentry><term><parameter>dest_width</parameter>&#160;:</term>
205
195
<listitem><simpara> the max width for the result.
206
196
</simpara></listitem></varlistentry>
207
 
<varlistentry><term><parameter>dest_height</parameter>&nbsp;:</term>
 
197
<varlistentry><term><parameter>dest_height</parameter>&#160;:</term>
208
198
<listitem><simpara> the max height for the result.
209
199
</simpara></listitem></varlistentry>
210
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the resulting <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
 
200
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the resulting <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
211
201
 
212
202
</simpara></listitem></varlistentry>
213
 
</variablelist><para role="since">Since  0.3.1.1
214
 
</para></refsect2>
 
203
</variablelist><para role="since">Since 0.3.1.1</para></refsect2>
215
204
<refsect2 id="exo-gdk-pixbuf-scale-ratio" role="function">
216
205
<title>exo_gdk_pixbuf_scale_ratio ()</title>
217
 
<indexterm zone="exo-gdk-pixbuf-scale-ratio"><primary>exo_gdk_pixbuf_scale_ratio</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>*          exo_gdk_pixbuf_scale_ratio          (<link linkend="GdkPixbuf">GdkPixbuf</link> *source,
 
206
<indexterm zone="exo-gdk-pixbuf-scale-ratio"><primary sortas="exo_gdk_pixbuf_scale_ratio">exo_gdk_pixbuf_scale_ratio</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link> *         exo_gdk_pixbuf_scale_ratio          (<link linkend="GdkPixbuf">GdkPixbuf</link> *source,
218
207
                                                         <link linkend="gint">gint</link> dest_size);</programlisting>
219
208
<para>
220
209
Scales <parameter>source</parameter> to <parameter>dest_size</parameter> while preserving the aspect ratio of
221
210
<parameter>source</parameter>.</para>
222
211
<para>
223
 
 
224
212
</para><variablelist role="params">
225
 
<varlistentry><term><parameter>source</parameter>&nbsp;:</term>
 
213
<varlistentry><term><parameter>source</parameter>&#160;:</term>
226
214
<listitem><simpara> The source <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
227
215
</simpara></listitem></varlistentry>
228
 
<varlistentry><term><parameter>dest_size</parameter>&nbsp;:</term>
 
216
<varlistentry><term><parameter>dest_size</parameter>&#160;:</term>
229
217
<listitem><simpara> The target size in pixel.
230
218
</simpara></listitem></varlistentry>
231
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A newly created <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
 
219
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A newly created <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
232
220
</simpara></listitem></varlistentry>
233
221
</variablelist></refsect2>
234
222
<refsect2 id="exo-gdk-pixbuf-new-from-file-at-max-size" role="function" condition="since:0.3.1.9">
235
223
<title>exo_gdk_pixbuf_new_from_file_at_max_size ()</title>
236
 
<indexterm zone="exo-gdk-pixbuf-new-from-file-at-max-size" role="0.3.1.9"><primary>exo_gdk_pixbuf_new_from_file_at_max_size</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>*          exo_gdk_pixbuf_new_from_file_at_max_size
 
224
<indexterm zone="exo-gdk-pixbuf-new-from-file-at-max-size" role="0.3.1.9"><primary sortas="exo_gdk_pixbuf_new_from_file_at_max_size">exo_gdk_pixbuf_new_from_file_at_max_size</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link> *         exo_gdk_pixbuf_new_from_file_at_max_size
237
225
                                                        (const <link linkend="gchar">gchar</link> *filename,
238
226
                                                         <link linkend="gint">gint</link> max_width,
239
227
                                                         <link linkend="gint">gint</link> max_height,
240
228
                                                         <link linkend="gboolean">gboolean</link> preserve_aspect_ratio,
241
229
                                                         <link linkend="GError">GError</link> **error);</programlisting>
242
230
<para>
243
 
Creates a new <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> by loading an image from the file at <parameter>filename</parameter>. The file format is detected automatically. If <link linkend="NULL:CAPS"><literal>NULL</literal></link>
244
 
is returned, then <parameter>error</parameter> will be set. Possible errors are in the <link linkend="GDK-PIXBUF-ERROR:CAPS"><type>GDK_PIXBUF_ERROR</type></link> and <link linkend="G-FILE-ERROR:CAPS"><type>G_FILE_ERROR</type></link> domains. If the image
 
231
Creates a new <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> by loading an image from the file at <parameter>filename</parameter>. The file format is detected automatically. If <link linkend="NULL--CAPS"><literal>NULL</literal></link>
 
232
is returned, then <parameter>error</parameter> will be set. Possible errors are in the <link linkend="GDK-PIXBUF-ERROR--CAPS"><type>GDK_PIXBUF_ERROR</type></link> and <link linkend="G-FILE-ERROR--CAPS"><type>G_FILE_ERROR</type></link> domains. If the image
245
233
dimensions exceed <parameter>max_width</parameter> or <parameter>max_height</parameter>, the image will be scaled down to fit into the dimensions, optionally preserving
246
234
the image's aspect ratio. The image may still be larger, depending on the loader.
247
235
</para>
249
237
The advantage of using this function over <link linkend="gdk-pixbuf-new-from-file-at-scale"><function>gdk_pixbuf_new_from_file_at_scale()</function></link> is that images will never be scaled up, which
250
238
would otherwise result in ugly images.</para>
251
239
<para>
252
 
 
253
240
</para><variablelist role="params">
254
 
<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
 
241
<varlistentry><term><parameter>filename</parameter>&#160;:</term>
255
242
<listitem><simpara> name of the file to load, in the GLib file name encoding.
256
243
</simpara></listitem></varlistentry>
257
 
<varlistentry><term><parameter>max_width</parameter>&nbsp;:</term>
 
244
<varlistentry><term><parameter>max_width</parameter>&#160;:</term>
258
245
<listitem><simpara> the maximum width of the loaded image.
259
246
</simpara></listitem></varlistentry>
260
 
<varlistentry><term><parameter>max_height</parameter>&nbsp;:</term>
 
247
<varlistentry><term><parameter>max_height</parameter>&#160;:</term>
261
248
<listitem><simpara> the maximum height of the loaded image.
262
249
</simpara></listitem></varlistentry>
263
 
<varlistentry><term><parameter>preserve_aspect_ratio</parameter>&nbsp;:</term>
264
 
<listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to preserve the image's aspect ratio while scaling to fit into <parameter>max_width</parameter> and <parameter>max_height</parameter>.
265
 
</simpara></listitem></varlistentry>
266
 
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
267
 
<listitem><simpara> return location for errors or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
268
 
</simpara></listitem></varlistentry>
269
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly created <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> with a reference count or 1, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if any of several error conditions occurred:
 
250
<varlistentry><term><parameter>preserve_aspect_ratio</parameter>&#160;:</term>
 
251
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> to preserve the image's aspect ratio while scaling to fit into <parameter>max_width</parameter> and <parameter>max_height</parameter>.
 
252
</simpara></listitem></varlistentry>
 
253
<varlistentry><term><parameter>error</parameter>&#160;:</term>
 
254
<listitem><simpara> return location for errors or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
 
255
</simpara></listitem></varlistentry>
 
256
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a newly created <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> with a reference count or 1, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if any of several error conditions occurred:
270
257
              the file could not be opened, there was no loader for the file's format, there was not enough memory to allocate
271
258
              the buffer for the image, or the image file contained invalid data.
272
259
 
273
260
</simpara></listitem></varlistentry>
274
 
</variablelist><para role="since">Since  0.3.1.9
275
 
</para></refsect2>
 
261
</variablelist><para role="since">Since 0.3.1.9</para></refsect2>
276
262
 
277
263
</refsect1>
278
264