Reputation: 126309
If my path ends where it starts, then is it OK to omit the call to CGContextClosePath
?
Upvotes: 1
Views: 2014
Reputation: 1064
Not necessarily, only if you want to close the subpath. According to iOS Developer Library : Quartz 2D Programming Guide:
To close the current subpath, your application should call CGContextClosePath. This function adds a line segment from the current point to the starting point of the subpath and closes the subpath. Lines, arcs, and curves that end at the starting point of a subpath do not actually close the subpath. You must explicitly call
CGContextClosePath
to close a subpath.
Upvotes: 2