MCPcopy Create free account
hub / github.com/TankOs/SFGUI / LoadImage

Method LoadImage

src/SFGUI/FileResourceLoader.cpp:19–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19std::shared_ptr<const sf::Image> FileResourceLoader::LoadImage( const std::string& path ) const {
20 auto image = std::make_shared<sf::Image>();
21
22 if( !image->loadFromFile( path ) ) {
23 return std::shared_ptr<const sf::Image>();
24 }
25
26 return image;
27}
28
29const std::string& FileResourceLoader::GetIdentifier() const {
30 static const std::string id( "file" );

Callers 1

GetImageMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected