// // Image.hpp // libscgui // // Created by Bob Polis at 2020-10-23 // Copyright (c) 2020 SwiftCoder. All rights reserved. // #ifndef _Image_H_ #define _Image_H_ #include #include #include namespace sc { namespace gui { class Image { public: Image(int w, int h); Image(const std::string& path); Image(SDL_Surface* surface); SDL_Surface* surface() const { return _s.get(); } int width() const { return _s.get()->w; } int height() const { return _s.get()->h; } private: std::unique_ptr _s {nullptr, SDL_FreeSurface}; }; } } #endif // _Image_H_