clipPath method

void clipPath({
  1. bool evenOdd = false,
  2. bool end = true,
})

Create a clipping surface from the previously defined shape, to prevent any further drawing outside

Implementation

void clipPath({bool evenOdd = false, bool end = true}) {
  var o = 0;
  assert(() {
    if (_page.pdfDocument.settings.verbose) {
      o = _buf.offset;
      _buf.putString(' ' * (_indent));
    }
    return true;
  }());

  _buf.putString('W${evenOdd ? '*' : ''}${end ? ' n' : ''} ');

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