clipRectAndPaint method
- Rect rect,
- Clip clipBehavior,
- Rect bounds,
- VoidCallback painter,
Clip canvas with Path according to rect
and then paint. canvas is
restored to the pre-clip status afterwards.
bounds
is the saveLayer bounds used for Clip.antiAliasWithSaveLayer.
Implementation
void clipRectAndPaint(Rect rect, Clip clipBehavior, Rect bounds, VoidCallback painter) {
_clipAndPaint((bool doAntiAlias) => canvas.clipRect(rect, doAntiAlias: doAntiAlias), clipBehavior, bounds, painter);
}