Split sdlpp into smaller files
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#ifndef SDLPP_HPP_TEXTURE
|
||||
#define SDLPP_HPP_TEXTURE
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "sdlpp_common.hpp"
|
||||
#include "sdlpp_font.hpp"
|
||||
#include "sdlpp_renderer.hpp"
|
||||
|
||||
namespace SDLPP {
|
||||
class Texture {
|
||||
public:
|
||||
Texture() = delete;
|
||||
Texture( std::shared_ptr< Renderer > &renderer,
|
||||
const std::string &img_path )
|
||||
: Texture( renderer, img_path, "" ) {}
|
||||
Texture( std::shared_ptr< Renderer > &renderer, const std::string &img_path,
|
||||
const std::string &color_key );
|
||||
Texture( std::shared_ptr< Renderer > &renderer, Font &font,
|
||||
const std::string &text, const std::string &color = "FFFFFF",
|
||||
const std::string &outline_color = "000000",
|
||||
const int outline_size = -1 );
|
||||
virtual ~Texture();
|
||||
SDL_Texture *getTexturePtr();
|
||||
|
||||
private:
|
||||
void setTextureFromSurface( std::shared_ptr< Renderer > &renderer,
|
||||
SDL_Surface *surface );
|
||||
SDL_Texture *texture = NULL;
|
||||
};
|
||||
} // end of namespace SDLPP
|
||||
#endif
|
||||
Reference in New Issue
Block a user