0

I am unable to find a way to get round cornered rectangle in cocos2d android.I am writing the code here.

CCSprite  backGround=CCSprite.sprite("settings_bg.jpg");
backGround.setTextureRect(CGRect.make(0, 0, 350*Define.SCALE_X, 350*Define.SCALE_Y), false);
backGround.setColor(ccColor3B.ccc3(60, 60, 60));
backGround.setOpacity(128);
backGround.setPosition(CGPoint.ccp(s.width/2, s.height/2));

Here i am creating the rectangle.But i am not getting a way to get round cornered rectangle.I have searched on internet so much time but unable to find.please help me.

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
Itisme
  • 53
  • 6
  • make the image have round corners, the sprite (most likely) does not provide something like that, after all you're using an image that you can tweak to be whatever you need it to be – CodeSmile Feb 06 '15 at 08:43
  • Thanks for ur reply.Can't i make the round corners programmatically? – Itisme Feb 06 '15 at 10:18

0 Answers0