clipPathAndPaint method

void clipPathAndPaint (Path path, Clip clipBehavior, Rect bounds, void painter())

Clip canvas with Path according to Clip and then paint. canvas is restored to the pre-clip status afterwards.

bounds is the saveLayer bounds used for Clip.antiAliasWithSaveLayer.

Implementation

void clipPathAndPaint(Path path, Clip clipBehavior, Rect bounds, void painter()) {
  _clipAndPaint((bool doAntiAias) => canvas.clipPath(path, doAntiAlias: doAntiAias), clipBehavior, bounds, painter);
}