public void SetCursorPosition(Point value, bool invalidate) { if (cursorPosition != value) { Point pos = cursorPosition; cursorPosition = value; cursorPosition.Restrict(new Rectangle(CurrentPage.Canvas.Size)); if (SelectedTool != null) { SelectedTool.OnSetCursorPosition(pos, cursorPosition, invalidate); } OnCursorPositionChanged(EventArgs.Empty); } }