KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_render_utils.cpp File Reference

Test suite for the generic render utilities in common (render_utils.h). More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <render_utils.h>
#include <vector>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (OpaquePixelIsPreserved)
 
 BOOST_AUTO_TEST_CASE (TransparentPixelHasNoColour)
 
 BOOST_AUTO_TEST_CASE (SemiTransparentPixelRecoversAlphaAndColour)
 
 BOOST_AUTO_TEST_CASE (RoundTripReproducesTheRenders)
 
 BOOST_AUTO_TEST_CASE (InvalidInputsReturnError)
 
 BOOST_AUTO_TEST_CASE (ColourToAlphaMakesBackgroundTransparent)
 Colour-to-alpha: converting the background colour makes matching pixels transparent, with pixels in between getting a proportional opacity.
 

Detailed Description

Test suite for the generic render utilities in common (render_utils.h).

Definition in file test_render_utils.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/6]

BOOST_AUTO_TEST_CASE ( ColourToAlphaMakesBackgroundTransparent )

Colour-to-alpha: converting the background colour makes matching pixels transparent, with pixels in between getting a proportional opacity.

Definition at line 221 of file test_render_utils.cpp.

References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), and ConvertColourToAlphaInPlace().

◆ BOOST_AUTO_TEST_CASE() [2/6]

BOOST_AUTO_TEST_CASE ( InvalidInputsReturnError )

Definition at line 194 of file test_render_utils.cpp.

References CreateAlphaImageFromTwoRenders(), and empty().

◆ BOOST_AUTO_TEST_CASE() [3/6]

BOOST_AUTO_TEST_CASE ( OpaquePixelIsPreserved )

◆ BOOST_AUTO_TEST_CASE() [4/6]

BOOST_AUTO_TEST_CASE ( RoundTripReproducesTheRenders )

◆ BOOST_AUTO_TEST_CASE() [5/6]

BOOST_AUTO_TEST_CASE ( SemiTransparentPixelRecoversAlphaAndColour )

◆ BOOST_AUTO_TEST_CASE() [6/6]

BOOST_AUTO_TEST_CASE ( TransparentPixelHasNoColour )

Definition at line 96 of file test_render_utils.cpp.

References BOOST_REQUIRE(), CreateAlphaImageFromTwoRenders(), image, and result.