After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 493808 - Zoomed-out canvas repaints incorrectly
Zoomed-out canvas repaints incorrectly
Status: RESOLVED FIXED
Product: libgnomecanvas
Classification: Deprecated
Component: core
unspecified
Other All
: Normal normal
: ---
Assigned To: Federico Mena Quintero
libgnomecanvas maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-05 17:47 UTC by Federico Mena Quintero
Modified: 2007-11-05 17:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
libgnomecanvas-493808-repaint-when-zoomed-out.diff (1.93 KB, patch)
2007-11-05 17:53 UTC, Federico Mena Quintero
committed Details | Review

Description Federico Mena Quintero 2007-11-05 17:47:36 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.
Comment 1 Federico Mena Quintero 2007-11-05 17:50:43 UTC
This is also https://bugzilla.novell.com/show_bug.cgi?id=336941
Comment 2 Federico Mena Quintero 2007-11-05 17:53:51 UTC
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.