示例#1
0
        public void TwoItemPolygonCountTest()
        {
            var square = new VertexStorage();

            square.MoveTo(0, 0);
            square.LineTo(100, 0);
            square.LineTo(100, 100);
            square.LineTo(0, 100);
            square.ClosePolygon();

            var result = square.CombineWith(new Ellipse(Vector2.Zero, 10));

            var polygons = result.CreatePolygons();

            Assert.AreEqual(2, polygons.Count, "Two polygons should be create for a combined square and ellipse");
        }