Commit Graph

8 Commits

Author SHA1 Message Date
Francesco Abbate 9ff6a0325e Mostly fix problem of offset with cursor positioning when using mouse
In order to get right the cursor position on text on mouse clicks it is
needed to take into account text's subpixel positioning.

This fix mostly corrects the problem but cursor positioning is still
somewhat inaccurate for long lines due to repeated commands to draw a text
along a line. Repeated draw text calls make the subpixel information
lost and small errors will add-up.
2021-03-06 16:18:24 +01:00
rxi 878c94a334 Changed rencache to store font tab_width with font command
Fixes bug where text would be drawn/cached wrongly if more than one tab_width
was used in a given frame
2020-09-05 15:09:54 +01:00
rxi 35b642d434 Added rencache invalidation on window-exposed event
Fixes #63
2020-05-22 09:00:48 +01:00
rxi 1abb979490 Added null-checks for all push_command() calls in rencache.c 2020-05-17 13:18:26 +01:00
rxi 9bf0ed2419 Made rencache warn on exhausting command buffer instead of panicing 2020-05-14 08:52:07 +01:00
rxi 4c2c03ed4d Made draw_text/draw_rect not push command if result is not on-screen 2020-05-14 08:45:45 +01:00
rxi 774d95d800 Comment improvement in rencache.c 2020-05-07 22:24:12 +01:00
rxi d8c4bfa6ba Initial commit 2019-12-28 11:17:56 +00:00