From b57a2d3da077bfba4b5b3154afd90019b5833778 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Fri, 24 Jun 2016 18:24:23 +0200 Subject: Fix rotated tiff documents This allows tiff documents with different XRESOLUTION and YRESOLUTION to rotate correctly. taken from: https://git.gnome.org/browse/evince/commit/?id=67700e0 --- libdocument/ev-document-misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libdocument') diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c index a0ba4785..01573601 100644 --- a/libdocument/ev-document-misc.c +++ b/libdocument/ev-document-misc.c @@ -330,6 +330,7 @@ ev_document_misc_surface_rotate_and_scale (cairo_surface_t *surface, default: cairo_translate (cr, 0, 0); } + cairo_rotate (cr, dest_rotation * G_PI / 180.0); if (dest_width != width || dest_height != height) { cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_BILINEAR); @@ -338,7 +339,6 @@ ev_document_misc_surface_rotate_and_scale (cairo_surface_t *surface, (gdouble)dest_height / height); } - cairo_rotate (cr, dest_rotation * G_PI / 180.0); cairo_set_source_surface (cr, surface, 0, 0); cairo_paint (cr); cairo_destroy (cr); -- cgit v1.2.1