drawLine method

  1. @override
dynamic drawLine(
  1. PrinterOffset offset,
  2. PrinterSize size, [
  3. Color color = const Color(0xFF000000)
])
override

打印线条

offset 偏移位置

size 大小

Implementation

@override
drawLine(PrinterOffset offset, PrinterSize size, [Color color = const Color(0xFF000000)]) {
  Paint paint = Paint();
  paint.color = color;
  canvas!.drawRect(Rect.fromLTWH(offset.x!, offset.y!, size.width!, size.height!), paint);
}