示例#1
0
        public void NormalBlendFunction_Blender <TPixel>(TestPixel <TPixel> back, TestPixel <TPixel> source, float amount, TestPixel <TPixel> expected)
            where TPixel : struct, IPixel <TPixel>
        {
            TPixel actual = new DefaultPixelBlenders <TPixel> .Normal().Blend(back, source, amount);

            VectorAssert.Equal(expected, actual, 2);
        }
        public void MultiplyFunctionBlender <TPixel>(TestPixel <TPixel> back, TestPixel <TPixel> source, float amount, TestPixel <TPixel> expected)
            where TPixel : struct, IPixel <TPixel>
        {
            TPixel actual = new DefaultPixelBlenders <TPixel> .MultiplySrcOver().Blend(back.AsPixel(), source.AsPixel(), amount);

            VectorAssert.Equal(expected.AsPixel(), actual, 2);
        }
示例#3
0
        public void HardLightFunctionBlender <TPixel>(TestPixel <TPixel> back, TestPixel <TPixel> source, float amount, TestPixel <TPixel> expected)
            where TPixel : unmanaged, IPixel <TPixel>
        {
            TPixel actual = new DefaultPixelBlenders <TPixel> .HardLightSrcOver().Blend(back.AsPixel(), source.AsPixel(), amount);

            VectorAssert.Equal(expected.AsPixel(), actual, 2);
        }