MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / RenderTextWrapped

Method RenderTextWrapped

KBotExt/imgui/imgui.cpp:3289–3303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3287}
3288
3289void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
3290{
3291 ImGuiContext& g = *GImGui;
3292 ImGuiWindow* window = g.CurrentWindow;
3293
3294 if (!text_end)
3295 text_end = text + strlen(text); // FIXME-OPT
3296
3297 if (text != text_end)
3298 {
3299 window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width);
3300 if (g.LogEnabled)
3301 LogRenderedText(&pos, text, text_end);
3302 }
3303}
3304
3305// Default clip_rect uses (pos_min,pos_max)
3306// 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