|
BitmapTextCreatorGetTextSize Method |
Returns the size of the specified text.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public Vector2 GetTextSize(
string? text,
float fontSize,
float maxWidth = 0f,
float fontStretch = 1f
)
Parameters
- text String
- text to measure
- fontSize Single
- font size
- maxWidth Single (Optional)
- when bigger than 0 (0 by default) then it specifies the max text width - if wider, then text is automatically wrapped into a new line after the last word (or character if the word is longer then maxWidth).
- fontStretch Single (Optional)
- amount of horizontal font stretch (1 by default does not stretch the font)
Return Value
Vector2size of the specified text
See Also