addSharpBottomLeft method

void addSharpBottomLeft(
  1. SharpProcessedRadius radius,
  2. Rect rect
)

Implementation

void addSharpBottomLeft(SharpProcessedRadius radius, Rect rect) {
  final width = rect.width;
  final height = rect.height;
  if (radius.radius.cornerRadius > 0) {
    final a = radius.a;
    final b = radius.b;
    final c = radius.c;
    final d = radius.d;
    final p = radius.p;
    this
      ..lineTo(
        math.min(width / 2, p),
        height,
      )
      ..cubicTo(
        p - a,
        height,
        p - a - b,
        height,
        p - a - b - c,
        height - d,
      )
      ..relativeArcToPoint(
        Offset(
          -radius.circularSectionLength,
          -radius.circularSectionLength,
        ),
        radius: radius.radius,
      )
      ..cubicTo(
        0,
        height - (p - a - b),
        0,
        height - (p - a),
        0,
        math.max(height / 2, height - p),
      );
  } else {
    this
      ..lineTo(0, height)
      ..lineTo(0, height / 2);
  }
}