Introduce subpixel text positioning within rencache
In order to fix the issue with cursor positioning a subpixel-aware draw text operation within rencache was required. With this modification the cursor positioning problem is completely resolved. A new function renderer.draw_text_subpixel is introduced to perform consecutive, inline, text drawings with subpixel accuracy.
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ void rencache_show_debug(bool enable);
|
||||
void rencache_free_font(RenFont *font);
|
||||
void rencache_set_clip_rect(RenRect rect);
|
||||
void rencache_draw_rect(RenRect rect, RenColor color);
|
||||
int rencache_draw_text(RenFont *font, const char *text, int x, int y, RenColor color);
|
||||
int rencache_draw_text(RenFont *font, const char *text, int x, int y, RenColor color, bool draw_subpixel);
|
||||
void rencache_invalidate(void);
|
||||
void rencache_begin_frame(void);
|
||||
void rencache_end_frame(void);
|
||||
|
||||
Reference in New Issue
Block a user