same problem.. workaround:
[set OnMouseMove(point)<>Origin(point)] and before the OnMouseDown event to wake up rotateTracker mechanism..
try this:
public override void OnMouseDown(int Button, int Shift, int X, int Y)
{
InitializeTracker();
if (this.rotateTracker != null)
{
var hitPoint = this.m_hookHelper.ActiveView..ScreenDisplay.DisplayTransformation.ToMapPoint(x, y);
this.rotateTracker.OnMouseMove(hitPoint);
this.rotateTracker.OnMouseDown();
}
m_bMouseDownOccurred = true;
}
I believe the Origin and first OnMouseMove() point are specifying the '0-degree' vector wrt to feedback (not sure about the actual angle).
e.g.
public override void OnMouseDown( int BUTTON, int SHIFT, int X, int Y )
{
if( App.EngineEditor.SelectionCount < 1 ) return;
var pt = Hook.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y);
RotateTracker = new RotateTrackerClass();
RotateTracker.Display = Hook.ActiveView.ScreenDisplay;
RotateTracker.Origin = pt;
RotateTracker.ClearGeometry();
// ... for each feature ... RotateTracker.AddGeometry(f.ShapeCopy);
// specify point away from Origin to define 0-degree vector
pt.Y += 10;
RotateTracker.OnMouseMove(pt);
RotateTracker.OnMouseDown();
}
You may also want to add all features in OnMouseDown to a SetClass and then iterate through the set and call IFeatureEdit.RotateSet() to mass rotate in OnMouseUp. Using ITransform2D.Rotate() doesn't seem to handle anno properly (rotates feature polygon, not element) whereas RotateSet does.
If you use IFeatureEdit.RotateSet() make sure to read the doc's first:
http://edndoc.esri.com/arcobjects/9.1/ComponentHelp/esriGeoDatabase/IFeatureEdit.htm