Exemple #1
0
        public void TestTranslateWithInt()
        {
            var s = new QLineF(5.0, 5.0, 10.0, 10.0);

            s.Translate(5, 5);

            Assert.AreEqual(10.0, s.X1);
            Assert.AreEqual(10.0, s.Y1);

            Assert.AreEqual(15.0, s.X2);
            Assert.AreEqual(15.0, s.Y2);
        }
Exemple #2
0
        public void TestTranslateWithPoint()
        {
            using (var s = new QLineF(5.0, 5.0, 10.0, 10.0))
            {
                s.Translate(new QPointF(5.0, 5.0));

                Assert.AreEqual(10.0, s.X1);
                Assert.AreEqual(10.0, s.Y1);

                Assert.AreEqual(15.0, s.X2);
                Assert.AreEqual(15.0, s.Y2);
            }
        }
Exemple #3
0
        public void TestTranslateWithPoint()
        {
            using (var s = new QLineF(5.0, 5.0, 10.0, 10.0))
            {
                s.Translate(new QPointF(5.0, 5.0));

                Assert.AreEqual(10.0, s.X1);
                Assert.AreEqual(10.0, s.Y1);

                Assert.AreEqual(15.0, s.X2);
                Assert.AreEqual(15.0, s.Y2);
            }
        }
Exemple #4
0
        public void TestTranslateWithInt()
        {
            var s = new QLineF(5.0, 5.0, 10.0, 10.0);
            s.Translate(5, 5);

            Assert.AreEqual(10.0, s.X1);
            Assert.AreEqual(10.0, s.Y1);

            Assert.AreEqual(15.0, s.X2);
            Assert.AreEqual(15.0, s.Y2);
        }