From 30214bf817c1e18235fcddacac851ecc5cbe66a0 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 3 Oct 2023 17:08:40 -0700 Subject: libs/txt,modules/*: rename txt_render_fragment() Mechanical rename to txt_render_fragment_aligned(), updating all existing call sites accordingly. This is a preparatory commit for introducing an offsetted variant of txt_render_fragment() (txt_render_fragment_offsetted()). No functional difference, purely naming changes. --- src/modules/asc/asc.c | 14 +++++++------- src/modules/rkt/rkt.c | 24 ++++++++++++------------ src/modules/rtv/rtv.c | 20 ++++++++++---------- 3 files changed, 29 insertions(+), 29 deletions(-) (limited to 'src/modules') diff --git a/src/modules/asc/asc.c b/src/modules/asc/asc.c index bdb482e..d47ac6d 100644 --- a/src/modules/asc/asc.c +++ b/src/modules/asc/asc.c @@ -108,13 +108,13 @@ static void asc_render_fragment(til_module_context_t *context, til_stream_t *str til_fb_fragment_clear(fragment); - txt_render_fragment(ctxt->txt, fragment, 0xffffffff, - ctxt->vars.x * ((float)fragment->frame_width) * .5f + .5f * ((float)fragment->frame_width), - ctxt->vars.y * ((float)fragment->frame_height) * .5f + .5f * ((float)fragment->frame_height), - (txt_align_t){ - .horiz = s->halign, - .vert = s->valign - }); + txt_render_fragment_aligned(ctxt->txt, fragment, 0xffffffff, + ctxt->vars.x * ((float)fragment->frame_width) * .5f + .5f * ((float)fragment->frame_width), + ctxt->vars.y * ((float)fragment->frame_height) * .5f + .5f * ((float)fragment->frame_height), + (txt_align_t){ + .horiz = s->halign, + .vert = s->valign + }); } diff --git a/src/modules/rkt/rkt.c b/src/modules/rkt/rkt.c index 677e2b9..2e8e696 100644 --- a/src/modules/rkt/rkt.c +++ b/src/modules/rkt/rkt.c @@ -350,12 +350,12 @@ static void rkt_render_fragment(til_module_context_t *context, til_stream_t *str * as this is a diagnostic it's not so important. */ til_fb_fragment_clear(*fragment_ptr); - txt_render_fragment(msg, *fragment_ptr, 0xffffffff, - 0, 0, - (txt_align_t){ - .horiz = TXT_HALIGN_LEFT, - .vert = TXT_VALIGN_TOP, - }); + txt_render_fragment_aligned(msg, *fragment_ptr, 0xffffffff, + 0, 0, + (txt_align_t){ + .horiz = TXT_HALIGN_LEFT, + .vert = TXT_VALIGN_TOP, + }); txt_free(msg); } @@ -368,12 +368,12 @@ static void rkt_render_fragment(til_module_context_t *context, til_stream_t *str * will revisit the status text in the future. Not a huge priority since * none of this should be active in "production" playback mode. */ - txt_render_fragment(msg, *fragment_ptr, 0xffffffff, - 0, 0, - (txt_align_t){ - .horiz = TXT_HALIGN_LEFT, - .vert = TXT_VALIGN_TOP, - }); + txt_render_fragment_aligned(msg, *fragment_ptr, 0xffffffff, + 0, 0, + (txt_align_t){ + .horiz = TXT_HALIGN_LEFT, + .vert = TXT_VALIGN_TOP, + }); txt_free(msg); } diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c index 0c2ab73..f0dd9dd 100644 --- a/src/modules/rtv/rtv.c +++ b/src/modules/rtv/rtv.c @@ -336,18 +336,18 @@ static int rtv_finish_frame(til_module_context_t *context, til_stream_t *stream, til_fb_fragment_t *fragment = *fragment_ptr; if (ctxt->caption) { - txt_render_fragment(ctxt->caption, fragment, 0x00000000, - 1, fragment->frame_height + 1, - (txt_align_t){ + txt_render_fragment_aligned(ctxt->caption, fragment, 0x00000000, + 1, fragment->frame_height + 1, + (txt_align_t){ + .horiz = TXT_HALIGN_LEFT, + .vert = TXT_VALIGN_BOTTOM + }); + txt_render_fragment_aligned(ctxt->caption, fragment, 0xffffffff, + 0, fragment->frame_height, + (txt_align_t){ .horiz = TXT_HALIGN_LEFT, .vert = TXT_VALIGN_BOTTOM - }); - txt_render_fragment(ctxt->caption, fragment, 0xffffffff, - 0, fragment->frame_height, - (txt_align_t){ - .horiz = TXT_HALIGN_LEFT, - .vert = TXT_VALIGN_BOTTOM - }); + }); } return 0; -- cgit v1.2.3