Transitions: Wipe (left-to-right reveal), added to the App Settings picker

Test: WipeTransitionTests. Not pushed.
This commit is contained in:
2026-10-27 09:12:59 -07:00
parent f67a263ccd
commit b86b6bb601
4 changed files with 52 additions and 2 deletions
+25
View File
@@ -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]);
}
}