MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / DebugDrawLineExtents

Method DebugDrawLineExtents

3rdparty/imgui/src/imgui.cpp:17985–17995  ·  view source on GitHub ↗

Draw a 10px wide rectangle around CurposPos.x using Line Y1/Y2 in current window's DrawList

Source from the content-addressed store, hash-verified

17983
17984// Draw a 10px wide rectangle around CurposPos.x using Line Y1/Y2 in current window's DrawList
17985void ImGui::DebugDrawLineExtents(ImU32 col)
17986{
17987 ImGuiContext& g = *GImGui;
17988 ImGuiWindow* window = g.CurrentWindow;
17989 float curr_x = window->DC.CursorPos.x;
17990 float line_y1 = (window->DC.IsSameLine ? window->DC.CursorPosPrevLine.y : window->DC.CursorPos.y);
17991 float line_y2 = line_y1 + (window->DC.IsSameLine ? window->DC.PrevLineSize.y : window->DC.CurrLineSize.y);
17992 window->DrawList->AddLineH(curr_x - 5.0f, curr_x + 5.0f, line_y1, col, 1.0f);
17993 window->DrawList->AddLineV(curr_x - 0.5f, line_y1, line_y2, col, 1.0f);
17994 window->DrawList->AddLineH(curr_x - 5.0f, curr_x + 5.0f, line_y2, col, 1.0f);
17995}
17996
17997// Draw last item rect in ForegroundDrawList (so it is always visible)
17998void ImGui::DebugDrawItemRect(ImU32 col)

Callers

nothing calls this directly

Calls 2

AddLineHMethod · 0.80
AddLineVMethod · 0.80

Tested by

no test coverage detected