summaryrefslogtreecommitdiff
path: root/text.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-26 20:36:48 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-26 20:37:09 -0500
commitec020b646a34380793ef3b2ec66fe469f48c99a4 (patch)
tree0c61706a6dbc68fc680af5b7e76835ceb0c9438a /text.h
parentc5a3c1bfdd8fe0fe81a8094ab68b7a95bdb4ea39 (diff)
Added buffer header (with checksum in debug mode)
Diffstat (limited to 'text.h')
-rw-r--r--text.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/text.h b/text.h
index 25c5e49..820bbd1 100644
--- a/text.h
+++ b/text.h
@@ -32,12 +32,14 @@ extern float text_font_char_width(Font *font);
extern void text_render(Font *font, char const *text, float x, float y);
// Get the dimensions of some text.
extern void text_get_size(Font *font, char const *text, float *width, float *height);
+// Write text, but using a state, starting at (x, y) -- state->x and state->y are ignored. This allows you to control min/max_x/y.
+extern void text_render_with_state(Font *font, TextRenderState *state, char const *text, float x, float y);
// Begin writing characters.
extern void text_chars_begin(Font *font);
// Finish writing characters.
extern void text_chars_end(Font *font);
// Render a single character.
-extern void text_render_char(Font *font, char32_t c, TextRenderState *state);
+extern void text_render_char(Font *font, TextRenderState *state, char32_t c);
// Free memory used by font.
extern void text_font_free(Font *font);