diff options
author | Matthias Clasen <maclas@gmx.de> | 2004-05-06 03:14:07 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-05-06 03:14:07 +0000 |
commit | 583db0f125735b3ed1e4d874ce62b3e4cdedcef2 (patch) | |
tree | 6ce9e7810935e2eb04203211f495fcea7ab66dac /gdk-pixbuf/gdk-pixbuf-io.c | |
parent | 5502f77eafdc207046d3cd14a47135f94ded827a (diff) | |
download | gtk+-583db0f125735b3ed1e4d874ce62b3e4cdedcef2.tar.gz |
New format flag GDK_PIXBUF_FORMAT_SCALABLE to mark scalable formats.
Wed May 5 23:09:48 2004 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf-io.h (GdkPixbufFormatFlags): New format flag
GDK_PIXBUF_FORMAT_SCALABLE to mark scalable formats.
* gdk-pixbuf.h:
* gdk-pixbuf-io.c (gdk_pixbuf_format_is_scalable): New function.
(#137995, Dom Lachowicz)
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-io.c')
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-io.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index 37fba20df3..b43a75eec5 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -1783,6 +1783,27 @@ gdk_pixbuf_format_is_writable (GdkPixbufFormat *format) return (format->flags & GDK_PIXBUF_FORMAT_WRITABLE) != 0; } +/** + * gdk_pixbuf_format_is_scalable: + * @format: a #GdkPixbufFormat + * + * Returns whether this image format is scalable. If a file is in a + * scalable format, it is preferable to load it at the desired size, + * rather than loading it at the default size and scaling the + * resulting pixbuf to the desired size. + * + * Return value: whether this image format is scalable. + * + * Since: 2.6 + */ +gboolean +gdk_pixbuf_format_is_scalable (GdkPixbufFormat *format) +{ + g_return_val_if_fail (format != NULL, FALSE); + + return (format->flags & GDK_PIXBUF_FORMAT_SCALABLE) != 0; +} + GdkPixbufFormat * _gdk_pixbuf_get_format (GdkPixbufModule *module) { |