On Mon, Dec 5, 2011 at 2:18 PM, John Goche <johngoch...@googlemail.com> wrote: > > Hello, > > Can someone explain to me how come there is a RectF class that > takes float parameters when the pixel coordinates take integer values? > How can I draw a pixel at location (3.5,8.777) for instance instead of > at location (3,7). Does this just make sense because of antialiasing?
Fractional coordinates are normally used for rendering with sub-pixel accuracy. I'm not as familiar with Canvas because I mostly use GL but I would assume that would be the reason. There are multiple ways of implementing sub-pixel accurate rendering but one common usage would be, if a fractional-coordinates primitive only covers say a quarter of a pixel then that pixel would be filled with the colour of the primitive with alpha of 0.25. In my experience this doesn't often matter much for static renderings but can make your animations look much smoother (depending on context however). -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en