C# Class CustomUIElements.AddGraphicsTool

Inheritance: ESRI.ArcGIS.Desktop.AddIns.Tool
显示文件 Open project: Esri/arcobjects-sdk-community-samples

Public Methods

Method Description
AddGraphicToMap ( IMap map, IGeometry geometry, IRgbColor rgbColor, IRgbColor outlineRgbColor ) : void

Draw a specified graphic on the map using the supplied colors.

Calling this function will not automatically make the graphics appear in the map area. Refresh the map area after calling this function with Methods like IActiveView.Refresh or IActiveView.PartialRefresh.

AddGraphicsTool ( ) : System
GetPolylineFromMouseClicks ( IActiveView activeView ) : IPolyline

Create a polyline geometry object using the RubberBand.TrackNew method when a user click the mouse on the map control.

Double click the left mouse button to end tracking the polyline.

Protected Methods

Method Description
OnMouseDown ( MouseEventArgs arg ) : void
OnUpdate ( ) : void

Method Details

AddGraphicToMap() public method

Draw a specified graphic on the map using the supplied colors.
Calling this function will not automatically make the graphics appear in the map area. Refresh the map area after calling this function with Methods like IActiveView.Refresh or IActiveView.PartialRefresh.
public AddGraphicToMap ( IMap map, IGeometry geometry, IRgbColor rgbColor, IRgbColor outlineRgbColor ) : void
map IMap An IMap interface.
geometry IGeometry An IGeometry interface. It can be of the geometry type: esriGeometryPoint, esriGeometryPolyline, or esriGeometryPolygon.
rgbColor IRgbColor An IRgbColor interface. The color to draw the geometry.
outlineRgbColor IRgbColor An IRgbColor interface. For those geometry's with an outline it will be this color.
return void

AddGraphicsTool() public method

public AddGraphicsTool ( ) : System
return System

GetPolylineFromMouseClicks() public method

Create a polyline geometry object using the RubberBand.TrackNew method when a user click the mouse on the map control.
Double click the left mouse button to end tracking the polyline.
public GetPolylineFromMouseClicks ( IActiveView activeView ) : IPolyline
activeView IActiveView An ESRI.ArcGIS.Carto.IActiveView interface that will user will interact with to draw a polyline.
return IPolyline

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs arg ) : void
arg MouseEventArgs
return void

OnUpdate() protected method

protected OnUpdate ( ) : void
return void