Move ScaleAwareText to render_text.hpp

This commit is contained in:
2025-05-02 07:05:56 -05:00
parent 880d7bd1bf
commit db64b53cd2
2 changed files with 5 additions and 5 deletions

View File

@@ -29,11 +29,6 @@ public:
rectangle getEnclosingRect(); rectangle getEnclosingRect();
}; };
struct ScaleAwareText {
sf::Text text;
rectangle clip_rect;
};
void fill_rect(sf::RenderTarget& target, rectangle rect, sf::Color colour); void fill_rect(sf::RenderTarget& target, rectangle rect, sf::Color colour);
void fill_circle(sf::RenderTarget& target, rectangle rect, sf::Color colour); void fill_circle(sf::RenderTarget& target, rectangle rect, sf::Color colour);
void fill_roundrect(sf::RenderTarget& target, rectangle rect, int rad, sf::Color colour); void fill_roundrect(sf::RenderTarget& target, rectangle rect, int rad, sf::Color colour);

View File

@@ -40,6 +40,11 @@ struct TextStyle {
mutable std::map<std::string, location> measurementCache; mutable std::map<std::string, location> measurementCache;
}; };
struct ScaleAwareText {
sf::Text text;
rectangle clip_rect;
};
// elements: std::make_tuple(last_line_break, last_word_break, line_width) // elements: std::make_tuple(last_line_break, last_word_break, line_width)
typedef std::vector<std::tuple<unsigned short, unsigned short, unsigned short>> break_info_t; typedef std::vector<std::tuple<unsigned short, unsigned short, unsigned short>> break_info_t;