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

2011-09-25 Thread Greg Ewing
René Dudfield wrote: I still think a transforming Rect subclass would work best, like your 'sc' function. Otherwise you'd need global state, The state wouldn't be global, it would be an attribute of the surface, like the clipping rect is now. If you don't want to pollute the state of your mai

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

2011-09-25 Thread René Dudfield
On Sun, Sep 25, 2011 at 11:57 AM, Mac Ryan wrote: > On Sun, 25 Sep 2011 14:18:25 +1300 > Greg Ewing wrote: > > > Mac Ryan wrote: > > > > > The behaviour that I envisage would be an > > > optional keyword argument ``scale=1.0`` for rectangles (and > > > surfaces). > > > > I would say the transfor

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

2011-09-25 Thread Mac Ryan
On Sun, 25 Sep 2011 14:18:25 +1300 Greg Ewing wrote: > Mac Ryan wrote: > > > The behaviour that I envisage would be an > > optional keyword argument ``scale=1.0`` for rectangles (and > > surfaces). > > I would say the transformation should be an attribute of the > surface, not something that

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

2011-09-25 Thread René Dudfield
Could you create a transform rect like function that returns the transformed state? >>> t(20, 20, 20, 20) (1,1,1,1) >>> t(20, 20) (1,1) pygame.draw.line(s, t(20,20)) I don't know about adding that into every pygame function... that sounds like too much work.

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

2011-09-24 Thread Greg Ewing
Mac Ryan wrote: The behaviour that I envisage would be an optional keyword argument ``scale=1.0`` for rectangles (and surfaces). I would say the transformation should be an attribute of the surface, not something that you pass into drawing calls. Also it should allow for both scaling and trans