[draw] Fix compilation errors with Imlib2
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
60b9a9d2dc
commit
c468d83059
|
@ -22,9 +22,11 @@
|
||||||
/* asprintf */
|
/* asprintf */
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <cairo-xcb.h>
|
#include <cairo-xcb.h>
|
||||||
|
|
||||||
#ifdef HAVE_IMLIB2
|
#ifdef WITH_IMLIB2
|
||||||
#include <Imlib2.h>
|
#include <Imlib2.h>
|
||||||
#else
|
#else
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
@ -673,7 +675,8 @@ draw_circle(draw_context_t *ctx, int x, int y, int r, bool filled, xcolor_t colo
|
||||||
* \param wanted_h wanted height: if > 0, image will be resized
|
* \param wanted_h wanted height: if > 0, image will be resized
|
||||||
* \param data the image pixels array
|
* \param data the image pixels array
|
||||||
*/
|
*/
|
||||||
void draw_image_from_argb_data(draw_context_t *ctx, int x, int y, int w, int h,
|
void
|
||||||
|
draw_image_from_argb_data(draw_context_t *ctx, int x, int y, int w, int h,
|
||||||
int wanted_h, unsigned char *data)
|
int wanted_h, unsigned char *data)
|
||||||
{
|
{
|
||||||
double ratio;
|
double ratio;
|
||||||
|
@ -702,7 +705,7 @@ void draw_image_from_argb_data(draw_context_t *ctx, int x, int y, int w, int h,
|
||||||
cairo_surface_destroy(source);
|
cairo_surface_destroy(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_IMLIB2
|
#ifndef WITH_IMLIB2
|
||||||
|
|
||||||
/** Draw an image (PNG format only) from a file to a draw context
|
/** Draw an image (PNG format only) from a file to a draw context
|
||||||
* \param ctx Draw context to draw to
|
* \param ctx Draw context to draw to
|
||||||
|
@ -765,7 +768,7 @@ draw_get_image_size(const char *filename)
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* HAVE_IMLIB2 */
|
#else /* WITH_IMLIB2 */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
draw_imlib_load_strerror(Imlib_Load_Error e)
|
draw_imlib_load_strerror(Imlib_Load_Error e)
|
||||||
|
@ -878,7 +881,7 @@ draw_get_image_size(const char *filename)
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_IMLIB2 */
|
#endif /* WITH_IMLIB2 */
|
||||||
|
|
||||||
/** Rotate a drawable
|
/** Rotate a drawable
|
||||||
* \param ctx Draw context to draw to
|
* \param ctx Draw context to draw to
|
||||||
|
|
Loading…
Reference in New Issue