MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / RenderTextWrapped

Method RenderTextWrapped

lib/imgui/imgui.cpp:2338–2352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2336}
2337
2338void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
2339{
2340 ImGuiContext& g = *GImGui;
2341 ImGuiWindow* window = g.CurrentWindow;
2342
2343 if (!text_end)
2344 text_end = text + strlen(text); // FIXME-OPT
2345
2346 if (text != text_end)
2347 {
2348 window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width);
2349 if (g.LogEnabled)
2350 LogRenderedText(&pos, text, text_end);
2351 }
2352}
2353
2354// Default clip_rect uses (pos_min,pos_max)
2355// 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