Add a workaround for cairo < 1.5

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-03-24 10:47:57 +01:00
parent 8b411eb15d
commit 60e36aee54
1 changed files with 4 additions and 0 deletions

View File

@ -579,7 +579,11 @@ void draw_image_from_argb_data(DrawCtx *ctx, int x, int y, int w, int h,
cairo_surface_t *source;
source = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32, w, h,
#if CAIRO_VERSION_MAJOR < 1 || (CAIRO_VERSION_MAJOR == 1 && CAIRO_VERSION_MINOR < 5)
sizeof(unsigned char) * 4 * w);
#else
cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, w));
#endif
cr = cairo_create(ctx->surface);
if(wanted_h > 0 && h > 0)
{