#include "rsrcmanager.h" #include #include #include using namespace net::lliurex::robolliurex; using namespace std; /*! Resource Manager loads a directory with png files, and keeps them as cairo surfaces for later querys \param path directory containing png to load */ RsrcManager::RsrcManager(string path) { auto files = edupals::filesystem::glob(path+"/*.png"); clog<<"* Loading resources:..."; for(auto file : files) { string name = file.filename().native(); surfaces[name]=cairo_image_surface_create_from_png(file.native().c_str()); } clog<<"ok"<iter : surfaces) { cairo_surface_destroy(iter.second); } clog<<"ok"<