clipRRectAndPaint method

void clipRRectAndPaint (RRect rrect, Clip clipBehavior, Rect bounds, void painter())

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

bounds is the saveLayer bounds used for Clip.antiAliasWithSaveLayer.

Implementation

void clipRRectAndPaint(RRect rrect, Clip clipBehavior, Rect bounds, void painter()) {
  _clipAndPaint((bool doAntiAias) => canvas.clipRRect(rrect, doAntiAlias: doAntiAias), clipBehavior, bounds, painter);
}