두 개의 원을 그렸습니다. 그들은 그려지지만, 그들을 연결하는 선이 있습니다. 어떻게 제거합니까? 당신은 하나의 경로에서 새, 연결되지 않은 줄을 시작하려는 경우 CGContextMoveToPoint()
를 추가 할 필요가두 원 사이의 원치 않는 선 - 석영
//Background styling
CGContextSetRGBFillColor(context, 202.0/225.0, 255.0/225.0, 112.0/225.0, 1);
//Background setup
background = CGRectMake(1, 1, 1024, 786);
CGContextAddRect(context, background);
CGContextDrawPath(context, kCGPathFill);
//Styling
CGContextSetLineWidth(context, 2.0);
CGContextSetRGBStrokeColor(context, 0.0/225.0, 0.0/225.0, 225.0/225.0, 1);
CGContextSetRGBFillColor(context, 0.0/225.0, 0.0/255.0, 225.0/225.0, 1);
//first tower setup
CGContextAddArc(context, 200, 150, 10, 0, 2*3.14159265359, YES);
//second tower setup
CGContextAddArc(context, 800, 150, 10, 0, 2*3.14159265359, YES);
//Draw towers
CGContextDrawPath(context, kCGPathFillStroke);
어디에 추가해야합니까? –
펜을 움직이고 싶을 때. 귀하의 경우 두 개의 "AddArc"통화 사이. –