getTrianglePath method

Path getTrianglePath(
  1. double x,
  2. double y
)

Implementation

Path getTrianglePath(double x, double y) {
  if (this.upsideDown) {
    return Path()
      ..moveTo(0, 0)
      ..lineTo(x / 2, y)
      ..lineTo(x, 0)
      ..lineTo(0, 0);
  } else {
    return Path()
      ..moveTo(0, y)
      ..lineTo(x / 2, 0)
      ..lineTo(x, y)
      ..lineTo(0, y);
  }
}