| 1356 | } |
| 1357 | |
| 1358 | float TextWidth(float FontSize, const char *pText, int StrLength = -1, float LineWidth = -1.0f, int Flags = 0, const STextSizeProperties &TextSizeProps = {}) override |
| 1359 | { |
| 1360 | CTextCursor Cursor; |
| 1361 | Cursor.m_FontSize = FontSize; |
| 1362 | Cursor.m_Flags = Flags; |
| 1363 | Cursor.m_LineWidth = LineWidth; |
| 1364 | TextEx(&Cursor, pText, StrLength); |
| 1365 | if(TextSizeProps.m_pHeight != nullptr) |
| 1366 | *TextSizeProps.m_pHeight = Cursor.Height(); |
| 1367 | if(TextSizeProps.m_pAlignedFontSize != nullptr) |
| 1368 | *TextSizeProps.m_pAlignedFontSize = Cursor.m_AlignedFontSize; |
| 1369 | if(TextSizeProps.m_pMaxCharacterHeightInLine != nullptr) |
| 1370 | *TextSizeProps.m_pMaxCharacterHeightInLine = Cursor.m_MaxCharacterHeight; |
| 1371 | if(TextSizeProps.m_pLineCount != nullptr) |
| 1372 | *TextSizeProps.m_pLineCount = Cursor.m_LineCount; |
| 1373 | return Cursor.m_LongestLineWidth; |
| 1374 | } |
| 1375 | |
| 1376 | STextBoundingBox TextBoundingBox(float FontSize, const char *pText, int StrLength = -1, float LineWidth = -1.0f, float LineSpacing = 0.0f, int Flags = 0) override |
| 1377 | { |
no test coverage detected