Cirque
Cirque copied to clipboard
Feature/counter clockwise
This pull request will allow the stroke to progress counter-clockwise along a path. When calculating the start and final angles in drawGradient() and drawSolid(), a quick overload of the + operator on CGFloat lets us add or subtract based on the isClockwise: Bool property. In both methods, the property is also used when calling processPath.addArc().
- Added public isClockwise property
- Added CGFloat extension
- Fixed small grammatical errors in comments
The idea behind overloading the operator on CGFloat is to allow the code to remain similar in simplicity and brevity. Rather use one extension instead of adding more than a dozen lines of repetitive conditionals.
Thanks a lot for another PR 🙏 I will have a look as soon as I can - probably by the end of the week.
Code looks good, though 👌 Neat trick with the CGFloat operator overload. As I said, I'll give a spin as soon as I can.