]> www.fi.muni.cz Git - evince.git/blobdiff - backend/djvu/djvu-document.c
Updated Occitan translation
[evince.git] / backend / djvu / djvu-document.c
index e16ec6ab78f1694ecbb5ecd20f84b28bf1ace48d..6e1c5f3c378287d4eb9524acb4d6a9643f0e9c16 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "config.h"
 
 
 #include "config.h"
 
+#include <config.h>
 #include "djvu-document.h"
 #include "djvu-text.h"
 #include "djvu-links.h"
 #include "djvu-document.h"
 #include "djvu-text.h"
 #include "djvu-links.h"
@@ -260,8 +261,11 @@ djvu_document_render (EvDocument      *document,
                default:
                        rotation = DDJVU_ROTATE_0;
        }
                default:
                        rotation = DDJVU_ROTATE_0;
        }
-
+#ifdef HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH
+       rowstride = cairo_format_stride_for_width (CAIRO_FORMAT_RGB24, page_width);
+#else
        rowstride = page_width * 4;
        rowstride = page_width * 4;
+#endif
        pixels = (gchar *) g_malloc (page_height * rowstride);
        surface = cairo_image_surface_create_for_data ((guchar *)pixels,
                                                       CAIRO_FORMAT_RGB24,
        pixels = (gchar *) g_malloc (page_height * rowstride);
        surface = cairo_image_surface_create_for_data ((guchar *)pixels,
                                                       CAIRO_FORMAT_RGB24,