diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 11:13:20 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-12 13:22:02 -0300 |
| commit | 86ffca0024326110962f0880727f4eb84e6a48d1 (patch) | |
| tree | 055f489341053c1db258606bb63b282bc7345a89 /vendor/text.h | |
| parent | a62a6aa896adda901d335ef38814a13b8839545c (diff) | |
| download | sketchbook-86ffca0024326110962f0880727f4eb84e6a48d1.tar.gz sketchbook-86ffca0024326110962f0880727f4eb84e6a48d1.zip | |
sketchbook: frames for ffmpeg (--export, on a clock of its own), text sizes, a font from the environment
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'vendor/text.h')
| -rw-r--r-- | vendor/text.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/text.h b/vendor/text.h index bf4f363..9cd445a 100644 --- a/vendor/text.h +++ b/vendor/text.h @@ -6,5 +6,9 @@ eight-pixel ASCII advance and a 16-pixel line box); fallback uses Fontconfig. */ bool sk_text_draw(SDL_Renderer *, float x, float y, float scale, const char *utf8, size_t len, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +/* What sk_text_draw gives the text at `scale`: its advance width and the + height of its line box, in logical units. False if it cannot be laid out. */ +bool sk_text_measure(SDL_Renderer *, float scale, const char *utf8, size_t len, + float *width, float *height); void sk_text_begin_frame(SDL_Renderer *); #endif |
