From: Ben Pfaff Date: Wed, 23 Mar 2011 05:10:49 +0000 (-0700) Subject: cairo: Correctly render table during scrolling. X-Git-Tag: v0.7.7~1 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=f6ef1f7d246330feda72eaeb331fdf94a3940dad;p=pspp-builds.git cairo: Correctly render table during scrolling. Commit 845d4b4f3f (cairo: Draw table titles in xr_rendering_draw() too) started rendering table titles in the GUI but forgot to compensate for this in the call to render_page_draw_region(), so scrolling caused visible damage. Bug #31569. Reported-by: John Darrington --- diff --git a/src/output/cairo.c b/src/output/cairo.c index 866be03f..8602e779 100644 --- a/src/output/cairo.c +++ b/src/output/cairo.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -998,8 +998,8 @@ xr_rendering_draw (struct xr_rendering *r, cairo_t *cr, } xr->y = r->title_height; - render_page_draw_region (r->page, - x * 1024, y * 1024, w * 1024, h * 1024); + render_page_draw_region (r->page, x * 1024, (y * 1024) - r->title_height, + w * 1024, h * 1024); } else xr_draw_chart (to_chart_item (r->item), cr,