Description

Set the coordinate points that describe a feature.

Return Type

None  

Syntax

object.SetFeaturePoints FeatureIndex, vpPoints

The SetFeaturePoints Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McLines.
FeatureIndexRequired. A Long value.

The index of the feature being set. If this is a negative number, then for McPoints only, the coordinates of all points are set from the vPoints array. Otherwise this must be a non-negative feature index. Features other than the one being set are not disturbed; call Reset before using this method if you want to ensure that any existing coordinates are cleared.

vPoints : Allowed types are LONGPOINT, LONGRECT or Long, SINGLEPOINT, SINGLERECT or Single, and DOUBLEPOINT, DOULBERECT or Double. This array must be supplied with x,y pixel coordinate values (one XXXPOINT per point or two numeric values per point). For McRegions feature boundaries, the final closing segment is assumed (that is, the last point in the array does not need to be and should not be the same as the first point).

vpPointsRequired. A Variant value.

Remarks

For most types of features, the coordinates returned by GetFeaturePoints can be passed into this method to recreate the feature.

For McPoints, each feature is set by providing a single point X,Y pixel coordinate. For McLines, each feature is described by a polyline of two or more X,Y pixel coordinates. For McRegions, each feature is a polyline of three or more X,Y pixel coordinates, describing a path along the boundary pixels of a connected region. For McRegions, the type is converted to mcftOutline.

Coordinates are supplied as an array of values, POINT or RECT structs supplied by the caller (see Example).

For McPoints, it is possible to set all feature points at once by supplying an array of points. This cannot be done for McLines or McRegions, where the coordinates of only one feature at a time may be set.

If the FeatureIndex is equal to the Count property, then a new feature is created and appended as the