【发布时间】:2012-02-29 20:04:22
【问题描述】:
在我的 UIkit 应用程序中,我使用了以下代码:
boxPath = CGPathCreateMutable();
CGPathMoveToPoint(boxPath, nil, center.x , center.y - 35);
CGPathAddArcToPoint(boxPath, nil, center.x + 35, center.y - 35, center.x + 35, center.y + 35, 4.7);
CGPathAddArcToPoint(boxPath, nil, center.x + 35, center.y + 35, center.x - 35, center.y + 35, 4.7);
CGPathAddArcToPoint(boxPath, nil, center.x - 35, center.y + 35, center.x - 35, center.y, 4.7);
CGPathAddArcToPoint(boxPath, nil, center.x - 35, center.y - 35, center.x, center.y - 35, 4.7);
CGPathCloseSubpath(boxPath);
创建一个形状,因此我有一个具有我绘制的精确形状的图层。请问如何在 cocos2D 中做同样的事情?谢谢你。对不起我的英语我是法国人:/
【问题讨论】:
标签: iphone xcode cocos2d-iphone calayer shape