Returns a new Geometry which is a copy of the input Geometry rotated by the specified angle in radians, using the specified Point as the origin of rotation.

Namespace:  ESRI.ArcGISExplorer.Geometry

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public static Geometry Rotate(
	Geometry inputGeometry,
	Point origin,
	double rotateAngleRadians
)
Visual Basic (Declaration)
Public Shared Function Rotate ( _
	inputGeometry As Geometry, _
	origin As Point, _
	rotateAngleRadians As Double _
) As Geometry

Parameters

inputGeometry
Type: ESRI.ArcGISExplorer.Geometry..::.Geometry

The Geometry to copy and rotate.
origin
Type: ESRI.ArcGISExplorer.Geometry..::.Point

A Point to use as the origin of rotation.
rotateAngleRadians
Type: System..::.Double

The angle, in radians, by which to rotate the geometry.

Return Value

A new Geometry of the same type as the inputGeometry, rotated by the specified angle.

Remarks

This overload of the Rotate method allows you to rotate a geometry around a point of origin other than the center of the Geometry; using this overload may result in the geometry changing location if the origin is far from the center point of the geometry.

Examples

The code below gets the Note currently selected, and uses the GeometryOperations class to rotate the Geometry of the Graphic of the Note. The code assumes you have using statements for the Application, Geometry and Mapping namespaces.
CopyC#
SelectedItemsCollection selItems = ESRI.ArcGISExplorer.Application.Application.SelectedItems;
if ((selItems.Count == 1) && (selItems[0] is Note))
{
  Note selected = selItems[0] as Note;

  // Rotate the geometry
  Geometry rotated = GeometryOperations.Rotate(selected.Graphic.Geometry, 90, Unit.Angular.Degrees);

  // Alternatively, specify rotation in radians, e.g.
  // Geometry rotated = GeometryOperations.Rotate(selected.Graphic.Geometry, 1.570796);

  // Update the geometry of the graphic.
  selected.Graphic.Geometry = rotated;
}
CopyVB.NET
Dim selItems As SelectedItemsCollection = ESRI.ArcGISExplorer.Application.Application.SelectedItems

If selItems.Count = 1 AndAlso TypeOf selItems(0) Is Note Then
    Dim selected As Note = selItems(0)
    Dim rotated As Geometry = GeometryOperations.Rotate(selected.Graphic.Geometry, 90, Unit.Angular.Degrees)
    ' Alternatively, specify rotation in radians, e.g.
    ' Dim rotated As Geometry = GeometryOperations.Rotate(selected.Graphic.Geometry, 1.570796)
    selected.Graphic.Geometry = rotated
End If

See Also