From 8b020f5be8fbd3741085849fccd5c958cf260d2b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 18 Nov 2021 12:17:31 +0100 Subject: Move glyph creation for text to render function instead of in set string, clear font glyph background before rendering the text --- src/graphics/Text.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/graphics/Text.cpp b/src/graphics/Text.cpp index ad6fed2..fa82a88 100644 --- a/src/graphics/Text.cpp +++ b/src/graphics/Text.cpp @@ -56,7 +56,7 @@ namespace mgl { return { text.position.x, text.position.y }; } - FloatRect Text::get_bounds() const { + FloatRect Text::get_bounds() { mgl_vec2f bounds = mgl_text_get_bounds(&text); FloatRect rect(get_position(), { bounds.x, bounds.y }); return rect; -- cgit v1.2.3