MCPcopy Index your code
hub / github.com/clips/pattern / arrow

Function arrow

pattern/canvas.js:1992–2008  ·  view source on GitHub ↗
(x, y, width, options)

Source from the content-addressed store, hash-verified

1990var oval = ellipse;
1991
1992function arrow(x, y, width, options) {
1993 /* Draws an arrow with its tip located at x, y.
1994 * The current stroke, strokewidth, strokestyle and fill color are applied.
1995 */
1996 var head = width * 0.4;
1997 var tail = width * 0.2;
1998 var p = new Path();
1999 p.moveto(x, y);
2000 p.lineto(x-head, y+head);
2001 p.lineto(x-head, y+tail);
2002 p.lineto(x-width, y+tail);
2003 p.lineto(x-width, y-tail);
2004 p.lineto(x-head, y-tail);
2005 p.lineto(x-head, y-head);
2006 p.closepath();
2007 p.draw(options);
2008}
2009
2010function star(x, y, points, outer, inner, options) {
2011 /* Draws a star with the given points, outer radius and inner radius.

Callers

nothing calls this directly

Calls 1

drawMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…