예제 #1
0
        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();
        }
예제 #2
0
파일: ShapeBox.cs 프로젝트: bangush/Core2D
 public static int CompareLeft(ShapeBox box1, ShapeBox box2)
 {
     return((box1.Bounds.Left > box2.Bounds.Left) ? 1 : ((box1.Bounds.Left < box2.Bounds.Left) ? -1 : 0));
 }
예제 #3
0
파일: ShapeBox.cs 프로젝트: bangush/Core2D
 public static int CompareHeight(ShapeBox box1, ShapeBox box2)
 {
     return((box1.Bounds.Height > box2.Bounds.Height) ? 1 : ((box1.Bounds.Height < box2.Bounds.Height) ? -1 : 0));
 }
예제 #4
0
파일: ShapeBox.cs 프로젝트: bangush/Core2D
 public static int CompareWidth(ShapeBox box1, ShapeBox box2)
 {
     return((box1.Bounds.Width > box2.Bounds.Width) ? 1 : ((box1.Bounds.Width < box2.Bounds.Width) ? -1 : 0));
 }
예제 #5
0
파일: ShapeBox.cs 프로젝트: bangush/Core2D
 public static int CompareCenterY(ShapeBox box1, ShapeBox box2)
 {
     return((box1.Bounds.CenterY > box2.Bounds.CenterY) ? 1 : ((box1.Bounds.CenterY < box2.Bounds.CenterY) ? -1 : 0));
 }
예제 #6
0
파일: ShapeBox.cs 프로젝트: bangush/Core2D
 public static int CompareBottom(ShapeBox box1, ShapeBox box2)
 {
     return((box1.Bounds.Bottom > box2.Bounds.Bottom) ? 1 : ((box1.Bounds.Bottom < box2.Bounds.Bottom) ? -1 : 0));
 }
예제 #7
0
파일: ShapeBox.cs 프로젝트: bangush/Core2D
 public static int CompareTop(ShapeBox box1, ShapeBox box2)
 {
     return((box1.Bounds.Top > box2.Bounds.Top) ? 1 : ((box1.Bounds.Top < box2.Bounds.Top) ? -1 : 0));
 }