Example #1
0
        public GroupBox(IList <BaseShapeViewModel> shapes)
        {
            Boxes = new ShapeBox[shapes.Count];

            for (int i = 0; i < shapes.Count; i++)
            {
                Boxes[i] = new ShapeBox(shapes[i]);
            }

            Bounds = new Box();

            Update();
        }
Example #2
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));
 }
Example #3
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));
 }
Example #4
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));
 }
Example #5
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));
 }
Example #6
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));
 }
Example #7
0
 public static int CompareLeft(ShapeBox box1, ShapeBox box2)
 {
     return((box1.Bounds.Left > box2.Bounds.Left) ? 1 : ((box1.Bounds.Left < box2.Bounds.Left) ? -1 : 0));
 }