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)
This commit is contained in:
Matthias Clasen 2004-05-06 03:14:07 +00:00 committed by Matthias Clasen
parent 5502f77eaf
commit 583db0f125
6 changed files with 38 additions and 0 deletions

View File

@ -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:

View File

@ -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

View File

@ -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 ===

View File

@ -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)
{

View File

@ -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 {

View File

@ -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,