public GroupBox(IList <IBaseShape> shapes) { Boxes = new ShapeBox[shapes.Count]; for (int i = 0; i < shapes.Count; i++) { Boxes[i] = new ShapeBox(shapes[i]); } Bounds = new Box(); Update(); }
public static int CompareLeft(ShapeBox box1, ShapeBox box2) { return((box1.Bounds.Left > box2.Bounds.Left) ? 1 : ((box1.Bounds.Left < box2.Bounds.Left) ? -1 : 0)); }
public static int CompareHeight(ShapeBox box1, ShapeBox box2) { return((box1.Bounds.Height > box2.Bounds.Height) ? 1 : ((box1.Bounds.Height < box2.Bounds.Height) ? -1 : 0)); }
public static int CompareWidth(ShapeBox box1, ShapeBox box2) { return((box1.Bounds.Width > box2.Bounds.Width) ? 1 : ((box1.Bounds.Width < box2.Bounds.Width) ? -1 : 0)); }
public static int CompareCenterY(ShapeBox box1, ShapeBox box2) { return((box1.Bounds.CenterY > box2.Bounds.CenterY) ? 1 : ((box1.Bounds.CenterY < box2.Bounds.CenterY) ? -1 : 0)); }
public static int CompareBottom(ShapeBox box1, ShapeBox box2) { return((box1.Bounds.Bottom > box2.Bounds.Bottom) ? 1 : ((box1.Bounds.Bottom < box2.Bounds.Bottom) ? -1 : 0)); }
public static int CompareTop(ShapeBox box1, ShapeBox box2) { return((box1.Bounds.Top > box2.Bounds.Top) ? 1 : ((box1.Bounds.Top < box2.Bounds.Top) ? -1 : 0)); }