MCPcopy Create free account
hub / github.com/RenderKit/embree / RenderTextWrapped

Method RenderTextWrapped

tutorials/common/imgui/imgui.cpp:3166–3180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3164}
3165
3166void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
3167{
3168 ImGuiContext& g = *GImGui;
3169 ImGuiWindow* window = g.CurrentWindow;
3170
3171 if (!text_end)
3172 text_end = text + strlen(text); // FIXME-OPT
3173
3174 if (text != text_end)
3175 {
3176 window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width);
3177 if (g.LogEnabled)
3178 LogRenderedText(&pos, text, text_end);
3179 }
3180}
3181
3182// Default clip_rect uses (pos_min,pos_max)
3183// 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