Пример #1
0
        public void TestMarginsAdded()
        {
            var s = new QRectF();

            s.Left   = 50;
            s.Top    = 150;
            s.Right  = 600;
            s.Bottom = 500;

            var mar = new QMarginsF(50, 100, 150, 200);

            var newR = s.MarginsAdded(mar);

            Assert.AreEqual(100, newR.Left);
            Assert.AreEqual(250, newR.Top);
            Assert.AreEqual(750, newR.Right);
            Assert.AreEqual(700, newR.Bottom);
        }
Пример #2
0
        public void TestMarginsAdded()
        {
            var s = new QRectF();
            s.Left = 50;
            s.Top = 150;
            s.Right = 600;
            s.Bottom = 500;

            var mar = new QMarginsF(50, 100, 150, 200);

            var newR = s.MarginsAdded(mar);

            Assert.AreEqual(0, newR.Left);
            Assert.AreEqual(50, newR.Top);
            Assert.AreEqual(750, newR.Right);
            Assert.AreEqual(700, newR.Bottom);
        }