don't draw text outiside the bounding box

This commit is contained in:
Alessandro Mauri 2023-02-27 19:23:08 +01:00
parent a7a2193ea6
commit 4f2a7fbf18
2 changed files with 73 additions and 57 deletions

View file

@ -15,7 +15,7 @@ SDL_Window *win;
void draw(void)
{
ren_clear();
ren_render_text(str, 0, 0, 200, 100, 12);
ren_render_text(str, 0, 0, 100, 50, 12);
ren_render_box(100, 300, 50, 50, 0xffff0000);
SDL_GL_SwapWindow(win);
}