Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2007-06-14 18:06:46 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2007-06-14 18:06:46 (GMT)
commit489459b17b659b9c51f62e12fd9ee730e85a1bfd (patch)
treee880329077b44360fec46e868cd2ac01b991bf42
parent580b9668800e31ad8fe023b01f257635328c7807 (diff)
Draw only visible region.
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
-rw-r--r--ChangeLog6
-rw-r--r--shell/ev-view.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 71ff016..72b055b 100644
--- 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):
diff --git a/shell/ev-view.c b/shell/ev-view.c
index ba69b27..997d541 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -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) {