Reputation: 1231
What's the best practice for drawing a closed, filled path where each line has a different stroke?
Upvotes: 0
Views: 1101
Reputation: 96333
Fill the complete path, then iterate on its elements to stroke one line segment for every lineto
and closepath
(see actual Quartz names here). Your applier function will need to keep track of the current point itself.
Of course, if any of the elements are curveto
instead of lineto
, you may be screwed, but try it anyway.
Upvotes: 2
Reputation: 96333
Incidentally, if your intent is to make marching ants (a selection marquee), there's a much simpler way: Set the line dash, then fill and stroke as normal.
Upvotes: 0