public void CreateMax()
        {
            TestRuntime.AssertXcodeVersion(8, 0);

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

            using (var converter = new CGColorConversionInfo((NSDictionary)null, first, first, first)) {
                Assert.That(converter.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle");
            }
        }
Exemplo n.º 2
0
        public void CreateMax()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(9, 3))
            {
                Assert.Ignore("requires iOS 9.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");
            }
        }