* Calculates height of string (in pixels). The string is changed to a multiline string if needed. * @param str string to check * @param maxw maximum string width * @return height of pixels of string when it is drawn */
| 713 | * @return height of pixels of string when it is drawn |
| 714 | */ |
| 715 | int GetStringHeight(std::string_view str, int maxw, FontSize fontsize) |
| 716 | { |
| 717 | assert(maxw > 0); |
| 718 | Layouter layout(str, maxw, fontsize); |
| 719 | return layout.GetBounds().height; |
| 720 | } |
| 721 | |
| 722 | /** |
| 723 | * Calculates height of string (in pixels). The string is changed to a multiline string if needed. |
no test coverage detected