MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / RenderTextWrapped

Method RenderTextWrapped

include/imgui/imgui.cpp:3877–3891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3875}
3876
3877void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
3878{
3879 ImGuiContext& g = *GImGui;
3880 ImGuiWindow* window = g.CurrentWindow;
3881
3882 if (!text_end)
3883 text_end = text + ImStrlen(text); // FIXME-OPT (not reached by our internal calls)
3884
3885 if (text != text_end)
3886 {
3887 window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width);
3888 if (g.LogEnabled)
3889 LogRenderedText(&pos, text, text_end);
3890 }
3891}
3892
3893// Default clip_rect uses (pos_min,pos_max)
3894// 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