Re: Why floating point for widget positions

In Gimp it is used for paintbrush drawing with subpixel positioning
of the brush. The actual gray levels created are interpolated according
to the gray levels of the paintbrush matrix and the subpixel location.
(At least I guess that is how Gimp works. If not, then it is a waste
of sub-pixel information, and we should file a bug. ;-)


On Wed, Mar 23, 2005 at 01:53:25PM +0200, Olexiy Avramchenko wrote:
> 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]
> 	Olexiy
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org

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