LibGfx: Round values in Color::with_opacity()

`svg-gradient-userSpaceOnUse` is now rendered to something closer to
what firefox does, so it is at least some progress.
This commit is contained in:
Lucas CHOLLET 2024-11-17 14:19:49 -05:00 committed by Sam Atkins
commit 248e4bb517
Notes: github-actions[bot] 2024-11-21 12:00:54 +00:00
4 changed files with 3 additions and 2 deletions

View file

@ -25,5 +25,6 @@ TEST_CASE(all_green)
TEST_CASE(hsv)
{
EXPECT_EQ(Color(51, 179, 51), Color::from_hsv(120, 0.714285714, .7));
EXPECT_EQ(Color(51, 179, 51, 128), Color::from_hsv(120, 0.714285714, .7).with_opacity(0.5));
EXPECT_EQ(Color(87, 128, 77), Color::from_hsv(108, 0.4, .5));
}