GNOME Bugzilla – Bug 493808
Zoomed-out canvas repaints incorrectly
Last modified: 2007-11-05 17:54:21 UTC
My recent patch to remove tearing when repainting introduced a bug. If the canvas is zoomed out (i.e. with zoom factor less than 1.0) and if the zoom_xofs/zoom_yofs are greater than 0 (like when scrolling past the scroll region), then the repaint offsets will be incorrect. The attached patch fixes this. This is easy to reproduce in xournal: 1. Start xournal. 2. View/Zoom/Zoom out. 3. Paint something with the mouse. Nothing will be painted on the screen, or it will be painted with gaps/delays. See http://sourceforge.net/tracker/index.php?func=detail&aid=1813208&group_id=163434&atid=827733 for this same bug.
This is also https://bugzilla.novell.com/show_bug.cgi?id=336941
Created attachment 98579 [details] [review] libgnomecanvas-493808-repaint-when-zoomed-out.diff This is already committed to svn trunk. 2007-11-05 Federico Mena Quintero <federico@novell.com> Fix these bugs: http://bugzilla.gnome.org/show_bug.cgi?id=493808 https://bugzilla.novell.com/show_bug.cgi?id=336941 * libgnomecanvas/gnome-canvas.c (paint): Oops, use the correct visible rectangle; we forgot to take the zoom_{x,y}ofs into account. Also, take those offsets into account when generating the actual rectangle to be added to the GdkRegion.