Exemplo n.º 1
0
            public static _Rectangle Intersect(_Rectangle rectangle1, _Rectangle rectangle2)
            {
                HorizontalLine horizontal;
                VerticalLine   vertical;

                horizontal = HorizontalLine.Intersect(rectangle1.Horizontal, rectangle2.Horizontal);
                if (horizontal.IsEmpty)
                {
                    return(Empty);
                }
                vertical = VerticalLine.Intersect(rectangle1.Vertical, rectangle2.Vertical);
                return(vertical.IsEmpty ? Empty : new _Rectangle(horizontal, vertical));
            }