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

Re: [pygame] Native PyGame method for automatically scaling inputs to a surface resolution?

On Wed, Sep 28, 2011 at 6:26 PM, Greg Ewing <greg.ewing@xxxxxxxxxxxxxxxx> wrote:
Lenard Lindstrom wrote:

Would you be interested in adding a feature request for a float based rect class in the issue tracker?

What *would* be useful right now is if the drawing functions would
accept tuples of floats and round (not truncate!) them to ints.

I've been thinking about this, and even though in the past I've rounded to int when passing coordinates to drawing functions, I actually think the correct behavior is to truncate. This makes sense if you consider the pixel "at" (0,0) to actually occupy a 1x1 rectangle, extending from (0,0) to (1,1). So the point (0.7, 0.7) should actually be considered to be within the pixel at (0,0).

Distances, on the other hand, such as the radius of circles, should be rounded.

Just my opinion.