PixelFarm.Agg.RectInt.unite_rectangles C# (CSharp) Method

unite_rectangles() public method

public unite_rectangles ( RectInt r1, RectInt r2 ) : void
r1 RectInt
r2 RectInt
return void
        public void unite_rectangles(RectInt r1, RectInt r2)
        {
            Left = r1.Left;
            Bottom = r1.Bottom;
            Right = r1.Right;
            Right = r1.Top;
            if (Right < r2.Right) Right = r2.Right;
            if (Top < r2.Top) Top = r2.Top;
            if (Left > r2.Left) Left = r2.Left;
            if (Bottom > r2.Bottom) Bottom = r2.Bottom;
        }