RenderClipRRect constructor

RenderClipRRect({RenderBox child, BorderRadius borderRadius: BorderRadius.zero, CustomClipper<RRect> clipper, Clip clipBehavior: Clip.antiAlias })

Creates a rounded-rectangular clip.

The borderRadius defaults to BorderRadius.zero, i.e. a rectangle with right-angled corners.

If clipper is non-null, then borderRadius is ignored.

The clipBehavior cannot be Clip.none.

Implementation

RenderClipRRect({
  RenderBox child,
  BorderRadius borderRadius = BorderRadius.zero,
  CustomClipper<RRect> clipper,
  Clip clipBehavior = Clip.antiAlias,
}) : assert(clipBehavior != Clip.none), _borderRadius = borderRadius, super(child: child, clipper: clipper, clipBehavior: clipBehavior) {
  assert(_borderRadius != null || clipper != null);
}