Click or drag to resize
Ab4d.SharpEngine logo

SpriteBatchGetBitmapTextSize Method

Returns the size of the specified text.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public 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)"]

See Also