Just for everyone's information, this has been merged in. The pyglet.sprite.Sprite class now has additional `scale_x` and `scale_y` attributes, which work as you would expect. The existing `scale` attribute is still there, so no existing code will be affected by this addition.
Thanks to DXsmiley for the contribution. On Sunday, January 1, 2017 at 10:04:07 AM UTC+9, Benjamin Moran wrote: > > The idea of changing the existing `scale` property would keep the codebase > simpler, but It might also be a bit strange from an API standpoint. I might > do it this way in my personal codebase, but I'm not sure if this is > considered OK to have it behave like this. > > I like having two separate `scale_x` and `scale_y` properties. It would > mean having a total of three ways to scale, since it would break code for > people if we remove the old `scale` method. It wouldn't really be all that > much extra code, though. > > If we go with option #2 (additional _x and _y properties), how about the > Sprite.update method? Just add two more arguments? > > > > > On Saturday, December 31, 2016 at 8:42:02 PM UTC+9, DXsmiley wrote: >> >> I'm currently implementing a change to Pyglet's Sprite class that would >> allow sprites to be scaled both horizontally and vertically. >> >> I'm currently tossing up between two possible implementations: >> >> - Change the existing `scale` property to be a tuple of 2 floats. >> - Have two separate `scale_x` and `scale_y` properties. >> >> If the scale setter was changed, it would be able to accept a number to >> scale the sprite by the same amount in both directions (as is the current >> behaviour). >> >> The code branch can be found here: >> https://bitbucket.org/dxsmiley/pyglet/branch/sprite-scale >> >> Any thoughts on which method should be used would be appreciated. >> > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscr...@googlegroups.com. To post to this group, send email to pyglet-users@googlegroups.com. Visit this group at https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.