]> www.fi.muni.cz Git - evince.git/blobdiff - backend/tiff/tiff-document.c
Update Vietnamese translation
[evince.git] / backend / tiff / tiff-document.c
index d8bee9e529c0654d105011669dee450f59cf64c9..146e45539e78b3eec6c65749844c6e54b5d592a7 100644 (file)
@@ -59,10 +59,10 @@ static void tiff_document_document_file_exporter_iface_init (EvFileExporterIface
 
 EV_BACKEND_REGISTER_WITH_CODE (TiffDocument, tiff_document,
                         {
-                          G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
-                                                 tiff_document_document_thumbnails_iface_init);
-                          G_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
-                                                 tiff_document_document_file_exporter_iface_init);
+                          EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
+                                                          tiff_document_document_thumbnails_iface_init);
+                          EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
+                                                          tiff_document_document_file_exporter_iface_init);
                         });
 
 static TIFFErrorHandler orig_error_handler = NULL;
@@ -246,11 +246,15 @@ tiff_document_render (EvDocument      *document,
        if (width <= 0 || height <= 0)
                return NULL;                
 
+#ifdef HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH
+       rowstride = cairo_format_stride_for_width (CAIRO_FORMAT_RGB24, width);
+#else
        rowstride = width * 4;
        if (rowstride / 4 != width)
                /* overflow */
                return NULL;                
-        
+#endif
+       
        bytes = height * rowstride;
        if (bytes / rowstride != height)
                /* overflow */