MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / processString

Function processString

src/openrct2/drawing/Drawing.String.cpp:688–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686 }
687
688 static void processString(RenderTarget& rt, std::string_view text, TextDrawInfo& info)
689 {
690 if (info.textDrawFlags.has(TextDrawFlag::noFormatting))
691 {
692 processStringLiteral(rt, text, info);
693 info.max.x = std::max(info.max.x, info.current.x);
694 info.max.y = std::max(info.max.y, info.current.y);
695 }
696 else
697 {
698 FmtString fmt(text);
699 for (const auto& token : fmt)
700 {
701 if (token.IsLiteral())
702 {
703 processStringLiteral(rt, token.text, info);
704 }
705 else if (token.IsCodepoint())
706 {
707 auto codepoint = token.GetCodepoint();
708 processStringCodepoint(rt, codepoint, info);
709 }
710 else
711 {
712 processFormatCode(rt, token, info);
713 }
714 info.max.x = std::max(info.max.x, info.current.x);
715 info.max.y = std::max(info.max.y, info.current.y);
716 }
717 }
718 }
719
720 static void processInitialColour(ColourWithFlags colour, TextDrawInfo& info)
721 {

Callers 3

ttfDrawStringFunction · 0.85
getStringWidthFunction · 0.85
drawStringWithYOffsetsFunction · 0.85

Calls 7

processStringLiteralFunction · 0.85
processStringCodepointFunction · 0.85
processFormatCodeFunction · 0.85
IsLiteralMethod · 0.80
IsCodepointMethod · 0.80
GetCodepointMethod · 0.80
hasMethod · 0.65

Tested by

no test coverage detected