 |
SpriteBatchGetBitmapTextSize Method |
Returns the size of the specified text.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntaxpublic Vector2 GetBitmapTextSize(
string? text,
float fontSize,
float maxWidth = 0f,
BitmapTextCreator? bitmapTextCreator = null
)
Parameters
- text String
- text to draw (supports multiple lines)
- fontSize Single
- size of the font (font size is always specified in absolute coordinates)
- 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).
- bitmapTextCreator BitmapTextCreator (Optional)
- optional BitmapTextCreator that is used to render the text; when null (by default) then the default BitmapTextCreator is used (get by GetDefaultBitmapTextCreator(Scene))
Return Value
Vector2[Missing <returns> documentation for "M:Ab4d.SharpEngine.Utilities.SpriteBatch.GetBitmapTextSize(System.String,System.Single,System.Single,Ab4d.SharpEngine.Utilities.BitmapTextCreator)"]
Remarks[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.SpriteBatch.GetBitmapTextSize(System.String,System.Single,System.Single,Ab4d.SharpEngine.Utilities.BitmapTextCreator)"]
See Also