Beispiel #1
0
        public void ReverseTestDisposed()
        {
            // Arrange
            ViewingConditions conditions = new ViewingConditions
            {
                whitePoint = Colorimetric.D50_XYZ,
                Yb         = 1.0,
                La         = 0.0,
                surround   = Surround.Dark,
                D_value    = 0.75
            };
            CIEXYZ xyz = new CIEXYZ {
                X = 0.8322, Y = 1.0, Z = 0.7765
            };

            using (var cam02 = CAM02.Create(null, conditions))
            {
                cam02.Forward(xyz, out JCh jch);

                // Act
                cam02.Dispose();

                // Assert
                Assert.ThrowsException <ObjectDisposedException>(() => cam02.Reverse(jch, out CIEXYZ xyz2));
            }
        }
Beispiel #2
0
        public void ReverseTest()
        {
            // Arrange
            IntPtr            plugin     = IntPtr.Zero;
            IntPtr            userData   = IntPtr.Zero;
            ViewingConditions conditions = new ViewingConditions
            {
                whitePoint = Colorimetric.D50_XYZ,
                Yb         = 1.0,
                La         = 0.0,
                surround   = Surround.Dark,
                D_value    = 0.75
            };
            CIEXYZ xyz = new CIEXYZ {
                X = 0.8322, Y = 1.0, Z = 0.7765
            };

            using (var context = Context.Create(plugin, userData))
                using (var cam02 = CAM02.Create(context, conditions))
                {
                    cam02.Forward(xyz, out JCh jch);

                    // Act
                    cam02.Reverse(jch, out CIEXYZ xyz2);

                    // Assert
                }
        }
Beispiel #3
0
        public void CreateTest()
        {
            // Arrange
            IntPtr            plugin     = IntPtr.Zero;
            IntPtr            userData   = IntPtr.Zero;
            ViewingConditions conditions = new ViewingConditions
            {
                whitePoint = Colorimetric.D50_XYZ,
                Yb         = 1.0,
                La         = 0.0,
                surround   = Surround.Dark,
                D_value    = 0.75
            };

            // Act
            using (var context = Context.Create(plugin, userData))
                using (var cam02 = CAM02.Create(context, conditions))
                {
                    // Assert
                    Assert.IsNotNull(cam02);
                }
        }