Improve text width calculation precision (#1408)

In some extreme cases (~30000 chars) text width precision takes a hit.
Using double instead of float fixes that.
This commit is contained in:
Guldoman
2023-08-19 12:38:35 +08:00
committed by takase1121
parent 32860c111e
commit 1d0725f904
5 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
void rencache_show_debug(bool enable);
void rencache_set_clip_rect(RenRect rect);
void rencache_draw_rect(RenRect rect, RenColor color);
float rencache_draw_text(RenWindow *window_renderer, RenFont **font, const char *text, size_t len, float x, int y, RenColor color);
double rencache_draw_text(RenWindow *window_renderer, RenFont **font, const char *text, size_t len, double x, int y, RenColor color);
void rencache_invalidate(void);
void rencache_begin_frame(RenWindow *window_renderer);
void rencache_end_frame(RenWindow *window_renderer);