This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IC > ICircularArc Interface > ICircularArc.QueryCenterPoint Method (ArcObjects .NET 10.4 SDK) |
Copies the center point of this circular arc to the input point.
[Visual Basic .NET] Public Sub QueryCenterPoint ( _ ByVal Center As IPoint _ )
[C#] public void QueryCenterPoint ( IPoint Center );
[C++]
HRESULT QueryCenterPoint(
IPoint* Center
);
[C++]
Parameters Center
Center is a parameter of type IPoint
Returns the Center Point of the CircularArc. The Center Point is the Point equidistant from all other points on the CircularArc, and it is the point from which the Radius is measured.
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.
private void showCenterPoint()
{
//Create three points to draw an arc through.
IPoint point1=new ESRI.ArcGIS.Geometry.Point();
IPoint point2=new ESRI.ArcGIS.Geometry.Point();
IPoint point3=new ESRI.ArcGIS.Geometry.Point();
point1.PutCoords(200, 200);
point2.PutCoords(200, 300);
point3.PutCoords(300, 300);
//Construct a Three Point Arc.
IConstructCircularArc constructionArc=new CircularArc() as IConstructCircularArc;
constructionArc.ConstructThreePoints(point1, point2, point3, false);
ICircularArc circularArc=constructionArc as ICircularArc;
System.Windows.Forms.MessageBox.Show(
"Values from QueryCenterPoint are: \n" +
"Center Point X coord: " + circularArc.CenterPoint.X + ",\n" +
"Center Point Y coord: " + circularArc.CenterPoint.Y
);
}