ios - CCRenderTexture anchorPoint or what? -
i need ccrendertexture (white rect) render sprite here (1st picture), render @ lower-left corner (2nd picture). how can change value?
rendertextrure.position = ccp(p.x, p.y);
rendertexture.sprite.position = ccp(p.x, p.y);
rendertexture.sprite.anchorpoint = ccp(0.5, 0.5);
edit
ccrendertexture initial position
ccrendertexture size , position in cocos2d-iphone
i found these answers, didn't help. possible change position or not?
check if helps you. note uiimage optional incase want use uiimage.
ccrendertexture *renderer = [ccrendertexture rendertexturewithwidth:tx height:ty pixelformat:kcctexture2dpixelformat_rgba8888 depthstencilformat:gl_depth24_stencil8]; [renderer beginwithclear:0 g:0 b:0 a:0 depth:1.0f]; [1st_pic_sprite visit]; [renderer end]; uiimage *img = [renderer getuiimage];
Comments
Post a Comment