Is there any method to stretch the Sprite ?

Hi!
I wonder, how to stretch the sprite to the size I need. For example, I have a picture of size (200, 150). I need to draw this picture at the screen of size(100, 100). What can I do ? Why can’t I simply set a new size to the Sprite? At first, I thought that it’s setContentSize function, but it isn’t.

P.S. ScaleX, ScaleY - is inconvenient for me.

Thanks in advance!

Hi,

ScaleX and ScaleY is the only way. I had to use them for the similar purpose as you mentioned.

sprite~~>setScaleX;
sprite~~>setScaleY(100 / 150);

It’s one line longer then say sprite->scaleToRect(rect).

I see.
Thank you!