Canvas arc CCW setting

Discuss problems and solutions.
Post Reply
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Canvas arc CCW setting

Post by Softcore »

Im not experienced with html5 canvas but I have reasons to believe the CCW setting in

canvas_arc(c, x, y, r, start, end,ccw)

doesnt work!

If it did, shouldnt I be able to get the "larger" part of the "circle" instead of the small one in my attached example? it seems as though the parser always chooses the "shorter" route for the path...is that even possible? I tried switching the CCW setting, I even tried switching the end-start points....but still.....

:(
Attachments
canvas-arc.jzml
(938 Bytes) Downloaded 59 times
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Canvas arc CCW setting

Post by Macciza »

Hi
Yes it does seem like there is some 'oddness' going on . . .

One solution is simply changing values - .75*pi,2.25*pi instead of 0.25*pi,0.75*pi . . .

MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Canvas arc CCW setting

Post by Softcore »

Ok! I didnt know I could use negative values....

This did what I was after!

-1.25*pi, .25*pi
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Canvas arc CCW setting

Post by Macciza »

I can't see why not - it is simply describing a point on the arc ....
-1.25*pi is the same point as .75 . . .
And .25 is the same point as 2.25 . .
Though mixing the values can lead to the wrong arc . .
Pretty sure it will get sorted soon enough . ..

Am similarly going through various Canvas tuts of Net and converting them, as well as picking apart the provided examples . .
Yes it will take a little time to get up to speed on it all, but it is often productive play that can breed new ideas . ..
Lots of different ways to achieve similar things, as well as different ways to structure complex draw functions . ..

MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
nick_liine
Liine Staff
Posts: 285
Joined: 01 Oct 2010 11:06

Re: Canvas arc CCW setting

Post by nick_liine »

Thanks for the report, investigating.
Post Reply