On 16/04/2011, at 4:40 PM, Roland King wrote: > Where I'm getting the most time spent is in CGPathAddArc(), and this > particular shape has a lot of them. My assumption here is that CGPathAddArc, > which takes two angles, is having to calculate a bunch of trig functions of > those and figure out which bezier paths to add to approximate it. Once I have > the path calculated once, yes to rotate and translate it I'll have to iterate > over the points and multiply each of them by the transformation, but that's a > quicker operation than recalculating each one of those arcs all over again > from basics.
Yes, calculating arc-to-bezier is quite complicated (I just implemented this for importing SVG 'A' commands). If the arcs have common angles but there are many of them you could re-use the calculated arc segment using transforms to speed that up. For joining paths in the way you describe, you have to use CGPathApply. --Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com