I am new to CGPath concept and have a decent idea about Bezier curves. I am creating a small free hand drawing program using a View. In drawRect I keep drawing recorded set of lines from an Array. and while my mouse moves I add a new line to that array and refresh the view. drawrect is called again and it draws the recorded set of lines again.
I was reading about CGPath, it says that internally it does something similar to what I am doing. storing a set of lines and Bezier curves.
So is there any performance improvement, if I use CGPath ?
Hope this answer your question about CGPath.
You might not want to lose your path so easily, especially if it depicts a complex scene you want to use over and over again. For that reason, Quartz provides two data types for creating reusable paths CGPathRef and CGMutablePathRef.
Reference in section creating a path. http://developer.apple.com/library/IOS/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_paths/dq_paths.html#//apple_ref/doc/uid/TP30001066-CH211-SW1