[poppler] poppler/glib: poppler-page.cc,1.49,1.50

Kristian Høgsberg krh at kemper.freedesktop.org
Fri May 19 14:42:56 PDT 2006


Update of /cvs/poppler/poppler/glib
In directory kemper:/tmp/cvs-serv20757/glib

Modified Files:
	poppler-page.cc 
Log Message:
2006-05-19  Kristian Høgsberg  <krh at redhat.com>

	* glib/poppler-page.cc (poppler_page_prepare_output_dev): Fix the
	rotation bug for real.


Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/glib/poppler-page.cc,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- poppler-page.cc	19 May 2006 20:35:43 -0000	1.49
+++ poppler-page.cc	19 May 2006 21:42:54 -0000	1.50
@@ -140,15 +140,17 @@
   CairoOutputDev *output_dev;
   cairo_surface_t *surface;
   double width, height;
-  int cairo_width, cairo_height, cairo_rowstride;
+  int cairo_width, cairo_height, cairo_rowstride, rotate;
   unsigned char *cairo_data;
-  int rotate;
 
-  rotate = (rotation + page->page->getRotate()) % 360;
-  if (rotate == 90 || rotate == 270)
-      poppler_page_get_size (page, &height, &width);
-  else
-      poppler_page_get_size (page, &width, &height);
+  rotate = rotation + page->page->getRotate ();
+  if (rotate == 90 || rotate == 270) {
+    height = page->page->getCropWidth ();
+    width = page->page->getCropHeight ();
+  } else {
+    width = page->page->getCropWidth ();
+    height = page->page->getCropHeight ();
+  }
 
   cairo_width = (int) ceil(width * scale);
   cairo_height = (int) ceil(height * scale);



More information about the poppler mailing list