Transitions: Wipe (left-to-right reveal), added to the App Settings picker
Test: WipeTransitionTests. Not pushed.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System.Linq;
|
||||
using Xunit;
|
||||
using ytLive.Services;
|
||||
|
||||
namespace ytLive.Tests;
|
||||
|
||||
public class WipeTransitionTests
|
||||
{
|
||||
[Fact]
|
||||
public void Wipe_At_Half_Reveals_The_New_Scene_On_The_Left_Half()
|
||||
{
|
||||
var transition = new TransitionService();
|
||||
var to = new VideoFrame(4, 1, Enumerable.Repeat((byte)255, 16).ToArray());
|
||||
var from = new VideoFrame(4, 1, new byte[16]);
|
||||
|
||||
transition.Start(TransitionType.Wipe, 300, from);
|
||||
transition.Tick(150);
|
||||
var blended = transition.BlendFrame(to);
|
||||
|
||||
Assert.Equal((byte)255, blended.BgraPixels[0]);
|
||||
Assert.Equal((byte)255, blended.BgraPixels[4]);
|
||||
Assert.Equal((byte)0, blended.BgraPixels[8]);
|
||||
Assert.Equal((byte)0, blended.BgraPixels[12]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user