ArcGIS Explorer Component Help |
ImageOverlay..::.MakeTransparent Method |
ImageOverlay Class Example See Also |
Makes the specified color transparent for the image overlay.
Namespace:
ESRI.ArcGISExplorer.MappingAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public void MakeTransparent( Color transparentColor ) |
Visual Basic (Declaration) |
---|
Public Sub MakeTransparent ( _ transparentColor As Color _ ) |
Parameters
- transparentColor
- Type: System.Drawing..::.Color
The Color structure that represents the color to make transparent.
Remarks
Named colors are represented by using the properties of the Color structure. For more information about these colors, see Colors by Name in the MSDN Library.
You may only set one color at a time transparent for the image overlay.
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)