On Fri, May 24, 2013 at 6:37 PM, Gerardo Marset <[email protected]>wrote:
> Is there a way to change the verical and horizontal scaling of a sprite > (or node or whatever) independently of each other? Not a direct one. > Really I just want to mirror a sprite. I know I can do that by passing > flip_x as True when loading the sprite but that seems like a lot of work to > do something so simple. If flip_x is enough for your needs, then it is the best option: you pay a bit of overhead at loading time and nothing at each render time. > You can change a Sprite's rotation, alpha and color but not its vertical > and horizontal scaling independently? Why is that? > It is an operation rarely needed. The additional parameter would need to be used in cocos.sprite.Sprite._update_position, and as a result that method would be a little slower for *any* sprite, not only the ones with scale_x != scale_y cocos (or pyglet) sprites are slow in terms of openGL performance So, there is a tradeof : make easy a rarely required feature versus make the general case slower. So far the feature was not seen as justifying the cost. -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cocos-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
