setLineDashPattern method

void setLineDashPattern([
  1. List<num> array = const <num>[],
  2. int phase = 0
])

The dash array shall be cycled through, adding up the lengths of dashes and gaps. When the accumulated length equals the value specified by the dash phase

Example: 2 1 will create a dash pattern with 2 on, 1 off, 2 on, 1 off, ...

Implementation

void setLineDashPattern([List<num> array = const <num>[], int phase = 0]) {
  var o = 0;
  assert(() {
    if (_page.pdfDocument.settings.verbose) {
      o = _buf.offset;
      _buf.putString(' ' * (_indent));
    }
    return true;
  }());

  PdfArray.fromNum(array).output(_page, _buf);
  _buf.putString(' $phase d ');

  assert(() {
    if (_page.pdfDocument.settings.verbose) {
      _buf.putString(' ' * math.max(0, _commentIndent - _buf.offset + o));
      _buf.putComment('setLineDashPattern($array, $phase)');
    }
    return true;
  }());
}