Parameters
- geometry
- The geometry to move.
- dx
- Units along the X-axis to move the geometry.
- dy
- Units along the Y-axis to move the geometry.
Return Value
The moved geometry.
Exception | Description |
---|---|
System.ArgumentNullException | Geometry is null or empty. |
System.NotImplementedException | The method is not implemented for GeometryBag. |
MapPoint pt = MapPointBuilderEx.CreateMapPoint(1.0, 3.0); MapPoint ptResult = GeometryEngine.Instance.Move(pt, -3.5, 2.5) as MapPoint; // ptResult is (-2.5, 5.5)
List<MapPoint> pts = new List<MapPoint>(); pts.Add(MapPointBuilderEx.CreateMapPoint(1.0, 1.0, 3.0)); pts.Add(MapPointBuilderEx.CreateMapPoint(3.0, 3.0, 3.0)); pts.Add(MapPointBuilderEx.CreateMapPoint(3, 2, 3.0)); pts.Add(MapPointBuilderEx.CreateMapPoint(4.0, 2.0, 3.0)); Polyline polyline = PolylineBuilderEx.CreatePolyline(pts); Geometry geometry = GeometryEngine.Instance.Move(polyline, 3, 2); Polyline polylineResult = geometry as Polyline; // polylineResult.Points[0] = 4.0, 3.0, 3.0 // polylineResult.Points[1] = 6.0, 5.0, 3.0 // polylineResult.Points[2] = 6.0, 4.0, 3.0 // polylineResult.Points[3] = 7.0, 4.0, 3.0
Target Platforms: Windows 11, Windows 10