getCirclePath method

Path getCirclePath(
  1. double arrowSize,
  2. Offset point1,
  3. Offset point2,
  4. double scale,
  5. bool isCenter,
)

Implementation

Path getCirclePath(
  double arrowSize,
  Offset point1,
  Offset point2,
  double scale,
  bool isCenter,
) {
  Path path = Path();
  if (isCenter) {
    path.addOval(Rect.fromCircle(center: point2, radius: scale * arrowSize));
  } else {
    Offset circleCenter = point2 -
        VectorUtils.normalizeVector(
              VectorUtils.getDirectionVector(point1, point2),
            ) *
            arrowSize *
            scale;
    path.addOval(
      Rect.fromCircle(center: circleCenter, radius: scale * arrowSize),
    );
  }
  return path;
}