This document is archived and information here might be outdated. Recommended version. |
Defines this path, ring, polyline or polygon to have four line segments in the same positions as the sides of the input envelope.
[Visual Basic .NET] Public Sub SetRectangle ( _ ByVal inEnvelope As IEnvelope _ )
[C#] public void SetRectangle ( IEnvelope inEnvelope );
[C++]
HRESULT SetRectangle(
IEnvelope* inEnvelope
);
[C++] Parameters inEnvelope
inEnvelope is a parameter of type IEnvelope*
Sets the contents of the SegmentCollection equal to four Line segments that form the sides of the input Envelope. The Segments begin with the LowerLeft point and proceed clockwise (the first side is the left side). After SetRectangle is called, the SegmentCollection contains only the 4 Line segments (regardless of what it may have contained previously). The spatial reference of the envelope is transferred to the SegmentCollection.
The method uses the spatial reference of the input envelope to determine whether or not the output geometry is simple.
If the input envelope does not have a spatial reference, the output geometry will be assumed non-simple geometry.
If the input envelope has a spatial reference, and its width and height are greater than 3*tolerance, then the output geometry is a simple geometry. Otherwise, the output is non-simple.