ledgerInkedLine function

void ledgerInkedLine(
  1. Canvas canvas,
  2. List<Offset> points,
  3. Color color,
  4. Color paper, {
  5. double width = 1.5,
  6. double knock = 5,
  7. List<double>? dash,
})

art.inked_line: the line through points over a paper knock-out knock wide (so the hatching stops short of it), width wide, round joined and capped, dashed by dash when given.

Implementation

void ledgerInkedLine(
  Canvas canvas,
  List<Offset> points,
  Color color,
  Color paper, {
  double width = 1.5,
  double knock = 5,
  List<double>? dash,
}) {
  final line = ledgerPolyline(points);
  canvas.drawPath(
    line,
    ledgerStroke(paper, knock)..strokeJoin = StrokeJoin.round,
  );
  canvas.drawPath(
    dash == null ? line : ledgerDashed(line, dash),
    ledgerStroke(color, width)
      ..strokeJoin = StrokeJoin.round
      ..strokeCap = StrokeCap.round,
  );
}