Exemple #1
0
        public Position PositionOf(Point2D coord)
        {
            Position pos = Position.Inside;

            if (coord.x < this.x0)
            {
                pos |= Position.Left;
            }
            if (coord.x > this.x1)
            {
                pos |= Position.Right;
            }
            if (coord.y < this.y0)
            {
                pos |= Position.Top;
            }
            if (coord.y > this.y1)
            {
                pos |= Position.Bottom;
            }
            return pos;
        }
Exemple #2
0
 public bool IsInside(Point2D coord)
 {
     return PositionOf(coord) == (Position)0;
 }