如何在Iphone上制作它

时间:2010-12-06 10:43:36

标签: iphone objective-c iphone-sdk-3.0 quartz-graphics quartz-2d

我无法在iphone上发布通知

 CGPoint addLines[] =
{
    CGPointMake(10.0, 90.0),
    CGPointMake(70.0, 60.0),
    CGPointMake(130.0, 120.0),
    CGPointMake(190.0, 150.0),
    CGPointMake(250.0, 60.0),
    CGPointMake(310.0, 90.0),
};
CGContextAddLines(context, addLines, sizeof(addLines)/sizeof(addLines[0]));
CGContextStrokePath(context);

请不要发布循环代码,因为我想通过线条制作不规则的圆形,以及如何使我的边缘平滑,而不是尖锐

2 个答案:

答案 0 :(得分:1)

您是否正在寻找CGContextAddArcToPoint()

答案 1 :(得分:0)

您可以尝试这样 -

CGPoint addLines[] = {
    CGPointMake(10.0, 90.0),
    CGPointMake(70.0, 60.0),
    CGPointMake(70.0, 60.0), 
    CGPointMake(130.0, 120.0),
    ...
};

CGContextStrokeLineSegments(context, addLines,nooflines);