| 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_colorize (const GdkPixbuf *src, const GdkColor *color); GdkPixbuf* exo_gdk_pixbuf_lucent (const GdkPixbuf *src, guint percent); GdkPixbuf* exo_gdk_pixbuf_spotlight (const GdkPixbuf *src); 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_colorize (const GdkPixbuf *src, const GdkColor *color);
Creates a new GdkPixbuf based on src, which is
colorized to color.
The caller is responsible to free the returned object
using g_object_unref() when no longer needed.
GdkPixbuf* exo_gdk_pixbuf_lucent (const GdkPixbuf *src, guint percent);
Returns a version of src, whose pixels translucency is
percent of the original src pixels.
The caller is responsible to free the returned object
using g_object_unref() when no longer needed.
src : |
the source GdkPixbuf. |
percent : |
the percentage of translucency. |
| Returns : | a translucent version of src.
|
GdkPixbuf* exo_gdk_pixbuf_spotlight (const GdkPixbuf *src);
Creates a lightened version of src, suitable for
prelit state display of icons.
The caller is responsible to free the returned
pixbuf using #g_object_unref().
src : |
the source GdkPixbuf. |
| Returns : | the lightened version of src.
|
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