Automatic generation of variants of icons for toolbars and gizmos

This commit is contained in:
Enrico Turri 2019-02-26 12:56:13 +01:00
parent 987a83bb0c
commit a8610f990e
6 changed files with 120 additions and 16 deletions

View file

@ -42,7 +42,15 @@ namespace GUI {
bool load_from_svg_file(const std::string& filename, bool use_mipmaps, unsigned int max_size_px);
#endif // ENABLE_TEXTURES_FROM_SVG
#if ENABLE_SVG_ICONS
bool load_from_svg_files_as_sprites_array(const std::vector<std::string>& filenames, unsigned int num_states, unsigned int sprite_size_px);
// meanings of states: (std::pair<int, bool>)
// first field (int):
// 0 -> no changes
// 1 -> use white only color variant
// 2 -> use gray only color variant
// second field (bool):
// false -> no changes
// true -> add background color
bool load_from_svg_files_as_sprites_array(const std::vector<std::string>& filenames, const std::vector<std::pair<int, bool>>& states, unsigned int sprite_size_px);
#endif // ENABLE_SVG_ICONS
void reset();