ixfx
    Preparing search index...

    Function arrow

    • Returns the points forming an arrow.

      Parameters

      • origin: Geometry.Point

        Origin of arrow

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

        Does origin describe the tip, tail or middle?

      • opts: ArrowOpts = {}

        Options for arrow

      Returns readonly Geometry.Point[]

      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});