pixi-jsFunctions
Function: updateTextBounds()
> updateTextBounds(batchableSprite, text): void
Defined in: node_modules/pixi.js/lib/scene/text/utils/updateTextBounds.d.ts:14
Internal
Updates the bounds of the given batchable sprite based on the provided text object.
This function adjusts the bounds of the batchable sprite to match the dimensions and anchor point of the text's texture. Additionally, it compensates for any padding specified in the text's style to ensure the text is rendered correctly on screen.
Parameters
batchableSprite
The sprite whose bounds need to be updated.
text
AbstractText<TextStyle, TextStyleOptions>
The text object containing the texture and style information.
Returns
void