private QRect CannonRect() { QRect result = new QRect(0, 0, 50, 50); result.MoveBottomLeft(Rect.BottomLeft()); return(result); }
public void TestMoveBottomLeft() { var s = new QRect(); s.X = 50; s.Y = 100; s.Width = 500; s.Height = 600; s.MoveBottomLeft(new QPoint(100, 600)); Assert.AreEqual(500, s.Width); Assert.AreEqual(600, s.Height); Assert.AreEqual(100, s.X); Assert.AreEqual(1, s.Y); }