Example #1
0
        public void FromSplinePointsTest()
        {
            TestRuntime.AssertSystemVersion(ApplePlatform.iOS, 8, 0, throwIfOtherPlatform: false);
            TestRuntime.AssertSystemVersion(ApplePlatform.MacOSX, 10, 10, throwIfOtherPlatform: false);

            var pts = new[] {
                new CGPoint(0, 0),
                new CGPoint(320, 568)
            };

            var result = SKShapeNode.FromSplinePoints(pts);

            Assert.IsNotNull(result, "result should not be null");
        }
Example #2
0
        public void FromSplinePointsOffsetTest()
        {
            TestRuntime.AssertSystemVersion(ApplePlatform.iOS, 8, 0, throwIfOtherPlatform: false);
            TestRuntime.AssertSystemVersion(ApplePlatform.MacOSX, 10, 10, throwIfOtherPlatform: false);

            var pts = new [] {
                new CGPoint(0, 0),
                new CGPoint(320, 568)
            };

            var result = SKShapeNode.FromSplinePoints(pts, 1, 1);

            Assert.IsNotNull(result, "result should not be null");

            Assert.Throws <InvalidOperationException> (() => SKShapeNode.FromSplinePoints(pts, 1, 2));
        }
Example #3
0
        public void FromSplinePointsTest()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(8, 0))
            {
                Assert.Ignore("requires iOS8+");
            }

            var pts = new[] {
                new PointF(0, 0),
                new PointF(320, 568)
            };

            var result = SKShapeNode.FromSplinePoints(pts);

            Assert.IsNotNull(result, "result should not be null");
        }
Example #4
0
        public void FromSplinePointsOffsetTest()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(8, 0))
            {
                Assert.Ignore("requires iOS8+");
            }

            var pts = new [] {
                new PointF(0, 0),
                new PointF(320, 568)
            };

            var result = SKShapeNode.FromSplinePoints(pts, 1, 1);

            Assert.IsNotNull(result, "result should not be null");

            Assert.Throws <InvalidOperationException> (() => SKShapeNode.FromSplinePoints(pts, 1, 2));
        }