This document is archived and information here might be outdated.  Recommended version.


ISegmentCollection.SetRectangle Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

ISegmentCollection.SetRectangle Method

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

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. 

See Also

ISegmentCollection Interface

.NET Samples

Create a custom raster type from the ground up for DMCII data (Code Files: DMCIIRasterType)

.NET Related Topics

Creating a topology in the geodatabase | Geodatabase | How to perform an affine transformation | Working with the edit sketch