ClipRectLayer constructor

ClipRectLayer({@required Rect clipRect, Clip clipBehavior: Clip.hardEdge })

Creates a layer with a rectangular clip.

The clipRect property must be non-null before the compositing phase of the pipeline.

Implementation

ClipRectLayer({
  @required Rect clipRect,
  Clip clipBehavior = Clip.hardEdge,
}) : _clipRect = clipRect,
     _clipBehavior = clipBehavior,
     assert(clipBehavior != null),
     assert(clipBehavior != Clip.none);