Skip to content
EliteChart

arrowMarkVertices

Documentation


Documentation / @elitechart/drawings / arrowMarkVertices

code
function arrowMarkVertices(
   x, 
   y, 
   direction): {
  tip: {
     x: number;
     y: number;
  };
  v1: {
     x: number;
     y: number;
  };
  v2: {
     x: number;
     y: number;
  };
};

Defined in: drawings/src/arrow-mark.ts:31

Compute the three screen-space vertices for a directional mark. The anchor is always the tip; the two other vertices form the base of the triangle on the opposite side.

Parameters

x

number

y

number

direction

ArrowDirection

Returns

code
{
  tip: {
     x: number;
     y: number;
  };
  v1: {
     x: number;
     y: number;
  };
  v2: {
     x: number;
     y: number;
  };
}

tip

code
readonly tip: {
  x: number;
  y: number;
};

tip.x

code
readonly x: number;

tip.y

code
readonly y: number;

v1

code
readonly v1: {
  x: number;
  y: number;
};

v1.x

code
readonly x: number;

v1.y

code
readonly y: number;

v2

code
readonly v2: {
  x: number;
  y: number;
};

v2.x

code
readonly x: number;

v2.y

code
readonly y: number;