public void CreateMax()
        {
            TestRuntime.AssertXcodeVersion(7, 3);

            var first = new CGColorConverterTriple()
            {
                Space     = CGColorSpace.CreateGenericRgb(),
                Intent    = CGColorRenderingIntent.Default,
                Transform = CGColorConverterTransformType.ApplySpace
            };
            var second = new CGColorConverterTriple()
            {
                Space     = CGColorSpace.CreateGenericGray(),
                Intent    = CGColorRenderingIntent.Perceptual,
                Transform = CGColorConverterTransformType.FromSpace
            };
            var third = new CGColorConverterTriple()
            {
                Space     = CGColorSpace.CreateGenericXyz(),
                Intent    = CGColorRenderingIntent.Saturation,
                Transform = CGColorConverterTransformType.ToSpace
            };

            using (var converter = new CGColorConverter(null, first, first, first)) {
                Assert.That(converter.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle");
            }
        }
        public void CreateSimple()
        {
            TestRuntime.AssertXcodeVersion(7, 3);

            using (var from = CGColorSpace.CreateGenericGray())
                using (var to = CGColorSpace.CreateGenericRgb())
                    using (var converter = new CGColorConverter(from, to)) {
                        Assert.That(converter.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle");
                    }
        }
Example #3
0
        public void CreateSimple()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(9, 3))
            {
                Assert.Ignore("requires iOS 9.3+");
            }

            using (var from = CGColorSpace.CreateGenericGray())
                using (var to = CGColorSpace.CreateGenericRgb())
                    using (var converter = new CGColorConverter(from, to)) {
                        Assert.That(converter.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle");
                    }
        }
        public void CreateDual()
        {
            TestRuntime.AssertXcodeVersion(7, 3);

            var triple = new CGColorConverterTriple()
            {
                Space     = CGColorSpace.CreateGenericRgb(),
                Intent    = CGColorRenderingIntent.Default,
                Transform = CGColorConverterTransformType.ApplySpace
            };

            using (var converter = new CGColorConverter(null, triple, triple)) {
                Assert.That(converter.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle");
            }
        }
Example #5
0
        public void CreateDual()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(9, 3))
            {
                Assert.Ignore("requires iOS 9.3+");
            }

            var triple = new CGColorConverterTriple()
            {
                Space     = CGColorSpace.CreateGenericRgb(),
                Intent    = CGColorRenderingIntent.Default,
                Transform = CGColorConverterTransformType.ApplySpace
            };

            using (var converter = new CGColorConverter(null, triple, triple)) {
                Assert.That(converter.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle");
            }
        }