scaleSelectedElement

fun scaleSelectedElement(scaleX: Double, scaleY: Double, origin: Point? = null)

Scales the selected element by the specified factors. If the origin com.arcgismaps.geometry.Point has a different com.arcgismaps.geometry.SpatialReference than the associated com.arcgismaps.mapping.view.MapView, the point will be reprojected before the geometry is rotated, using the default transformation.

Positive scale factors greater than 1 increase the size of the GeometryEditor.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.

Since

200.2.0

Parameters

scaleX

The scale factor along the x-axis. It can be positive or negative. It cannot be 0, or a non-numeric value.

scaleY

The scale factor along the y-axis. It can be positive or negative. It cannot be 0, or a non-numeric value.

origin

The point relative to which the geometry will be scaled. If null, or com.arcgismaps.geometry.Geometry.isEmpty is true, the center of the extent of the GeometryEditor.selectedElement is used.

See also

Throws

scaleX and scaleY must be valid numeric values. They cannot be 0, NaN, or infinity.

The GeometryEditor must be started and have a GeometryEditor.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 GeometryEditor.geometry is GeometryType.Point.