fill_rectangle#
- rlemasklib.RLEMask.fill_rectangle(rect, value=1, inplace=False)[source]#
Fill a rectangle in the mask.
- Parameters:
- Returns:
An RLEMask object with the rectangle filled (self if inplace=True)
- Return type:
Examples
Fill a rectangle with ones:
.fill_rectangle([2, 1, 4, 2], value=1) ==Clear a rectangle by filling with zeros:
.fill_rectangle([2, 1, 4, 2], value=0) ==See also