Size of sprite

Size of sprite
0.0 0



How can I change size of sprite? For example my sprite size is 100x100px and i would like to deform it to the 150x100px [equals to the ScaleX(1.5f), ScaleY(1.f)]. When I use setTextureRectInPixels it changes contentsize but sprite’s quad still has original size of texture (isn’t that bug ??).

I know that i can use scale, but i am using ScaleBy quiet lot and that will results in variation on modified and original textures. (Does it make sense?)

Also I can manually change quad, but i am afraid that it will be lost after updateTransform call.


  1. How can i make sprite with different size than size of original texture (texture will look like scaled by scale is 1.0f, 1.0f)?
  2. How can i make sprite which will have different size than texture and it will repeat texture in itself as pattern? (uv textures)?


Maybe I am totally wrong, but when i change

void CCSprite::setTextureRectInPixels(CCRect rect, bool rotated, CCSize size)

line 419/420 to the
float x2 = x1 + size.width;
float y2 = y1 + size.height;

it behaves exactly like i am proposing in my first question.