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); }
public void MultiplyFunction <TPixel>(TestPixel <TPixel> back, TestPixel <TPixel> source, float amount, TestPixel <TPixel> expected) where TPixel : struct, IPixel <TPixel> { TPixel actual = PorterDuffFunctions.MultiplySrcOver(back.AsPixel(), source.AsPixel(), amount); VectorAssert.Equal(expected.AsPixel(), actual, 2); }
public void HardLightFunction <TPixel>(TestPixel <TPixel> back, TestPixel <TPixel> source, float amount, TestPixel <TPixel> expected) where TPixel : unmanaged, IPixel <TPixel> { TPixel actual = PorterDuffFunctions.HardLightSrcOver(back.AsPixel(), source.AsPixel(), amount); VectorAssert.Equal(expected.AsPixel(), actual, 2); }
public void MultiplyFunctionBlenderBulk <TPixel>(TestPixel <TPixel> back, TestPixel <TPixel> source, float amount, TestPixel <TPixel> expected) where TPixel : struct, IPixel <TPixel> { var dest = new Span <TPixel>(new TPixel[1]); new DefaultPixelBlenders <TPixel> .MultiplySrcOver().Blend(this.Configuration, dest, back.AsSpan(), source.AsSpan(), AsSpan(amount)); VectorAssert.Equal(expected.AsPixel(), dest[0], 2); }