Ejemplo n.º 1
0
 internal Box(int x1, int y1, int x2, int y2, FocusAreaType type, bool failed)
 {
     this.x1      = x1;
     this.y1      = y1;
     this.x2      = x2;
     this.y2      = y2;
     props.Type   = type;
     props.Failed = failed;
 }
Ejemplo n.º 2
0
        public void AddBox(int x1, int y1, int x2, int y2, FocusAreaType type, bool failed)
        {
            var box = new Box(x1, y1, x2, y2, type, failed);

            hashcode = (hashcode * 397) ^ box.GetHashCode();
            box.Fix(focusPointShift);
            if (box.X1 >= 0 && box.X1 <= 1 && box.X2 >= 0 && box.X2 <= 1 && box.Y1 >= 0 && box.Y1 <= 1 && box.Y1 >= 0 && box.Y2 <= 1 && box.X2 >= box.X1 && box.Y2 >= box.Y1)
            {
                boxes.Add(box);
            }
        }