From 114a97ee87627f727b80de4590e2329449df21ec Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 17 Jun 2008 09:26:30 +0200 Subject: [PATCH] draw: remove useless draw_get_image_size() Signed-off-by: Julien Danjou --- common/draw.c | 21 --------------------- common/draw.h | 1 - 2 files changed, 22 deletions(-) diff --git a/common/draw.c b/common/draw.c index 535b4e14..ed74020f 100644 --- a/common/draw.c +++ b/common/draw.c @@ -789,27 +789,6 @@ draw_image(draw_context_t *ctx, int x, int y, int wanted_h, draw_image_t *image) cairo_destroy(cr); } -/** get an image size - * \param filename file name - * \return area_t structure with width and height set to image size - */ -area_t -draw_get_image_size(const char *filename) -{ - area_t size = { -1, -1, -1, -1, NULL, NULL }; - gint width, height; - - if(gdk_pixbuf_get_file_info(filename, &width, &height)) - { - size.width = width; - size.height = height; - } - else - warn("cannot load image %s: %s", filename, "format unrecognized"); - - return size; -} - #else /* WITH_IMLIB2 */ static const char * diff --git a/common/draw.h b/common/draw.h index 55f873d5..865ab7b9 100644 --- a/common/draw.h +++ b/common/draw.h @@ -166,7 +166,6 @@ draw_image_t *draw_image_new(const char *); void draw_image_delete(draw_image_t **); void draw_image(draw_context_t *, int, int, int, draw_image_t *); void draw_image_from_argb_data(draw_context_t *, int, int, int, int, int, unsigned char *); -area_t draw_get_image_size(const char *filename); void draw_rotate(draw_context_t *, xcb_drawable_t, xcb_drawable_t, int, int, int, int, double, int, int); area_t draw_text_extents(xcb_connection_t *, int, font_t *, const char *); alignment_t draw_align_get_from_str(const char *);