raphael icon indicating copy to clipboard operation
raphael copied to clipboard

Since arc is quite a commonly used function, why not add it to Raphael?

Open nonopolarity opened this issue 13 years ago • 5 comments

Since arc is quite a commonly used function, why not add it to Raphael?

nonopolarity avatar Apr 13 '11 08:04 nonopolarity

Can you be more specific? What arc function?

DmitryBaranovskiy avatar Apr 18 '11 22:04 DmitryBaranovskiy

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

nonopolarity avatar Apr 19 '11 08:04 nonopolarity

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 avatar May 02 '11 07:05 basecode

@basecode that's perfect

GordanBlake avatar Jan 27 '13 17:01 GordanBlake

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.

digitalmouse avatar Nov 07 '17 13:11 digitalmouse