CreateEllipse

The CreateEllipse method creates an ellipse in the 3D Window.

 

JavaScript

 

CreateEllipse(

       Position,

       RadiusX,

       RadiusY,

       LineColor ,

       FillColor ,

       NumOfSegments ,

       GroupID ,

       Description )

 

C#

 

ITerrainEllipse61 CreateEllipse(

       IPosition61   Position,

       double     RadiusX,

       double     RadiusY,

       object     LineColor = -16711936,

       object     FillColor = -10197916,

       int        NumOfSegments = -1,

       int        GroupID = 0,

       string     Description = "")

 

C++

 

HRESULT CreateEllipse(

        IPosition61           Position,

        double                   RadiusX,

        double                   RadiusY,

        VARIANT                  LineColor,

        VARIANT                  FillColor,

        long                     NumOfSegments,

        LONG_PTR                 GroupID,

        BSTR                     Description,

        ITerrainEllipse61 **     pITerrainEllipse61) 

 

Parameters

Position

An IPosition61 representing the position and orientation of the object on the terrain.

RadiusX

The radius of the ellipse along the x-axis in meters.

RadiusY

The radius of the ellipse along the y-axis in meters.

LineColor

The color of the lines that make up the ellipse. The color value is used to specify color and transparency values. This parameter can be any of the following:

·         An IColor61 object.

·         A number which represents the color in ABGR format (0xAABBGGRR). The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; the third byte contains a value for blue. The high-order byte contains a value for alpha.

·         A string that represents HTML color format (“#RRGGBB”).

FillColor

The color which fills the ellipse, if the alpha value is greater than zero. The color value is used to specify color and transparency values. This parameter can be any of the following:

·         An IColor61 object.

·         A number which represents the color in ABGR format (0xAABBGGRR). The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; the third byte contains a value for blue. The high-order byte contains a value for alpha.

·         A string that represents HTML color format (“#RRGGBB”).

NumOfSegments

The number of segments the ellipse has. The more segments, the smoother it appears.

GroupID

The Project Tree group in which the ellipse is created. If it is set to zero, the object is created under the root. You can obtain the GroupID by one of the following methods:

§  Create the group using IProjectTree61.CreateGroup.

§  Find the group, if you know the name, using IProjectTree61.FindItem.

§  Traverse the Tree using IProjectTree61 methods such as GetNextItem (), until you come to the desired GroupID.

Description

The name of the ellipse as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.

Return Value

pITerrainEllipse61

An ITerrainEllipse61, representing the newly created ellipse.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.