Add a workaround for cairo < 1.5
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
8b411eb15d
commit
60e36aee54
|
@ -579,7 +579,11 @@ void draw_image_from_argb_data(DrawCtx *ctx, int x, int y, int w, int h,
|
||||||
cairo_surface_t *source;
|
cairo_surface_t *source;
|
||||||
|
|
||||||
source = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32, w, h,
|
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));
|
cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, w));
|
||||||
|
#endif
|
||||||
cr = cairo_create(ctx->surface);
|
cr = cairo_create(ctx->surface);
|
||||||
if(wanted_h > 0 && h > 0)
|
if(wanted_h > 0 && h > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue