Add wxBitmapBundle::FromSVGFile() helper

This is just a trivial wrapper for wxBitmapBundle::FromSVG(), but it can
still be convenient to have.
This commit is contained in:
Vadim Zeitlin
2021-11-28 22:16:55 +01:00
parent 5efcaf4e59
commit 8adfaa37f7
10 changed files with 74 additions and 4 deletions

View File

@@ -136,4 +136,11 @@ TEST_CASE("BitmapBundle::FromSVG", "[bmpbundle][svg]")
CHECK( b.GetBitmap(wxSize(16, 16)).GetSize() == wxSize(16, 16) );
}
TEST_CASE("BitmapBundle::FromSVGFile", "[bmpbundle][svg][file]")
{
wxBitmapBundle b = wxBitmapBundle::FromSVGFile("horse.svg", wxSize(20, 20));
REQUIRE( b.IsOk() );
CHECK( b.GetDefaultSize() == wxSize(20, 20) );
}
#endif // wxHAS_SVG