// // C++ Interface: %{MODULE} // // Description: // // // Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR} // // Copyright: See COPYING file that comes with this distribution // // #ifndef SDLWIDGETS_IMAGE_H #define SDLWIDGETS_IMAGE_H #include #include "widget.h" namespace SDLwidgets { class Image : public WidgetLeaf { private: SDL_Surface* _image_surface; public: Image( const char* filename ); Image( Uint32 width, Uint32 height ); ~Image() { SDL_FreeSurface( _image_surface ); } virtual void draw( SDL_Surface* surface ); SDL_Surface* getSurface() { return _image_surface; } }; } #endif // SDLWIDGETS_IMAGE_H