[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 Sep 28, 2011, at 12:28 AM, Greg Ewing wrote:
> However, this would mean that the return value couldn't
> be a standard Rect in this case, as it would have to

I found it nice how anything that has rect attribute, is a Rect :)

> 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.


"Though Rect can be subclassed, methods that return new rectangles are not subclass aware. That is, move or copy return a new pygame.Rect instance, not an instance of the subclass. This may change. To make subclass awareness work though, subclasses may have to maintain the same constructor signature as Rect."

does that imply something here? is from http://www.pygame.org/docs/ref/rect.html

> Greg