ENH: font preview

Change-Id: I8151036cedcba9c57183414a9d134741bb2166a5
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
liz.li 2022-12-10 18:51:24 +08:00 committed by Lane.Wei
parent 4ee5dbb07f
commit 110d81f6f7
9 changed files with 372 additions and 26 deletions

View file

@ -106,7 +106,10 @@ namespace GUI {
//BBS: add generate logic for text strings
int m_original_width;
int m_original_height;
bool generate_from_text_string(const std::string &text_str, wxFont &font, wxColor background = *wxBLACK, wxColor foreground = *wxWHITE);
bool generate_texture_from_text(const std::string& text_str, wxFont& font, int& ww, int& hh, int &hl, wxColor background = *wxBLACK, wxColor foreground = *wxWHITE);
bool generate_from_text(const std::string& text_str, wxFont& font, wxColor background = *wxBLACK, wxColor foreground = *wxWHITE);
bool generate_from_text_string(const std::string& text_str, wxFont& font, wxColor background = *wxBLACK, wxColor foreground = *wxWHITE);
unsigned int get_id() const { return m_id; }
int get_width() const { return m_width; }