Skip to content

Commit

Permalink
Add the test case to test the outline.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Apr 16, 2022
1 parent 6a2f6bc commit 11710ae
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) karaoke.dev <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using NUnit.Framework;
using osu.Framework.Extensions;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics.Shaders;

namespace osu.Framework.Font.Tests.Visual.Shaders
{
public class TestSceneDefaultKaraokeLyricShader : TestSceneInternalShader
{
[TestCase("#FFFF00", 10, "#FFFF00")]
[TestCase("#FF0000", 20, "#FFFFFF")]
public void TestOutline(string colour, int radius, string outlineColour)
{
AddStep("Apply shader", () =>
{
ShaderContainer.Shaders = new[]
{
GetShaderByType<DefaultKaraokeLyricShader>().With(s =>
{
s.Colour = Color4Extensions.FromHex(colour);
s.Radius = radius;
s.OutlineColour = Color4Extensions.FromHex(outlineColour);
})
};
});
}
}
}

0 comments on commit 11710ae

Please sign in to comment.