MCPcopy Create free account
hub / github.com/AlexandreRouma/SDRPlusPlus / RenderTextWrapped

Method RenderTextWrapped

core/src/imgui/imgui.cpp:2691–2705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2689}
2690
2691void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
2692{
2693 ImGuiContext& g = *GImGui;
2694 ImGuiWindow* window = g.CurrentWindow;
2695
2696 if (!text_end)
2697 text_end = text + strlen(text); // FIXME-OPT
2698
2699 if (text != text_end)
2700 {
2701 window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width);
2702 if (g.LogEnabled)
2703 LogRenderedText(&pos, text, text_end);
2704 }
2705}
2706
2707// Default clip_rect uses (pos_min,pos_max)
2708// Handle clipping on CPU immediately (vs typically let the GPU clip the triangles that are overlapping the clipping rectangle edges)

Callers

nothing calls this directly

Calls 1

AddTextMethod · 0.80

Tested by

no test coverage detected