mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
lottie: simplify text layout calculation
This commit is contained in:
parent
9bc3d5e3b7
commit
2b3cdb0d97
1 changed files with 1 additions and 1 deletions
|
@ -968,7 +968,7 @@ void LottieBuilder::updateText(LottieLayer* layer, float frameNo)
|
|||
Point layout = {doc.bbox.pos.x, doc.bbox.pos.y + ascent - doc.shift};
|
||||
|
||||
//horizontal alignment
|
||||
layout.x += -1.0f * doc.bbox.size.x * doc.justify + (cursor.x * scale) * doc.justify;
|
||||
layout.x += doc.justify * (-1.0f * doc.bbox.size.x + cursor.x * scale);
|
||||
|
||||
//new text group, single scene based on text-grouping
|
||||
scene->push(textGroup);
|
||||
|
|
Loading…
Add table
Reference in a new issue