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

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



Hi Greg,
 
Would you be interested in adding a feature request for a float based rect class in the issue tracker? Besides the topic of this thread, what are some other use cases?
 
Lenard Lindstrom
 
On Sep 27, 2011, Greg Ewing <greg.ewing@xxxxxxxxxxxxxxxx> wrote:
Mac Ryan wrote:

> ...because the *INPUT* destination is "mapped" on s1, and the blit
> method should return its *OUTPUT* in unmapped measures [pixels].

Actually that's something to be debated -- *should* it
return post-scaling or pre-scaling coordinates? A case
could be made for the latter, since the code using the
scaled surface is doing all its other calculations in
those coordinates, and having to manually transform
back would be a nuisance.

However, this would mean that the return value couldn't
be a standard Rect in this case, as it would have to
contain floats. This suggests adding a new float-based
rect class, which would be a useful thing to have
anyway for passing into the drawing operations.