예제 #1
0
 public House(Point mouseLocation)
 {
     Middle    = mouseLocation;
     Rectangle = MyRectangle.GetMyRectangle(Middle);
     Roof      = MyTriangle.GetMyTriangle(Rectangle);
     Start     = Rectangle.Start;
     Width     = Rectangle.Width;
     Height    = Rectangle.Height + Roof.Height;
 }
예제 #2
0
 public House(Point start, Point middle)
 {
     Start     = start;
     Middle    = middle;
     Rectangle = MyRectangle.GetMyRectangle(Start, Middle);
     Roof      = MyTriangle.GetMyTriangle(Rectangle);
     Width     = Rectangle.Width;
     Height    = Rectangle.Height + Roof.Height;
 }
예제 #3
0
        public static MyTriangle GetMyTriangle(MyRectangle rect)
        {
            var triangle = new MyTriangle(rect);

            return(triangle);
        }
예제 #4
0
 private MyTriangle(MyRectangle rect)
 {
     Start  = rect.Start;
     Width  = rect.Width;
     Height = rect.Middle.Y - rect.Height;
 }
예제 #5
0
        public static MyRectangle GetMyRectangle(Point start, Point middle)
        {
            var rect = new MyRectangle(start, middle);

            return(rect);
        }