diff options
-rw-r--r-- | docs/reference/ChangeLog | 5 | ||||
-rw-r--r-- | docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt | 1 | ||||
-rw-r--r-- | gdk-pixbuf/ChangeLog | 9 | ||||
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-io.c | 21 | ||||
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-io.h | 1 | ||||
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf.h | 1 |
6 files changed, 38 insertions, 0 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index f317a9ec2..94e881e7f 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +Wed May 5 23:12:36 2004 Matthias Clasen <maclas@gmx.de> + + * gdk-pixbuf/gdk-pixbuf-sections.txt: Add + gdk_pixbuf_format_is_scalable(). + 2004-05-05 Matthias Clasen <mclasen@redhat.com> * gtk/gtk-docs.sgml: diff --git a/docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt b/docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt index cd30806ec..690aa7f09 100644 --- a/docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt +++ b/docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt @@ -186,6 +186,7 @@ gdk_pixbuf_format_get_description gdk_pixbuf_format_get_mime_types gdk_pixbuf_format_get_extensions gdk_pixbuf_format_is_writable +gdk_pixbuf_format_is_scalable GdkPixbufFormat GdkPixbufFormatFlags GdkPixbufModulePattern diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index b68243ef1..d27e7dee8 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,12 @@ +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) + 2004-04-30 Matthias Clasen <mclasen@redhat.com> * === Released 2.4.1 === diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index 37fba20df..b43a75eec 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) { diff --git a/gdk-pixbuf/gdk-pixbuf-io.h b/gdk-pixbuf/gdk-pixbuf-io.h index b4fadce99..8c227496a 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.h +++ b/gdk-pixbuf/gdk-pixbuf-io.h @@ -124,6 +124,7 @@ gboolean gdk_pixbuf_set_option (GdkPixbuf *pixbuf, typedef enum /*< skip >*/ { GDK_PIXBUF_FORMAT_WRITABLE = 1 << 0, + GDK_PIXBUF_FORMAT_SCALABLE = 1 << 1 } GdkPixbufFormatFlags; struct _GdkPixbufFormat { diff --git a/gdk-pixbuf/gdk-pixbuf.h b/gdk-pixbuf/gdk-pixbuf.h index a4054cc07..6edff8bca 100644 --- a/gdk-pixbuf/gdk-pixbuf.h +++ b/gdk-pixbuf/gdk-pixbuf.h @@ -340,6 +340,7 @@ gchar *gdk_pixbuf_format_get_description (GdkPixbufFormat *format); gchar **gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format); gchar **gdk_pixbuf_format_get_extensions (GdkPixbufFormat *format); gboolean gdk_pixbuf_format_is_writable (GdkPixbufFormat *format); +gboolean gdk_pixbuf_format_is_scalable (GdkPixbufFormat *format); GdkPixbufFormat *gdk_pixbuf_get_file_info (const gchar *filename, gint *width, |