From d57a0ac8bc9d814ab29a7cbcfddd77b4e33f64f3 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 13 May 2014 17:10:48 +0100 Subject: Add as_image_save_filename() --- libappstream-glib/as-image.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'libappstream-glib/as-image.h') diff --git a/libappstream-glib/as-image.h b/libappstream-glib/as-image.h index 4d82f87..ecca9f3 100644 --- a/libappstream-glib/as-image.h +++ b/libappstream-glib/as-image.h @@ -76,6 +76,20 @@ typedef enum { AS_IMAGE_KIND_LAST } AsImageKind; +/** + * AsImageSaveFlag: + * @AS_IMAGE_SAVE_FLAG_NONE: No special flags set + * @AS_IMAGE_SAVE_FLAG_PAD_16_9: Pad with alpha to 16:9 aspect + * + * The flags used for saving images. + **/ +typedef enum { + AS_IMAGE_SAVE_FLAG_NONE = 0, /* Since: 0.1.6 */ + AS_IMAGE_SAVE_FLAG_PAD_16_9 = 1, /* Since: 0.1.6 */ + /*< private >*/ + AS_IMAGE_SAVE_FLAG_LAST +} AsImageSaveFlags; + GType as_image_get_type (void); AsImage *as_image_new (void); @@ -103,6 +117,14 @@ void as_image_set_kind (AsImage *image, void as_image_set_pixbuf (AsImage *image, GdkPixbuf *pixbuf); +/* object methods */ +gboolean as_image_save_filename (AsImage *image, + const gchar *filename, + guint width, + guint height, + AsImageSaveFlags flags, + GError **error); + G_END_DECLS #endif /* __AS_IMAGE_H */ -- cgit v1.2.1