views:

186

answers:

0

I am trying to develop a simple freehand-drawing app for red-marking some of my images. Below is a method that is called from within the drawRect.

I want to ask if there is a way to avoid adding the path every time before the path is redrawn?

Also, the way the draw method is set up, the drawing gets a bit slow and choppy after a few seconds. Can anyone suggest a way to improve the smoothness of the drawn path?

thanks

-(void)freehandDraw:(CGContextRef)context inRect:(CGRect)rect {
CGPathAddLineToPoint( path, NULL, drawTip.x, drawTip.y); CGContextAddPath( context, path); CGContextStrokePath(context);
} // method