/* /// <summary> /// Sets the current parsetree and updates the overlay. /// </summary> /// <param name="t">The new parsetree.</param> /// <param name="tBB">The new bounding box.</param> public void SetParseTree(Tikz_ParseTree t, Rect tBB) { BB = tBB; ParseTree = t; //curSel = null; //curDragged = null; Resolution = Resolution; // to recalc size ActivateDefaultTool(); // to reset current tool RedrawObjects(); } */ #region Events forwarded to Current tool private void canvas1_MouseMove(object sender, MouseEventArgs e) { Point mousep = e.GetPosition(canvas1); // convert to bottom left coordinates Point p = new Point(mousep.X, Height - mousep.Y); TEMouseArgs ee = e.ToTEMouseArgs(); TheModel.CurrentTool.OnMouseMove(p, ee); e.Handled = ee.Handled; // display the current mouse position /* p.Y /= Resolution; p.X /= Resolution; p.X += BB.X; p.Y += BB.Y; String s = "(" + String.Format("{0:f1}", p.X) + "; " + String.Format("{0:f1}", p.Y) + ")"; ((MainWindow)Application.Current.Windows[0]).AddStatusBarCoordinate(s); */ }