Returns the points forming an arrow.

const opts = {
tailLength: 10,
arrowSize: 20,
tailThickness: 5,
angleRadian: degreeToRadian(45)
}
const arrow = Shapes.arrow({x:100, y:100}, `tip`, opts); // Yields an array of points

// Eg: draw points
Drawing.connectedPoints(ctx, arrow, {strokeStyle: `red`, loop: true});
  • Parameters

    • origin: Point

      Origin of arrow

    • from: "tip" | "tail" | "middle"

      Does origin describe the tip, tail or middle?

    • opts: ArrowOpts = {}

      Options for arrow

    Returns readonly Point[]