Copies the centroid of this area to the specified point.
[Visual Basic .NET] Public Sub QueryCentroid ( _ ByVal Center As IPoint _ )
[C#] public void QueryCentroid ( IPoint Center );
[C++]
HRESULT QueryCentroid(
IPoint* Center
);
[C++]Parameters
CenterCenter is a parameter of type IPoint
Product Availability
Description
Queries the Centroid of the 2 (or 2.5) Dimensional figure. The Centroid is the center of the weighted area. You must instantiate the Point before calling QueryCentroid. For example,
Dim pPoint as IPoint
Set pPoint = New Point
Remarks
The Centroid does not always occur inside the Area of the geometry. The Centroid is not the same as the center of the geometry or the Envelope binding the geometry (but it may be if and only if that is also the center of the weighted area).
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.
See Also
IArea Interface | IArea.QueryCentroid Method | IArea.Centroid Property | IArea.LabelPoint Property | IArea.QueryLabelPoint Method