Skip to content

Conversation

@karljs
Copy link

@karljs karljs commented Apr 4, 2018

Some time ago I posted an RFC of sorts (in issue #57) that didn't get any comments. This patch adds support for anti-clockwise arcs very trivially by making an optional parameter mandatory, which is not backwards compatible.

Obviously this isn't a perfect approach but I don't really have the time to design a general system for optional parameters. One easy possibility is to just add a second function which takes a different number of arguments, but that would not align exactly with the JS specification.

return function(a) {
return function() {
ctx.arc(a.x, a.y, a.r, a.start, a.end);
ctx.arc(a.x, a.y, a.r, a.start, a.end, a.clockwise);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter name seems to be wrong?

@JordanMartinez
Copy link
Contributor

The design used here could be trivially supported by wrapping the anti arg in a Maybe and then dispatching to two different FFI calls depending on whether one has a Just or Nothing for that arg.

So, this is pretty close to being merged.

@JordanMartinez
Copy link
Contributor

Actually, this PR can no longer be merged as the fork was deleted.

@JordanMartinez
Copy link
Contributor

Superceded by #83. Also, my Maybe idea above doesn't make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants