MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetStringMultiLineBoundingBox

Function GetStringMultiLineBoundingBox

src/gfx.cpp:751–755  ·  view source on GitHub ↗

* Calculate string bounding box for multi-line strings. * @param str String to check. * @param suggestion Suggested bounding box. * @return Bounding box for the multi-line string, may be bigger than \a suggestion. */

Source from the content-addressed store, hash-verified

749 * @return Bounding box for the multi-line string, may be bigger than \a suggestion.
750 */
751Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion)
752{
753 Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)};
754 return box;
755}
756
757/**
758 * Calculate string bounding box for multi-line strings.

Callers 5

UpdateWidgetSizeMethod · 0.85
UpdateWidgetSizeMethod · 0.85
UpdateWidgetSizeMethod · 0.85
UpdateWidgetSizeMethod · 0.85
UpdateWidgetSizeMethod · 0.85

Calls 1

GetStringHeightFunction · 0.85

Tested by

no test coverage detected