AnsweredAssumed Answered

Making point move to right or left using ArcObjects?

Question asked by fajar60 on Feb 2, 2017

I want to make a point and the point can move to the right or left. To make the point I can handle it , but I can already confused in the movement of the point.

this code to draw point

public void DrawPoint(ESRI.ArcGIS.Carto.IActiveView activeView, System.Int32 x, System.Int32 y)
{
if (activeView == null)
{
return;
}

ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = activeView.ScreenDisplay;
screenDisplay.StartDrawing(screenDisplay.hDC, (System.Int16)ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache);
ESRI.ArcGIS.Display.ISimpleMarkerSymbol simpleMarkerSymbol = new ESRI.ArcGIS.Display.SimpleMarkerSymbol();
ESRI.ArcGIS.Display.ISymbol symbol = simpleMarkerSymbol as ESRI.ArcGIS.Display.ISymbol;
screenDisplay.SetSymbol(symbol);
ESRI.ArcGIS.Display.IDisplayTransformation displayTransformation = screenDisplay.DisplayTransformation;
ESRI.ArcGIS.Geometry.IPoint point = displayTransformation.ToMapPoint(x, y);
screenDisplay.DrawPoint(point);
screenDisplay.FinishDrawing();
}

Outcomes