Re: Why floating point for widget positions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux