/usr/share/gtk-doc/html/exo-1/exo-Extensions-to-gdk-pixbuf.html is in libexo-1-dev 0.6.2-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Extensions to gdk-pixbuf</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Exo Reference Manual">
<link rel="up" href="exo-extensions.html" title="Part VI. Extensions to existing frameworks">
<link rel="prev" href="exo-extensions.html" title="Part VI. Extensions to existing frameworks">
<link rel="next" href="exo-Extensions-to-GObject.html" title="Extensions to GObject">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="exo-extensions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="exo-extensions.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Exo Reference Manual</th>
<td><a accesskey="n" href="exo-Extensions-to-GObject.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#exo-Extensions-to-gdk-pixbuf.synopsis" class="shortcut">Top</a>
|
<a href="#exo-Extensions-to-gdk-pixbuf.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="exo-Extensions-to-gdk-pixbuf"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="exo-Extensions-to-gdk-pixbuf.top_of_page"></a>Extensions to gdk-pixbuf</span></h2>
<p>Extensions to gdk-pixbuf — Miscelleanous extensions to the gdk-pixbuf library</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="exo-Extensions-to-gdk-pixbuf.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <exo/exo.h>
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="exo-Extensions-to-gdk-pixbuf.html#exo-gdk-pixbuf-colorize" title="exo_gdk_pixbuf_colorize ()">exo_gdk_pixbuf_colorize</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>,
<em class="parameter"><code>const <span class="type">GdkColor</span> *color</code></em>);
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="exo-Extensions-to-gdk-pixbuf.html#exo-gdk-pixbuf-frame" title="exo_gdk_pixbuf_frame ()">exo_gdk_pixbuf_frame</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *frame</code></em>,
<em class="parameter"><code><span class="type">gint</span> left_offset</code></em>,
<em class="parameter"><code><span class="type">gint</span> top_offset</code></em>,
<em class="parameter"><code><span class="type">gint</span> right_offset</code></em>,
<em class="parameter"><code><span class="type">gint</span> bottom_offset</code></em>);
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="exo-Extensions-to-gdk-pixbuf.html#exo-gdk-pixbuf-lucent" title="exo_gdk_pixbuf_lucent ()">exo_gdk_pixbuf_lucent</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>,
<em class="parameter"><code><span class="type">guint</span> percent</code></em>);
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="exo-Extensions-to-gdk-pixbuf.html#exo-gdk-pixbuf-spotlight" title="exo_gdk_pixbuf_spotlight ()">exo_gdk_pixbuf_spotlight</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>);
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="exo-Extensions-to-gdk-pixbuf.html#exo-gdk-pixbuf-scale-down" title="exo_gdk_pixbuf_scale_down ()">exo_gdk_pixbuf_scale_down</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> preserve_aspect_ratio</code></em>,
<em class="parameter"><code><span class="type">gint</span> dest_width</code></em>,
<em class="parameter"><code><span class="type">gint</span> dest_height</code></em>);
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="exo-Extensions-to-gdk-pixbuf.html#exo-gdk-pixbuf-scale-ratio" title="exo_gdk_pixbuf_scale_ratio ()">exo_gdk_pixbuf_scale_ratio</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>,
<em class="parameter"><code><span class="type">gint</span> dest_size</code></em>);
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="exo-Extensions-to-gdk-pixbuf.html#exo-gdk-pixbuf-new-from-file-at-max-size" title="exo_gdk_pixbuf_new_from_file_at_max_size ()">exo_gdk_pixbuf_new_from_file_at_max_size</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
<em class="parameter"><code><span class="type">gint</span> max_width</code></em>,
<em class="parameter"><code><span class="type">gint</span> max_height</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> preserve_aspect_ratio</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="exo-Extensions-to-gdk-pixbuf.description"></a><h2>Description</h2>
<p>
This facility includes several functions to extend the basic functionality
provided by the gdk-pixbuf library.
</p>
</div>
<div class="refsect1">
<a name="exo-Extensions-to-gdk-pixbuf.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="exo-gdk-pixbuf-colorize"></a><h3>exo_gdk_pixbuf_colorize ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * exo_gdk_pixbuf_colorize (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>,
<em class="parameter"><code>const <span class="type">GdkColor</span> *color</code></em>);</pre>
<p>
Creates a new <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> based on <em class="parameter"><code>source</code></em>, which is
colorized to <em class="parameter"><code>color</code></em>.
</p>
<p>
The caller is responsible to free the returned object
using <code class="function">g_object_unref()</code> when no longer needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>the source <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>the new color.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the colorized <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.3.1.3</p>
</div>
<hr>
<div class="refsect2">
<a name="exo-gdk-pixbuf-frame"></a><h3>exo_gdk_pixbuf_frame ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * exo_gdk_pixbuf_frame (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *frame</code></em>,
<em class="parameter"><code><span class="type">gint</span> left_offset</code></em>,
<em class="parameter"><code><span class="type">gint</span> top_offset</code></em>,
<em class="parameter"><code><span class="type">gint</span> right_offset</code></em>,
<em class="parameter"><code><span class="type">gint</span> bottom_offset</code></em>);</pre>
<p>
Embeds <em class="parameter"><code>source</code></em> in <em class="parameter"><code>frame</code></em> and returns the result as new <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.
</p>
<p>
The caller is responsible to free the returned <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> using <code class="function">g_object_unref()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>the source <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
<td>the frame <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>left_offset</code></em> :</span></p></td>
<td>the left frame offset.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>top_offset</code></em> :</span></p></td>
<td>the top frame offset.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>right_offset</code></em> :</span></p></td>
<td>the right frame offset.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bottom_offset</code></em> :</span></p></td>
<td>the bottom frame offset.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the framed version of <em class="parameter"><code>source</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.3.1.9</p>
</div>
<hr>
<div class="refsect2">
<a name="exo-gdk-pixbuf-lucent"></a><h3>exo_gdk_pixbuf_lucent ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * exo_gdk_pixbuf_lucent (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>,
<em class="parameter"><code><span class="type">guint</span> percent</code></em>);</pre>
<p>
Returns a version of <em class="parameter"><code>source</code></em>, whose pixels translucency is
<em class="parameter"><code>percent</code></em> of the original <em class="parameter"><code>source</code></em> pixels.
</p>
<p>
The caller is responsible to free the returned object
using <code class="function">g_object_unref()</code> when no longer needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>the source <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>percent</code></em> :</span></p></td>
<td>the percentage of translucency.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a translucent version of <em class="parameter"><code>source</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.3.1.3</p>
</div>
<hr>
<div class="refsect2">
<a name="exo-gdk-pixbuf-spotlight"></a><h3>exo_gdk_pixbuf_spotlight ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * exo_gdk_pixbuf_spotlight (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>);</pre>
<p>
Creates a lightened version of <em class="parameter"><code>source</code></em>, suitable for
prelit state display of icons.
</p>
<p>
The caller is responsible to free the returned
pixbuf using #<code class="function">g_object_unref()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>the source <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the lightened version of <em class="parameter"><code>source</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.3.1.3</p>
</div>
<hr>
<div class="refsect2">
<a name="exo-gdk-pixbuf-scale-down"></a><h3>exo_gdk_pixbuf_scale_down ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * exo_gdk_pixbuf_scale_down (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> preserve_aspect_ratio</code></em>,
<em class="parameter"><code><span class="type">gint</span> dest_width</code></em>,
<em class="parameter"><code><span class="type">gint</span> dest_height</code></em>);</pre>
<p>
Scales down the <em class="parameter"><code>source</code></em> to fit into the given <em class="parameter"><code>width</code></em> and
<em class="parameter"><code>height</code></em>. If <em class="parameter"><code>aspect_ratio</code></em> is <code class="literal">TRUE</code> then the aspect ratio
of <em class="parameter"><code>source</code></em> will be preserved.
</p>
<p>
If <em class="parameter"><code>width</code></em> is larger than the width of <em class="parameter"><code>source</code></em> and <em class="parameter"><code>height</code></em>
is larger than the height of <em class="parameter"><code>source</code></em>, a reference to
<em class="parameter"><code>source</code></em> will be returned, as it's unneccesary then to
scale down.
</p>
<p>
The caller is responsible to free the returned <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
using <code class="function">g_object_unref()</code> when no longer needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>the source <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>preserve_aspect_ratio</code></em> :</span></p></td>
<td>
<code class="literal">TRUE</code> to preserve aspect ratio.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_width</code></em> :</span></p></td>
<td>the max width for the result.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_height</code></em> :</span></p></td>
<td>the max height for the result.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the resulting <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.3.1.1</p>
</div>
<hr>
<div class="refsect2">
<a name="exo-gdk-pixbuf-scale-ratio"></a><h3>exo_gdk_pixbuf_scale_ratio ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * exo_gdk_pixbuf_scale_ratio (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *source</code></em>,
<em class="parameter"><code><span class="type">gint</span> dest_size</code></em>);</pre>
<p>
Scales <em class="parameter"><code>source</code></em> to <em class="parameter"><code>dest_size</code></em> while preserving the aspect ratio of
<em class="parameter"><code>source</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>The source <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_size</code></em> :</span></p></td>
<td>The target size in pixel.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly created <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="exo-gdk-pixbuf-new-from-file-at-max-size"></a><h3>exo_gdk_pixbuf_new_from_file_at_max_size ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * exo_gdk_pixbuf_new_from_file_at_max_size
(<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
<em class="parameter"><code><span class="type">gint</span> max_width</code></em>,
<em class="parameter"><code><span class="type">gint</span> max_height</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> preserve_aspect_ratio</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Creates a new <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> by loading an image from the file at
<em class="parameter"><code>filename</code></em>. The file format is detected automatically. If <code class="literal">NULL</code> is
returned, then <em class="parameter"><code>error</code></em> will be set. Possible errors are in the
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS"><span class="type">GDK_PIXBUF_ERROR</span></a> and <span class="type">G_FILE_ERROR</span> domains. If the image dimensions
exceed <em class="parameter"><code>max_width</code></em> or <em class="parameter"><code>max_height</code></em>, the image will be scaled down to
fit into the dimensions, optionally preservingthe image's aspect
ratio. The image may still be larger, depending on the loader.
</p>
<p>
The advantage of using this function over
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-File-Loading.html#gdk-pixbuf-new-from-file-at-scale"><code class="function">gdk_pixbuf_new_from_file_at_scale()</code></a> is that images will never be
scaled up, whichwould otherwise result in ugly images.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>name of the file to load, in the GLib file
name encoding.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max_width</code></em> :</span></p></td>
<td>the maximum width of the loaded image.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max_height</code></em> :</span></p></td>
<td>the maximum height of the loaded image.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>preserve_aspect_ratio</code></em> :</span></p></td>
<td>
<code class="literal">TRUE</code> to preserve the image's aspect ratio
while scaling to fit into <em class="parameter"><code>max_width</code></em> and <em class="parameter"><code>max_height</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for errors or <code class="literal">NULL</code>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly created <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> with a reference count or 1, or
<code class="literal">NULL</code> if any of several error conditions occurred: the file
could not be opened, there was no loader for the file's format,
there was not enough memory to allocate the buffer for the
image, or the image file contained invalid data.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.3.1.9</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.17</div>
</body>
</html>
|