Ejemplo n.º 1
0
        private static ColorMatrix CreateCombinedTestFilterMatrix()
        {
            ColorMatrix brightness = KnownFilterMatrices.CreateBrightnessFilter(0.9F);
            ColorMatrix hue        = KnownFilterMatrices.CreateHueFilter(180F);
            ColorMatrix saturation = KnownFilterMatrices.CreateSaturateFilter(1.5F);

            return(brightness * hue * saturation);
        }
Ejemplo n.º 2
0
        private static Matrix4x4 CreateCombinedTestFilterMatrix()
        {
            Matrix4x4 brightness = KnownFilterMatrices.CreateBrightnessFilter(0.9F);
            Matrix4x4 hue        = KnownFilterMatrices.CreateHueFilter(180F);
            Matrix4x4 saturation = KnownFilterMatrices.CreateSaturateFilter(1.5F);
            Matrix4x4 m          = brightness * hue * saturation;

            return(m);
        }
Ejemplo n.º 3
0
        public void ColorMatrixEquality()
        {
            ColorMatrix m   = KnownFilterMatrices.CreateHueFilter(45F);
            ColorMatrix m2  = KnownFilterMatrices.CreateHueFilter(45F);
            object      obj = m2;

            Assert.True(m.Equals(obj));
            Assert.True(m.Equals(m2));
            Assert.True(m == m2);
            Assert.False(m != m2);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HueProcessor"/> class.
 /// </summary>
 /// <param name="degrees">The angle of rotation in degrees</param>
 public HueProcessor(float degrees)
     : base(KnownFilterMatrices.CreateHueFilter(degrees))
 {
     this.Degrees = degrees;
 }
Ejemplo n.º 5
0
 public void Filter_rect_CorrectProcessor()
 {
     this.operations.Filter(KnownFilterMatrices.AchromatomalyFilter * KnownFilterMatrices.CreateHueFilter(90F), this.rect);
     this.Verify <FilterProcessor>(this.rect);
 }
Ejemplo n.º 6
0
 public void Filter_CorrectProcessor()
 {
     this.operations.Filter(KnownFilterMatrices.AchromatomalyFilter * KnownFilterMatrices.CreateHueFilter(90F));
     FilterProcessor <Rgba32> p = this.Verify <FilterProcessor <Rgba32> >();
 }