private Position CheckHotSpot(MouseEventArgs e) { Point pt = e.Location; Point[] hots = RectTracker.GetPointsFromRect(Boundary); bool[] check = new bool[8]; check[0] = CheckPointAt(hots[0], pt, PointAtPosition.TopLeft, ref PointAt, ref hotPoint); //check[1] = CheckPointAt(hots[1], pt, PointAtPosition.TopMiddle, ref PointAt, ref hotPoint); check[2] = CheckPointAt(hots[2], pt, PointAtPosition.TopRight, ref PointAt, ref hotPoint); //check[3] = CheckPointAt(hots[3], pt, PointAtPosition.RightMiddle, ref PointAt, ref hotPoint); check[4] = CheckPointAt(hots[4], pt, PointAtPosition.RightBottom, ref PointAt, ref hotPoint); //check[5] = CheckPointAt(hots[5], pt, PointAtPosition.BottomMiddle, ref PointAt, ref hotPoint); check[6] = CheckPointAt(hots[6], pt, PointAtPosition.BottomLeft, ref PointAt, ref hotPoint); //check[7] = CheckPointAt(hots[7], pt, PointAtPosition.LeftMidlle, ref PointAt, ref hotPoint); foreach (bool p in check) { if (p == true) { return(Position.Corner); } } if (Boundary.Contains(pt)) { return(Position.Center); } return(Position.Nothing); }
internal void DrawSelected(PaintEventArgs e) { RectTracker.DrawPoints(e, bounds); }