Show / Hide Table of Contents

Method Scale

Scale(Geometry, Double, Double, MapPoint)

Scales the given geometry by the specified factors from the specified origin point.

Declaration
public static Geometry Scale(this Geometry geometry, double scaleX, double scaleY, MapPoint origin = null)
Parameters
Type Name Description
Geometry geometry

The geometry to scale.

System.Double scaleX

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

System.Double scaleY

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

MapPoint origin

The point around which the geometry will be scaled. If null, or IsEmpty is true, the center of the extent of the geometry parameter is used.

Returns
Type Description
Geometry

A new geometry constructed by scaling the input geometry by the specified factors from the specified origin point.

Remarks

If the origin has a different SpatialReference than that of the geometry, the point will be reprojected before the geometry is scaled, using the default transformation.

Scaling a MapPoint using the same location for the origin parameter returns a MapPoint with the same values as the input.

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. 0 or 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. Scale factors of -1 reflect the geometry across the axes of the origin point without changing the size.

Supports true curves.

See Also
Move(Geometry, System.Double, System.Double)
Rotate(Geometry, System.Double, MapPoint)
ScaleSelectedElement(Double, Double, MapPoint)

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.3 - 200.7
.NET200.3 - 200.7
.NET Windows200.3 - 200.7
.NET Android200.3 - 200.7
.NET iOS200.3 - 200.7
.NET Framework200.3 - 200.7
UWP200.3 - 200.7
In This Article
Back to top Copyright © 2022 Esri.