Initial image implementation
This commit is contained in:
@@ -52,6 +52,20 @@ NLOHMANN_JSON_SERIALIZE_ENUM(TextFit,
|
||||
{FIT_AUTO, "auto"},
|
||||
})
|
||||
|
||||
enum ImageResize
|
||||
{
|
||||
RESIZE_NONE,
|
||||
RESIZE_FIT,
|
||||
RESIZE_STRETCH
|
||||
};
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(ImageResize,
|
||||
{
|
||||
{RESIZE_NONE, "none"},
|
||||
{RESIZE_FIT, "fit"},
|
||||
{RESIZE_STRETCH, "stretch"},
|
||||
})
|
||||
|
||||
// Call this before everything
|
||||
// Prints its messages
|
||||
bool init_sdl();
|
||||
@@ -86,5 +100,6 @@ void json_extract(const nlohmann::json& j, const std::string& key, VerticalAlign
|
||||
void json_extract(const nlohmann::json& j, const std::string& key, TextFit& out);
|
||||
void json_extract(const nlohmann::json& j, const std::string& key, SDL_Color& out);
|
||||
void json_extract(const nlohmann::json& j, const std::string& key, Uint8& out);
|
||||
void json_extract(const nlohmann::json& j, const std::string& key, ImageResize& out);
|
||||
|
||||
#endif // SDL_HELPERS_H_
|
||||
|
||||
Reference in New Issue
Block a user