scenic
scenic copied to clipboard
New function Scenic.Script.arc/7 to add arcs to current path
Description
This PR adds a new operation arc to add arcs to current path. This interface is also available on HTML Canvas API: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arc
Motivation and Context
Today we only have 2 interfaces to have arcs:
-
Scenic.Script.draw_arc/4
: which draws an arc on a new path; -
Scenic.Script.arc_to/6
: which adds an arc on the current path. The need for a third arc operation is that none of the above functions provide a flexible interface for arcs as the nvgArc does.
So this new function arc have the same parameters as nvgArc, which gives a more flexible interface for drawing arcs.
Types of changes
- [ ] Bug fix (a non-breaking change which fixes an issue)
- [x] New feature (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)
Checklist
- [x] Check other PRs and make sure that the changes are not done yet.
Dependencies
This PR depends on changes on https://github.com/ScenicFramework/scenic_driver_local and can only be merged after https://github.com/ScenicFramework/scenic_driver_local/pull/42