Returns a new Geometry which is a copy of the input Geometry rotated by the specified angle in the specified angular units.

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,
	double rotateAngle,
	Unit unit
)
Visual Basic (Declaration)
Public Shared Function Rotate ( _
	inputGeometry As Geometry, _
	rotateAngle As Double, _
	unit As Unit _
) As Geometry

Parameters

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

The Geometry to copy and rotate.
rotateAngle
Type: System..::.Double

The angle by which to rotate the geometry, in unit units.
unit
Type: ESRI.ArcGISExplorer.Geometry..::.Unit

The units of the rotateAngle. Must be an Angular unit.

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 specify rotation in an angular unit other than radians, for example you can rotate a geometry by 90 degrees.

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