 |
BitmapFontMeasureText Method |
Provides the size, in pixels, of the specified text when drawn with this font.
When maxWidth is bigger then 0, then text is wrapped keep within the specified with.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
Syntaxpublic Vector2 MeasureText(
string text,
double maxWidth = -1
)
Parameters
- text String
- The text to measure.
- maxWidth Double (Optional)
- The maximum width to warp the text; when zero or smaller (-1 by default), then the text in not wrapped.
Return Value
Vector2
The size in pixels, of text drawn with this font.
See Also