Method ScaleSelectedElement
ScaleSelectedElement(double, double, MapPoint?)
Scales the selected element by the specified factors.
Declaration
public void ScaleSelectedElement(double scaleX, double scaleY, MapPoint? origin)
Parameters
| Type | Name | Description |
|---|---|---|
| double | scaleX | The scale factor along the x-axis. It can be positive or negative. It cannot be 0, or a non-numeric value. |
| double | scaleY | The scale factor along the y-axis. It can be positive or negative. It cannot be 0, or a non-numeric value. |
| MapPoint | origin | The point relative to which the geometry will be scaled. If |
Remarks
If the origin Point has a different SpatialReference than the associated MapView, the point will be reprojected before the geometry is rotated, using the default transformation.
Any z-value of the origin MapPoint is ignored.
ScaleSelectedElement(double, double, MapPoint?) only supports scaling the xy-dimensions.
Positive scale factors greater than 1 increase the size of the Geometry, and positive factors between 0 and 1 reduce the size of the geometry. Negative scale factors produce a geometry reflected across the axes of the origin point. Negative factors less than -1 both reflect and increase the size of the geometry, and negative factors between -1 and 0 both reflect and reduce the size of the geometry.
Scaling a geometry or part with circular arc by different x and y factors changes the shape of the segments to no longer be circular. If storing the geometry as a feature in ArcGIS Online, as ArcGIS Online only supports circular arcs (SupportedCurveTypes) you may wish to restrict the scaling to uniform factors to preserve the circular shape.
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The GeometryEditor must be started and have a SelectedElement set in order to scale an element. Elements with a one-dimensional extent cannot be scaled - the following cannot be scaled: GeometryEditorMidVertex, GeometryEditorVertex, and GeometryEditorGeometry when Geometry is Point. |
| ArgumentException |
|
See Also
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET Standard 2.0 | 200.3 - 200.8 |
| .NET | 200.3 - 300.0 |
| .NET Windows | 200.3 - 300.0 |
| .NET Android | 200.3 - 300.0 |
| .NET iOS | 200.3 - 300.0 |
| .NET Framework | 200.3 - 200.8 |
| UWP | 200.3 - 200.8 |