[evince] djvu: Use initial rotation to render page
- From: Jose Aliste <jaliste src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] djvu: Use initial rotation to render page
- Date: Mon, 11 Feb 2013 10:49:39 +0000 (UTC)
commit b766db567b51585cb86a8d0d289c0b8c4a3c4cea
Author: Josà Aliste <jaliste src gnome org>
Date: Sun Feb 3 19:15:00 2013 +0100
djvu: Use initial rotation to render page
See https://bugzilla.gnome.org/show_bug.cgi?id=667266
backend/djvu/djvu-document.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/backend/djvu/djvu-document.c b/backend/djvu/djvu-document.c
index 7bb655c..9c1b135 100644
--- a/backend/djvu/djvu-document.c
+++ b/backend/djvu/djvu-document.c
@@ -331,32 +331,34 @@ djvu_document_render (EvDocument *document,
djvu_handle_events(djvu_document, TRUE, NULL);
document_get_page_size (djvu_document, rc->page->index, &page_width, &page_height, NULL);
+ rotation = ddjvu_page_get_initial_rotation (d_page);
page_width = page_width * rc->scale + 0.5;
page_height = page_height * rc->scale + 0.5;
switch (rc->rotation) {
case 90:
- rotation = DDJVU_ROTATE_90;
+ rotation += DDJVU_ROTATE_90;
tmp = page_height;
page_height = page_width;
page_width = tmp;
break;
case 180:
- rotation = DDJVU_ROTATE_180;
+ rotation += DDJVU_ROTATE_180;
break;
case 270:
- rotation = DDJVU_ROTATE_270;
+ rotation += DDJVU_ROTATE_270;
tmp = page_height;
page_height = page_width;
page_width = tmp;
break;
default:
- rotation = DDJVU_ROTATE_0;
+ rotation += DDJVU_ROTATE_0;
}
+ rotation = rotation % 4;
surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
page_width, page_height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]