0
當我嘗試填充一個圖形時,它只填充圓弧。這裏要了解的圖片: 核心圖形填充只是我的一部分圖
我想填充圓弧下方的矩形,我不明白爲什麼它不。
這裏是我的代碼:
CGContextSetStrokeColorWithColor(context, wormBorderColor);
CGContextSetFillColorWithColor(context, wormFillColor);
//Tracer la ligne de gauche
CGContextMoveToPoint(context, leftX, startingY);
CGContextAddLineToPoint(context, leftX, startingY-wormHeight);
CGContextMoveToPoint(context, rightX, startingY-wormHeight);
CGContextAddArc(context, centerX, startingY-wormHeight, echelleSize/2, 0,M_PI , 1);
CGContextMoveToPoint(context, rightX, startingY-wormHeight);
CGContextAddLineToPoint(context, rightX, startingY);
//CGContextStrokePath(context);
CGContextDrawPath(context, kCGPathFillStroke);
謝謝。請原諒我可憐的英語和我可憐的核心圖形知識。
非常感謝,它解決了我的問題 – Hugo