aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/main.c b/tests/main.c
index 3ec5738..09e59ed 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -62,7 +62,15 @@ static void draw(mgl_window *window, void *userdata) {
mgl_text text;
mgl_text_init(&text, u->font, str, strlen(str));
mgl_text_set_max_width(&text, 200.0f);
- mgl_text_set_max_rows(&text, 5);
+ //mgl_text_set_max_rows(&text, 5);
+ {
+ mgl_rectangle text_bg = {
+ .position = text.position,
+ .size = mgl_text_get_bounds(&text),
+ .color = { 255, 0, 0, 255 },
+ };
+ mgl_rectangle_draw(context, &text_bg);
+ }
mgl_text_draw(context, &text);
mgl_text_deinit(&text);