Re: Why floating point for widget positions
- From: Olexiy Avramchenko <olexiy ctech cn ua>
- To: Michael Natterer <mitch gimp org>
- Cc: gtk-list gnome org, Mike Emmel <mike emmel gmail com>
- Subject: Re: Why floating point for widget positions
- Date: Wed, 23 Mar 2005 13:53:25 +0200
Michael Natterer wrote:
Because extended input devices produce coordinates
at sub-pixel positions.
Aha, interesting... Now, after I've read [1] and looked into the source, I see
that GDK can translate XInput events to GDK_MOTION_NOTIFY events with
coordinates that have a fractional part.
Can you provide an example of how floating point x,y coordinates from motion
event can be used? Mike is right - every GTK widget uses type casting from
double to int for them and this looks natural for the discrete displays.
[1] http://developer.gnome.org/doc/API/2.0/gdk/gdk-Input-Devices.html
Olexiy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]