drawContext2DLine function

void drawContext2DLine(
  1. dynamic context2D,
  2. double x,
  3. double y,
  4. double x1,
  5. double y1,
)

Add a straight line segment to the current path.

Implementation

void drawContext2DLine(
  dynamic context2D,
  double x,
  double y,
  double x1,
  double y1,
) {
  if (context2D is web.CanvasRenderingContext2D) {
    context2D.moveTo(x, y);
    context2D.lineTo(x1, y1);
  }
}