clipRSuperellipseAndPaint method

void clipRSuperellipseAndPaint(
  1. RSuperellipse rse,
  2. Clip clipBehavior,
  3. Rect bounds,
  4. VoidCallback painter,
)

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

The bounds is the saveLayer bounds used for Clip.antiAliasWithSaveLayer.

Implementation

void clipRSuperellipseAndPaint(
  RSuperellipse rse,
  Clip clipBehavior,
  Rect bounds,
  VoidCallback painter,
) {
  _clipAndPaint(
    (bool doAntiAlias) => canvas.clipRSuperellipse(rse, doAntiAlias: doAntiAlias),
    clipBehavior,
    bounds,
    painter,
  );
}