#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) { vector files; files=filesystem::List(path+"/*.png"); cout<<"* Loading resources:..."; for(string file : files) { string name = filesystem::BaseName(file); surfaces[name]=cairo_image_surface_create_from_png(file.c_str()); } cout<<"ok"<iter : surfaces) { cairo_surface_destroy(iter.second); } cout<<"ok"<