Click or drag to resize
Ab4d.SharpEngine logo

BitmapTextCreatorGetTextSize Method

Returns the size of the specified text.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntax
C#
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

Vector2
size of the specified text
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.BitmapTextCreator.GetTextSize(System.String,System.Single,System.Single,System.Single)"]

See Also