Gimp.Drawable.mask_bounds
@accepts(Gimp.Drawable, int, int, int, int)
@returns(bool)
def mask_bounds(self, x1, y1, x2, y2):
# Python wrapper for gimp_drawable_mask_bounds()
Find the bounding box of the current selection in relation to the specified drawable.
This procedure returns whether there is a selection. If there is one, the upper left and lower right-hand corners of its bounding box are returned. These coordinates are specified relative to the drawable's origin, and bounded by the drawable's extents. Please note that the pixel specified by the lower right-hand coordinate of the bounding box is not part of the selection. The selection ends at the upper left corner of this pixel. This means the width of the selection can be calculated as (x2 - x1), its height as (y2 - y1). Note that the returned boolean does NOT correspond with the returned region being empty or not, it always returns whether the selection is non_empty. See Gimp.Drawable.mask_intersect for a boolean return value which is more useful in most cases.
- self
The drawable.
- x1
x coordinate of the upper left corner of selection bounds.
- y1
y coordinate of the upper left corner of selection bounds.
- x2
x coordinate of the lower right corner of selection bounds.
- y2
y coordinate of the lower right corner of selection bounds.
- Returns