Re: commit: Fix off by 1 pixel bugs.

From: Marc Maurer (j.m.maurer_at_student.utwente.nl)
Date: Wed Nov 12 2003 - 17:27:31 EST

  • Next message: Marc Maurer: "Re: commit: Fix clear selection bug."

    Hi Martin,

    There seem to be some issues with this patch. For example, open a
    document, and use CTRL-MouseWheel too zoom in and out. Note the moving
    of the numbers on the rulers. When zooming in a bit, they even move off
    the ruler..

    Marc

    Op wo 12-11-2003, om 22:49 schreef msevior_at_physics.unimelb.edu.au:
    > CVS: ----------------------------------------------------------------------
    > CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
    > CVS:
    > CVS: Committing in .
    > CVS:
    > CVS: Modified Files:
    > CVS: af/gr/cocoa/gr_CocoaGraphics.mm af/gr/qnx/gr_QNXGraphics.cpp
    > CVS: af/gr/unix/gr_UnixGraphics.cpp af/gr/win/gr_Win32Graphics.cpp
    > CVS: af/gr/xp/gr_Graphics.cpp af/gr/xp/gr_Graphics.h
    > CVS: ----------------------------------------------------------------------
    > Fix off by 1 pixel bugs.
    >
    > Caused by not properly taking the scrolll offset into account. I've fixed
    > this on all platforms but I have only tested on Unix. Please test your own
    > platform. If you're not sure what to do please ask me.
    >
    > Basically the layout assumed a location on the screen was given by
    >
    > (pos - scrollOffset)/scale
    >
    > Whereas the scroll code placed the position on the screen at
    >
    > pos/scale - scrollOffset/scale
    >
    > Giving rise to off by 1 pixel bugs from truncation.
    >
    > I've implemented protected methods in the graphics class _tduX(layout),
    > tduY(layout) _tduR(layout) which correct for this.
    >
    > On unix I now have no pixel dirt and no flicker. At last!
    >
    > Cheers
    >
    > Martin
    >

    -- 
    Marc Maurer <j.m.maurer_at_student.utwente.nl>
    


    This archive was generated by hypermail 2.1.4 : Wed Nov 12 2003 - 17:19:30 EST