![]() |
![]() |
![]() |
exo Reference Manual | ![]() |
---|
Extensions to gdk-pixbufExtensions to gdk-pixbuf — Miscelleanous extensions to the gdk-pixbuf library |
#include <exo/exo.h> GdkPixbuf* exo_gdk_pixbuf_scale_down (GdkPixbuf *source, gboolean aspect_ratio, gint dest_width, gint dest_height); GdkPixbuf* exo_gdk_pixbuf_scale_ratio (GdkPixbuf *source, gint dest_size);
This facility includes several functions to extend the basic functionality provided by the gdk-pixbuf library.
GdkPixbuf* exo_gdk_pixbuf_scale_down (GdkPixbuf *source, gboolean aspect_ratio, gint dest_width, gint dest_height);
Scales down the source
to fit into the given width
and
height
. If aspect_ratio
is TRUE
then the aspect ratio
of source
will be preserved.
If width
is larger than the width of source
and height
is larger than the height of source
, a reference to
source
will be returned, as it's unneccesary then to
scale down.
The caller is responsible to free the returned GdkPixbuf
using g_object_unref()
when no longer needed.
source : |
the source GdkPixbuf. |
aspect_ratio : |
TRUE to preserve aspect ratio.
|
dest_width : |
the max width for the result. |
dest_height : |
the max height for the result. |
Returns : | the resulting GdkPixbuf. |
Since 0.3.1.1
<< Part IV. Extensions to existing frameworks | Extensions to GObject >> |