Hi all!!!
I'm using cocos2d 0.85 and I just need to stretch a sprite vertically: I need that the final Sprite becomes of a fixed height (e.g. 200px).
Starting from a known Sprite, I do this:
mySprite = [Sprite spriteWithFile:@"foo.png"];
[mySprite setScaleY:200/[mySprite contentSize].height];
But stretching the sprite in that way makes a final image of ~200px, not always precise.
Because of my need is to compose a sprite by adding a top, a bottom and a "middle stretched" image, the final result is a sprite that doesn't matchperfectly.
Is there a way to stretch a sprite to a precise number of pixels rather than using a scale factor?