strokePath method

void strokePath(
  1. PdfPath path,
  2. PdfMatrix transform,
  3. PdfStroke stroke,
  4. int rgba, {
  5. double tolerance = 0.25,
})

Strokes path (page space, stroke parameters in page space like PdfDevice.strokePath) by expanding to closed contours and filling them nonzero.

Cached like fillPath when a shapeCache is attached; stroke parameters (device width, caps, joins, dashes - quantized to 1/64 px) join the content key.

Implementation

void strokePath(
    PdfPath path, PdfMatrix transform, PdfStroke stroke, int rgba,
    {double tolerance = 0.25}) {
  if (path.isEmpty || _rowCount == 0) return;
  final cache = shapeCache;
  if (cache != null &&
      path.segments.length <= ShapeStripCache.maxSegments &&
      _shapeCached(cache, path, transform, PdfFillRule.nonzero, stroke,
          rgba, tolerance)) {
    return;
  }
  _strokePathDirect(path, transform, stroke, rgba, tolerance);
}