Mask.rectangle constructor

Mask.rectangle(
  1. num x,
  2. num y,
  3. num width,
  4. num height
)

Create a rectangular mask.

Implementation

factory Mask.rectangle(num x, num y, num width, num height) {
  final rectangle = Rectangle<num>(x, y, width, height);
  return _RectangleMask(rectangle);
}