From: ellson Date: Fri, 11 Sep 2009 18:16:42 +0000 (+0000) Subject: don't use cairo_format_stride_for_width() X-Git-Tag: LAST_LIBGRAPH~32^2~1712 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6cb64c5d5911d30458092704f07154553d56a54b;p=graphviz don't use cairo_format_stride_for_width() as it was not available until cairo-1.6.4 or so. --- 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);