[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?



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.

--
Greg