Method Rotate
Rotate(Geometry, Double, MapPoint)
Rotates the geometry by the specified angle of rotation around the provided origin point.
Declaration
public static Geometry Rotate(this Geometry geometry, double angle, MapPoint origin = null)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geometry | The geometry to rotate. |
System.Double | angle | The angle by which to rotate the geometry, counterclockwise, in degrees. |
MapPoint | origin | The center of rotation. If |
Returns
Type | Description |
---|---|
Geometry | A new geometry constructed by rotating the input geometry by the specified angle of rotation around the provided origin point. |
Remarks
The angle of rotation is used in the form of the modulo of 360 degrees; for example rotating by 540 degrees is equivalent to rotating the geometry by 180 degrees. A positive value corresponds to a counterclockwise rotation.
The GeometryType of the returned geometry is the same as the input geometry, except for an input Envelope which returns a Polygon result.
If the origin
has a different SpatialReference to that of the geometry
,
the point will be reprojected before the geometry is rotated, using the default transformation.
Rotating a MapPoint using the same location for the origin parameter returns a MapPoint with the same values as the input.
Supports true curves.
See Also
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 200.3 - 200.5 |
.NET | 200.3 - 200.5 |
.NET Windows | 200.3 - 200.5 |
.NET Android | 200.3 - 200.5 |
.NET iOS | 200.3 - 200.5 |
.NET Framework | 200.3 - 200.5 |
UWP | 200.3 - 200.5 |