MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / DebugDrawItemRect

Method DebugDrawItemRect

imgui_tiny_app/imgui/imgui.cpp:23913–23918  ·  view source on GitHub ↗

Draw last item rect in ForegroundDrawList (so it is always visible)

Source from the content-addressed store, hash-verified

23911
23912// Draw last item rect in ForegroundDrawList (so it is always visible)
23913void ImGui::DebugDrawItemRect(ImU32 col)
23914{
23915 ImGuiContext& g = *GImGui;
23916 ImGuiWindow* window = g.CurrentWindow;
23917 GetForegroundDrawList(window)->AddRect(g.LastItemData.Rect.Min, g.LastItemData.Rect.Max, col);
23918}
23919
23920// [DEBUG] Locate item position/rectangle given an ID.
23921static const ImU32 DEBUG_LOCATE_ITEM_COLOR = IM_COL32(0, 255, 0, 255); // Green

Callers

nothing calls this directly

Calls 2

GetForegroundDrawListFunction · 0.85
AddRectMethod · 0.80

Tested by

no test coverage detected