Plans [was: Re: Gconf or GSettings? - leading to a wider question]

Linus Torvalds torvalds at linux-foundation.org
Tue Jan 22 21:53:04 PST 2013


On Tue, Jan 22, 2013 at 9:06 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> Well, sort of. If you keep the mouse still and zoom out a few steps and
> back in and out and in the position drifts. So there still is some error
> in the math.

I don't think you can avoid that entirely. The pixel-based approach
may make it worse, since it ends up quanitizing the error by pixels.

My binary-search-one also drifts a bit, although I haven't compared
the two. But with the binary search, at least you only have one single
source of error (the "get location from the pixel under the mouse"),
and it very naturally keeps that error from becoming bigger (ie the
positioning of the zoomed-in/out thing is not limited to pixel
accuracy, since it actually modifies the center point that is given as
floats).

The analytic one has three points of possible pixel error - the corner
points in addition to the mouse point - and the target position
calculation is fundamentally limited by pixel size. It might make the
error bigger.

                  Linus


More information about the subsurface mailing list