System.Drawing.PrimitivesTest.RectangleFTests.InflateTest C# (CSharp) Method

InflateTest() private method

private InflateTest ( float x, float y, float width, float height ) : void
x float
y float
width float
height float
return void
        public void InflateTest(float x, float y, float width, float height)
        {
            RectangleF rect = new RectangleF(x, y, width, height);
            RectangleF inflatedRect = new RectangleF(x - width, y - height, width + 2 * width, height + 2 * height);

            rect.Inflate(width, height);
            Assert.Equal(inflatedRect, rect);

            SizeF s = new SizeF(x, y);
            inflatedRect = RectangleF.Inflate(rect, x, y);

            rect.Inflate(s);
            Assert.Equal(inflatedRect, rect);
        }