]> www.fi.muni.cz Git - evince.git/commitdiff
Draw only visible region.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Thu, 14 Jun 2007 18:06:46 +0000 (18:06 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Thu, 14 Jun 2007 18:06:46 +0000 (18:06 +0000)
2007-06-14  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-view.c: (draw_one_page):
Draw only visible region.

svn path=/trunk/; revision=2505

ChangeLog
shell/ev-view.c

index 71ff016c78af122a6634f41bc2e84d40a30aae13..72b055b4e8a9d87644497246dd35e7dc38295706 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-14  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-view.c: (draw_one_page):
+
+       Draw only visible region.
+       
 2007-06-13  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * backend/djvu/djvu-document.c: (djvu_document_render):
index ba69b27cb7bda5022d7f39150d36a42eea145707..997d54198de85a65e490237f8e0992877e35a311 100644 (file)
@@ -2931,7 +2931,10 @@ draw_one_page (EvView       *view,
                
                page_width = cairo_image_surface_get_width (page_surface);
                page_height = cairo_image_surface_get_height (page_surface);
-
+               
+               cairo_rectangle (cr, overlap.x, overlap.y, overlap.width, overlap.height);
+               cairo_clip (cr);
+               
                cairo_translate (cr, overlap.x, overlap.y);
                
                if (width != page_width || height != page_height) {
@@ -2969,6 +2972,9 @@ draw_one_page (EvView       *view,
                selection_width = cairo_image_surface_get_width (selection_surface);
                selection_height = cairo_image_surface_get_height (selection_surface);
 
+               cairo_rectangle (cr, overlap.x, overlap.y, overlap.width, overlap.height);
+               cairo_clip (cr);
+               
                cairo_translate (cr, overlap.x, overlap.y);
 
                if (width != selection_width || height != selection_height) {