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); }
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); }