drawLine method

  1. @override
void drawLine(
  1. Offset p1,
  2. Offset p2,
  3. Paint paint
)
override

Draws a line between the given points using the given paint. The line is stroked, the value of the Paint.style is ignored for this call.

The p1 and p2 arguments are interpreted as offsets from the origin.

Implementation

@override
void drawLine(Offset p1, Offset p2, Paint paint) {
  addSkeleton(
    Rect.fromLTWH(
      0,
      0,
      max(p1.dx, p2.dx) - min(p1.dx, p2.dx),
      max(p1.dy, p2.dy) -
          min(
            p1.dy,
            p2.dy,
          ),
    ),
    paint.color,
  );
}