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

Method ShowFontAtlas

extern/imgui/imgui.cpp:18578–18594  ·  view source on GitHub ↗

[DEBUG] List fonts in a font atlas and display its texture

Source from the content-addressed store, hash-verified

18576
18577// [DEBUG] List fonts in a font atlas and display its texture
18578void ImGui::ShowFontAtlas(ImFontAtlas* atlas)
18579{
18580 for (int i = 0; i < atlas->Fonts.Size; i++)
18581 {
18582 ImFont* font = atlas->Fonts[i];
18583 PushID(font);
18584 DebugNodeFont(font);
18585 PopID();
18586 }
18587 if (TreeNode("Atlas texture", "Atlas texture (%dx%d pixels)", atlas->TexWidth, atlas->TexHeight))
18588 {
18589 ImVec4 tint_col = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
18590 ImVec4 border_col = ImVec4(1.0f, 1.0f, 1.0f, 0.5f);
18591 Image(atlas->TexID, ImVec2((float)atlas->TexWidth, (float)atlas->TexHeight), ImVec2(0.0f, 0.0f), ImVec2(1.0f, 1.0f), tint_col, border_col);
18592 TreePop();
18593 }
18594}
18595
18596void ImGui::ShowMetricsWindow(bool* p_open)
18597{

Callers

nothing calls this directly

Calls 2

ImVec4Class · 0.85
ImVec2Function · 0.85

Tested by

no test coverage detected