fillAndStrokePath method

void fillAndStrokePath({
  1. bool evenOdd = false,
  2. bool close = false,
})

Draw a surface on the previously defined shape and then draw the contour set evenOdd to false to use the nonzero winding number rule to determine the region to fill and to true to use the even-odd rule to determine the region to fill

Implementation

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

  _buf.putString('${close ? 'b' : 'B'}${evenOdd ? '*' : ''} ');
  _page.altered = true;

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