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

Kristian Høgsberg krh at kemper.freedesktop.org
Fri May 19 13:35:45 PDT 2006


Update of /cvs/poppler/poppler/glib
In directory kemper:/tmp/cvs-serv6344/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
	rotation bug (#6913, #6926).


Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/glib/poppler-page.cc,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- poppler-page.cc	19 May 2006 19:21:59 -0000	1.48
+++ poppler-page.cc	19 May 2006 20:35:43 -0000	1.49
@@ -142,8 +142,14 @@
   double width, height;
   int cairo_width, cairo_height, cairo_rowstride;
   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);
 
-  poppler_page_get_size (page, &width, &height);
   cairo_width = (int) ceil(width * scale);
   cairo_height = (int) ceil(height * scale);
 
@@ -316,6 +322,10 @@
 /**
  * poppler_page_render:
  * @page: the page to render from
+ * @src_x: x coordinate of upper left corner  
+ * @src_y: y coordinate of upper left corner  
+ * @src_width: width of rectangle to render  
+ * @src_height: height of rectangle to render
  * @scale: scale specified as pixels per point
  * @rotation: rotate the document by the specified degree
  * @pixbuf: pixbuf to render into



More information about the poppler mailing list