50 float _lineDashesPhase;
58 return [[
self alloc] init];
68 [path appendBezierPathWithOvalInRect:aRect];
80 [path appendBezierPathWithRect:aRect];
85 + (
CPBezierPath)bezierPathWithRoundedRect:(CGRect)aRect xRadius:(
float)xRadius yRadius:(
float)yRadius
89 [path appendBezierPathWithRoundedRect:aRect xRadius:xRadius yRadius:yRadius];
97 + (float)defaultLineWidth
105 + (void)setDefaultLineWidth:(
float)width
113 + (void)fillRect:(CGRect)aRect
121 + (void)strokeRect:(CGRect)aRect
129 + (void)strokeLineFromPoint:(CGPoint)point1 toPoint:(CGPoint)point2
133 [path moveToPoint:point1];
134 [path lineToPoint:point2];
144 if (
self = [super init])
147 _lineWidth = [[
self class] defaultLineWidth];
148 _lineDashesPhase = 0;
158 - (void)moveToPoint:(CGPoint)point
166 - (void)lineToPoint:(CGPoint)point
174 - (void)curveToPoint:(CGPoint)endPoint controlPoint1:(CGPoint)controlPoint1 controlPoint2:(CGPoint)controlPoint2
176 CGPathAddCurveToPoint(_path, nil, controlPoint1.x, controlPoint1.y, controlPoint2.x, controlPoint2.y, endPoint.x, endPoint.y);
187 - (CGRect)controlPointBounds
232 - (void)getLineDash:(CPArrayRef)patternRef count:(NSInteger)count phase:(CGFloatRef)phaseRef
240 - (void)getLineDash:(CPArrayRef)patternRef phase:(CGFloatRef)phaseRef
243 @deref(patternRef) = [_lineDashes copy];
245 @deref(phaseRef) = _lineDashesPhase;
251 - (void)setLineDash:(CPArray)aPattern count:(NSInteger)count phase:(CGFloat)aPhase
262 - (void)setLineDash:(CPArray)aPattern phase:(CGFloat)aPhase
264 _lineDashes = aPattern;
265 _lineDashesPhase = aPhase;
279 - (void)setLineWidth:(
float)lineWidth
281 _lineWidth = lineWidth;
287 - (unsigned)elementCount
303 - (CGPoint)currentPoint
311 - (void)appendBezierPathWithPoints:(CPArray)points count:(
unsigned)count
319 - (void)appendBezierPathWithRect:(CGRect)rect
327 - (void)appendBezierPathWithOvalInRect:(CGRect)rect
335 - (void)appendBezierPathWithRoundedRect:(CGRect)rect xRadius:(
float)xRadius yRadius:(
float)yRadius
340 - (void)appendBezierPathWithArcFromPoint:(CGPoint)fromPoint toPoint:(CGPoint)toPoint radius:(
float)radius
356 - (void)removeAllPoints