Hi,
In the mousemove event I draw the selected feature so the user can see the dimensions of the feature he is moving. For point features this works well, providing the esriROPNotXOrPen setting is set to the ROP2 method of the Symbol object.
For some reason this does not work for polylines and polygons. The feature is not cleared during the move event, it is dragged around the screen.
Does have an idea why this happens?
Here's a portion of the code:
m_Symbol = featureRenderer.get_SymbolByFeature(m_SelectedFeature);
m_Symbol.ROP2 = ESRI.ArcGIS.Display.esriRasterOpCode.esriROPNotXOrPen; //make the first draw normal and the second erase
//create the appropiate displayfeedback object
if (m_SelectedFeature.Shape.GeometryType == esriGeometryType.esriGeometryPoint)
{
m_dispFeed = new MovePointFeedback();
m_dispFeed.Display = m_HookHelper.ActiveView.ScreenDisplay;
IMovePointFeedback mvPtFeed = m_dispFeed as IMovePointFeedback;
//Start the feedback using the input geometry at the current mouse location
mvPtFeed.Symbol = m_Symbol;
mvPtFeed.Start(geomSelect as IPoint, pointMove);
}
else if (m_SelectedFeature.Shape.GeometryType==esriGeometryType.esriGeometryPolyline)
{
m_dispFeed = new MoveLineFeedbackClass();
m_dispFeed.Display = m_HookHelper.ActiveView.ScreenDisplay;
IMoveLineFeedback lineFeedback = m_dispFeed as IMoveLineFeedback;
lineFeedback.Symbol = m_Symbol;
lineFeedback.Start(geomSelect as IPolyline, pointMove);
}
else if (m_SelectedFeature.Shape.GeometryType == esriGeometryType.esriGeometryPolygon)
{
m_dispFeed = new MovePolygonFeedbackClass();
m_dispFeed.Display = m_HookHelper.ActiveView.ScreenDisplay;
IMovePolygonFeedback polygonFeedback = m_dispFeed as IMovePolygonFeedback;
polygonFeedback.Symbol = m_Symbol;
polygonFeedback.Start(geomSelect as IPolygon, pointMove);
}