]> granicus.if.org Git - graphviz/commitdiff
don't use cairo_format_stride_for_width()
authorellson <devnull@localhost>
Fri, 11 Sep 2009 18:16:42 +0000 (18:16 +0000)
committerellson <devnull@localhost>
Fri, 11 Sep 2009 18:16:42 +0000 (18:16 +0000)
   as it was not available until cairo-1.6.4 or so.

plugin/gd/gvloadimage_gd.c

index caab0afbea7f67a84bd97f4d87e29cdf79001d0e..e3ae49916726331f2cce467e610683afa5714dd4 100644 (file)
@@ -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);