From 06e3e26eade352d01b249393d8b8176c7abcb6f1 Mon Sep 17 00:00:00 2001 From: Tim Eliseo <667606+teliseo@users.noreply.github.com> Date: Tue, 28 Nov 2023 13:36:06 -0800 Subject: [PATCH] Add checks to BitmapBundle::FromSVG-alpha test to catch lack of SVG premultiply. --- tests/graphics/bmpbundle.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/graphics/bmpbundle.cpp b/tests/graphics/bmpbundle.cpp index 0cacb8f3f0..6154c071d2 100644 --- a/tests/graphics/bmpbundle.cpp +++ b/tests/graphics/bmpbundle.cpp @@ -395,7 +395,9 @@ TEST_CASE("BitmapBundle::FromSVG-alpha", "[bmpbundle][svg][alpha]") // premultiplied storage in wxBitmap) to substantially original straight // alpha pixel values in wxImage, allowing for roundoff error. CHECK( (int)img.GetRed(0, 1) >= 0x3c ); + CHECK( (int)img.GetRed(0, 1) <= 0x3f ); CHECK( (int)img.GetGreen(0, 1) >= 0x7c ); + CHECK( (int)img.GetGreen(0, 1) <= 0x7f); CHECK( (int)img.GetBlue(0, 1) == 0xff ); }