Description

Returns the bounds of all or selected features

Return Type

None  

Syntax

object.GetFeatureBoundingBox Selector, Left, Top, Right, Bottom

The GetFeatureBoundingBox Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McPoints.
SelectorRequired. A Variant value.

An empty variant, a single negative value, a single index value, or an array of zero or more index values (negative index values are legal but will be ignored).

If the Selector argument is a non-negative scalar value, then the bounds of the indicated feature from the collection is returned.

If the Selector argument is empty or any negative scalar value, including -1, then the bounds of the entire feature collection is returned (this is equivalent to a GetBounds call, except that the results are returned as floating point values rather than long integers).

If Selector is an array, then zero or positive values are treated as indices into the features collection, negative values are legal but ignored. In this case, the smallest bound of all of the indicated features is returned (i.e., the intersection of all of their individual bounds). Index values greater or equal to the Count property are illegal.

LeftRequired. A Single value.

left side of the region

TopRequired. A Single value.

upper side of the region

RightRequired. A Single value.

right side of the region

BottomRequired. A Single value.

bottom side of the region

Remarks

This method returns its results as four separate values. The BoundingRect property exposes the bounds of all or selected features as a SINGLERECT, which may be more convenient in many situations.

If this McFeatures is IsReset (as it was after it was first created and after a Reset call) and all features are selected, then the bounds returned will be that of a backing McImage (this is the bounds that AccessMaskedImageData will use for an IsReset McFeatures).

Otherwise, if there are no features selected (either because the Selector is an empty array or because there are no features), then left will be returned as greater than right.

Exceptions

Selected indices must be less than the Count property.