Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-04-13 05:45:41 +0300
committerCampbell Barton <campbell@blender.org>2022-04-13 06:06:29 +0300
commit21ae323dbf28b4e0049e68153fe1a310ccf5ebef (patch)
tree184d0ff206289632094a71f574d6c8270c872a3c /source/blender/sequencer
parentae43872ad572eb3e6ad1ebfd02921fc2403059bc (diff)
Cleanup: avoid redundant float/int conversions in BLF
Internally many offsets for BLF were integers but exposed as floats, since these are used in pixel-space, many callers were converging them back to integers. Simplify logic by using ints.
Diffstat (limited to 'source/blender/sequencer')
-rw-r--r--source/blender/sequencer/intern/effects.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c
index 70f83485bb5..0192f4f625c 100644
--- a/source/blender/sequencer/intern/effects.c
+++ b/source/blender/sequencer/intern/effects.c
@@ -3381,7 +3381,7 @@ static ImBuf *do_text_effect(const SeqRenderData *context,
/* vars for calculating wordwrap and optional box */
struct {
struct ResultBLF info;
- rctf rect;
+ rcti rect;
} wrap;
BLF_boundbox_ex(font, data->text, sizeof(data->text), &wrap.rect, &wrap.info);
@@ -3391,10 +3391,10 @@ static ImBuf *do_text_effect(const SeqRenderData *context,
}
else {
if (data->align == SEQ_TEXT_ALIGN_X_RIGHT) {
- x -= BLI_rctf_size_x(&wrap.rect);
+ x -= BLI_rcti_size_x(&wrap.rect);
}
else if (data->align == SEQ_TEXT_ALIGN_X_CENTER) {
- x -= BLI_rctf_size_x(&wrap.rect) / 2;
+ x -= BLI_rcti_size_x(&wrap.rect) / 2;
}
if (data->align_y == SEQ_TEXT_ALIGN_Y_TOP) {