summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-10-03 17:08:40 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-10-03 17:08:40 -0700
commit30214bf817c1e18235fcddacac851ecc5cbe66a0 (patch)
treeaf42c9c9170096a15d4de9bb27d13385b4b70b7b /src/modules
parentf97c10d4fa915a7730a814b8de05cafb3750fdae (diff)
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.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/asc/asc.c14
-rw-r--r--src/modules/rkt/rkt.c24
-rw-r--r--src/modules/rtv/rtv.c20
3 files changed, 29 insertions, 29 deletions
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;
© All Rights Reserved