gimp-drawable-mask-bounds

Spencer Kimball & Peter Mattis

Description

Find the bounding box of the current selection in relation to the specified drawable.

Help

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.


Type

unknown

Parameters

Type Name Description
PF_DRAWABLE drawable The drawable

Return

Type Name Description
PF_INT non-empty TRUE if there is a selection (TRUE or FALSE)
PF_INT x1 x coordinate of the upper left corner of selection bounds
PF_INT y1 y coordinate of the upper left corner of selection bounds
PF_INT x2 x coordinate of the lower right corner of selection bounds
PF_INT y2 y coordinate of the lower right corner of selection bounds