gimp-selection-bounds

Spencer Kimball & Peter Mattis

Description

Find the bounding box of the current selection.

Help

This procedure returns whether there is a selection for the specified image. If there is one, the upper left and lower right corners of the bounding box are returned. These coordinates are relative to the image. Please note that the pixel specified by the lower righthand 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).


Type

unknown

Parameters

Type Name Description
PF_IMAGE image The image

Return

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