clipRect method

  1. @override
void clipRect(
  1. Rect rect, {
  2. ClipOp clipOp = ui.ClipOp.intersect,
  3. bool doAntiAlias = true,
})
override

Reduces the clip region to the intersection of the current clip and the given rectangle.

If doAntiAlias is true, then the clip will be anti-aliased.

If multiple draw commands intersect with the clip boundary, this can result in incorrect blending at the clip boundary. See saveLayer for a discussion of how to address that.

Use ClipOp.difference to subtract the provided rectangle from the current clip.

Implementation

@override
void clipRect(Rect rect, {ui.ClipOp clipOp = ui.ClipOp.intersect, bool doAntiAlias = true}) =>
    parent.clipRect(rect, clipOp: clipOp, doAntiAlias: doAntiAlias);