diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-11-05 21:38:20 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-11-05 21:38:20 +0100 |
commit | e2e7c0bf0747d55967c4be6374f3611cd96babb6 (patch) | |
tree | 7267f2086526ac780f57998ff93bae72266e8ddb /include/mgl/graphics/text.h | |
parent | ccb3e58071b3e807109918184727b305df8b96a0 (diff) |
Add bounds calculation to text
Diffstat (limited to 'include/mgl/graphics/text.h')
-rw-r--r-- | include/mgl/graphics/text.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mgl/graphics/text.h b/include/mgl/graphics/text.h index 9169ab0..f832605 100644 --- a/include/mgl/graphics/text.h +++ b/include/mgl/graphics/text.h @@ -29,6 +29,7 @@ typedef struct { size_t text_size; mgl_color color; mgl_vec2f position; + mgl_vec2f bounds; mgl_text_options options; } mgl_text; @@ -46,6 +47,7 @@ void mgl_text_set_string(mgl_text *self, const char *str, size_t str_size); void mgl_text_set_font(mgl_text *self, mgl_font *font); void mgl_text_set_position(mgl_text *self, mgl_vec2f position); void mgl_text_set_color(mgl_text *self, mgl_color color); +mgl_vec2f mgl_text_get_bounds(const mgl_text *self); void mgl_text_draw(mgl_context *context, mgl_text *text); #endif /* MGL_TEXT_H */ |