Description

Clips a set of features to the bounds of an image.

Return Type

A Boolean value.  

True if any features were clipped, otherwise False. The ChangeCounter property will be unchanged if no clipping occurs.

Syntax

object.ClipToImage ([varImage])

The ClipToImage Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McLines.
varImageOptional. A Variant value.

an optional source for the image bounds. If supplied this must be an McImage instance or one of the legal arguments for the McImages.Item property. If this argument is not supplied (i.e., is VT_EMPTY or VT_ERROR), then this McFeatures must have a parent McImage, which is used as the source for the image data.

Remarks

The image used for clipping can be supplied as an argument, but will usually be the parent McImage of the McFeatures instance (see Example).

After clipping, the resulting features are guaranteed to lie within the rectangle. If an McRegions has the mcofKeepRegionsAsUnion OptionFlags bit set, then if the sub-regions are completely outside the rectangle, the region is now empty. If the features were completely inside the rectangle, they are unchanged.

For McPoints type features, any points that fall outside of the given rectangle are removed. This may leave the set of points empty.

For an McLines or an McRegions with the mcofKeepRegionsAsUnion OptionFlags bit clear, if a line or region feature is completely outside of the clipping rectangle, then that feature is removed. This may leave the set of features empty (IsEmpty will be true).

Polylines that are not completely outside of the clipping rectangle are clipped to the rectangle bounds and adjacent duplicate points are condensed. Regions of type mcftEllipse will become type mcftOutline if the boundary is clipped.