Gets or sets the size to which the image overlay is scaled.

Namespace:  ESRI.ArcGISExplorer.Mapping

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public Size ScalingSize { get; set; }
Visual Basic (Declaration)
Public Property ScalingSize As Size

Field Value

An ordered pair of integers that represent the width and height of the image overlay.

Remarks

If LockAspectRatio is true, the original proportions of the image are maintained when the size changes. For example, if an image is 200 x 100 you can set the ScalingSize to 400,400, but since the aspect ratio is locked the width:height ratio is maintained and the resultant image has the dimensions 400 x 200. If LockAspectRatio is false, the proportions of the image are not maintained and the image is stretched to the size that you specify (which will usually distort the image unless the aspect ratio of the original image matches the aspect ratio of the specified scaling size).

Examples

CopyC#
Map myMap = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map;

//Create a new image overlay from an existing PNG file
ImageOverlay imgOverlay = new ImageOverlay("Logo", "C:\\Images\\Logo.png");

//Add the new image overlay to the Map
myMap.ChildItems.Add(imgOverlay);

//LockAspectRatio is true by default.
imgOverlay.LockAspectRatio = false;
//Note that since LockAspectRatio is false, the original proportions of the image are not maintained when using ScalingSize.
imgOverlay.ScalingSize = new Size(90, 120);
//Set a specific color in the image overlay as transparent.
imgOverlay.MakeTransparent(Color.Black);
CopyVB.NET
Dim myMap As Map = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map

'Create a new image overlay from an existing PNG file
Dim imgOverlay As ImageOverlay = New ImageOverlay("Logo", "C:\Images\Logo.png")

'Add the new image overlay to the Map
myMap.ChildItems.Add(imgOverlay)

'LockAspectRatio is true by default.
imgOverlay.LockAspectRatio = False
'Note that since LockAspectRatio is false, the original proportions of the image are not maintained when using ScalingSize.
imgOverlay.ScalingSize = New Size(90, 120)
'Set a specific color in the image overlay as transparent.
imgOverlay.MakeTransparent(Color.Black)

See Also