From 6cb64c5d5911d30458092704f07154553d56a54b Mon Sep 17 00:00:00 2001 From: ellson Date: Fri, 11 Sep 2009 18:16:42 +0000 Subject: [PATCH] don't use cairo_format_stride_for_width() as it was not available until cairo-1.6.4 or so. --- plugin/gd/gvloadimage_gd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/gd/gvloadimage_gd.c b/plugin/gd/gvloadimage_gd.c index caab0afbe..e3ae49916 100644 --- a/plugin/gd/gvloadimage_gd.c +++ b/plugin/gd/gvloadimage_gd.c @@ -141,7 +141,9 @@ static void gd_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean fil if ((im = gd_loadimage(job, us))) { width = im->sx; height = im->sy; - stride = cairo_format_stride_for_width (CAIRO_FORMAT_ARGB32, width); +// cairo_format_stride_for_width() not available prior to cairo-1.6.4 or so (fc9) +//stride = cairo_format_stride_for_width (CAIRO_FORMAT_ARGB32, width); + stride = width*4; data = malloc (stride * height); surface = cairo_image_surface_create_for_data (data, CAIRO_FORMAT_ARGB32, width, height, stride); -- 2.40.0