MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / RenderTextWrapped

Method RenderTextWrapped

extern/imgui/imgui.cpp:3238–3252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3236}
3237
3238void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
3239{
3240 ImGuiContext& g = *GImGui;
3241 ImGuiWindow* window = g.CurrentWindow;
3242
3243 if (!text_end)
3244 text_end = text + strlen(text); // FIXME-OPT
3245
3246 if (text != text_end)
3247 {
3248 window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width);
3249 if (g.LogEnabled)
3250 LogRenderedText(&pos, text, text_end);
3251 }
3252}
3253
3254// Default clip_rect uses (pos_min,pos_max)
3255// 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