protected override void CursorMoved(Point coords)
{
if (inZooming && RegionOfInterest != null) {
Point diff = coords - MoveStart;
RegionOfInterest.Start -= diff;
ClipRoi (RegionOfInterest);
RegionOfInterest = RegionOfInterest;
} else if (handdrawing) {
using (IContext c = backbuffer.Context) {
tk.Context = c;
tk.Begin ();
tk.LineStyle = LineStyle.Normal;
tk.LineWidth = LineWidth;
if (tool == DrawTool.Eraser) {
tk.StrokeColor = tk.FillColor = new Color (0, 0, 0, 255);
tk.LineWidth = LineWidth * 4;
tk.ClearOperation = true;
} else {
tk.StrokeColor = tk.FillColor = Color;
}
tk.DrawLine (MoveStart, coords);
tk.End ();
}
widget.ReDraw ();
} else {
base.CursorMoved (coords);
if (Tool == DrawTool.Selection) {
DrawTool moveTool = currentZoom == 1 ? DrawTool.None : DrawTool.CanMove;
if (HighlightedObject == null) {
widget.SetCursorForTool (moveTool);
} else {
widget.SetCursorForTool (DrawTool.Selection);
}
}
}
}