Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
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;
 }
Ejemplo n.º 3
0
        internal static Point[] GetTrianglePoints(MyTriangle triangle)
        {
            var endPoint = new Point(triangle.Start.X + triangle.Width, triangle.Start.Y);
            var points   = new[]
            {
                triangle.Start, triangle.GetApex(), endPoint
            };

            return(points);
        }
Ejemplo n.º 4
0
        public static MyTriangle GetMyTriangle(MyRectangle rect)
        {
            var triangle = new MyTriangle(rect);

            return(triangle);
        }