示例#1
0
		public void Center_ShouldBeCentered()
		{
            float size = 200;
            var rect = new BasicRectangle(0, 0, size, size);
            var point = rect.Center();

            Assert.AreEqual(point.X, size / 2f);
            Assert.AreEqual(point.Y, size / 2f);
		}
示例#2
0
 public void DrawEllipsis(BasicRectangle rectangle, BasicBrush brush, BasicPen pen)
 {
     _context.DrawEllipse(GenericControlHelper.ToSolidColorBrush(brush), GenericControlHelper.ToPen(pen), GenericControlHelper.ToPoint(rectangle.Center()), rectangle.Width / 2, rectangle.Height / 2);
 }