MCPcopy Create free account
hub / github.com/cinder/Cinder / RenderText

Method RenderText

src/imgui/imgui.cpp:3724–3748  ·  view source on GitHub ↗

Internal ImGui functions to render text RenderText***() functions calls ImDrawList::AddText() calls ImBitmapFont::RenderText()

Source from the content-addressed store, hash-verified

3722// Internal ImGui functions to render text
3723// RenderText***() functions calls ImDrawList::AddText() calls ImBitmapFont::RenderText()
3724void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool hide_text_after_hash)
3725{
3726 ImGuiContext& g = *GImGui;
3727 ImGuiWindow* window = g.CurrentWindow;
3728
3729 // Hide anything after a '##' string
3730 const char* text_display_end;
3731 if (hide_text_after_hash)
3732 {
3733 text_display_end = FindRenderedTextEnd(text, text_end);
3734 }
3735 else
3736 {
3737 if (!text_end)
3738 text_end = text + ImStrlen(text); // FIXME-OPT
3739 text_display_end = text_end;
3740 }
3741
3742 if (text != text_display_end)
3743 {
3744 window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end);
3745 if (g.LogEnabled)
3746 LogRenderedText(&pos, text, text_display_end);
3747 }
3748}
3749
3750void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
3751{

Callers 1

InputTextExMethod · 0.45

Calls 1

AddTextMethod · 0.80

Tested by

no test coverage detected