raphael
raphael copied to clipboard
Since arc is quite a commonly used function, why not add it to Raphael?
Since arc is quite a commonly used function, why not add it to Raphael?
Can you be more specific? What arc
function?
an arc function which can draw part of a circle... such as circle, radius 100, from degree 0 to 180. Example: http://stackoverflow.com/questions/5061318/drawing-centered-arcs-in-raphael-js and http://stackoverflow.com/questions/5646522/any-raphaeljs-guru-knows-how-to-draw-this-image
What about porting HTML5's canvas method arc to Raphael? SVG's arc method is sometimes "too" rich for doing such a simple task ;)
void arc(in double x, in double y, in double radius, in double startAngle, in double endAngle, in optional boolean anticlockwise); http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-arc
[EDIT]
I wanted to contribute to this discussion somehow, so I created a testcase
Canvas 2d API (arc command): http://jsbin.com/canvas/86/edit
Raphael API proposal: http://jsbin.com/omaya5/11/edit
What do you think?
@basecode that's perfect
I certainly would love to see this as a native feature, as opposed to relying on a additional library that includes more than this one function.