예제 #1
0
        public void TestMarginsRemoved()
        {
            var s = new QRect();

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

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

            var newR = s.MarginsRemoved(mar);

            Assert.AreEqual(100, newR.Left);
            Assert.AreEqual(250, newR.Top);
            Assert.AreEqual(450, newR.Right);
            Assert.AreEqual(300, newR.Bottom);
        }
예제 #2
0
파일: QRectTests.cs 프로젝트: nanox/QtSharp
        public void TestMarginsRemoved()
        {
            var s = new QRect();
            s.Left = 50;
            s.Top = 150;
            s.Right = 600;
            s.Bottom = 500;

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

            var newR = s.MarginsRemoved(mar);

            Assert.AreEqual(100, newR.Left);
            Assert.AreEqual(250, newR.Top);
            Assert.AreEqual(450, newR.Right);
            Assert.AreEqual(300, newR.Bottom);
        }