DrawTextManager::GetTextExtent

DrawTextManager::GetTextExtent
SizeF GetTextExtent(const char* putf8Str, float width = 0, const TextParams* ptxtParams = NULL);
SizeF GetTextExtent(const wchar_t* pwstr, float width = 0, const TextParams* ptxtParams = NULL);
SizeF GetTextExtent(const String& str, float width = 0, const TextParams* ptxtParams = NULL);
Description

GetTextExtent returns the size of the text rectangle that would be necessary to render the specified text using the text parameters from the ptxtParams parameter. If WordWrap and Multiline in ptxtParams are set to 'true' then it uses 'width' parameter as the width and calculates the height.

Parameters
Parameters 
Description 
const char* putf8Str 
Pointer to null-terminated UTF-8 string. 
float width = 0 
Desired width of the text rectangle. 
const TextParams* ptxtParams = NULL 
Pointer to the text parameters. 
const wchar_t* pwstr 
Pointer to null-terminated Unicode/UCS-2 string. 
const String& str 
String
Return Value

Size of the text rectangle.