Draw a 10px wide rectangle around CurposPos.x using Line Y1/Y2 in current window's DrawList
| 23877 | |
| 23878 | // Draw a 10px wide rectangle around CurposPos.x using Line Y1/Y2 in current window's DrawList |
| 23879 | void ImGui::DebugDrawLineExtents(ImU32 col) |
| 23880 | { |
| 23881 | ImGuiContext& g = *GImGui; |
| 23882 | ImGuiWindow* window = g.CurrentWindow; |
| 23883 | float curr_x = window->DC.CursorPos.x; |
| 23884 | float line_y1 = (window->DC.IsSameLine ? window->DC.CursorPosPrevLine.y : window->DC.CursorPos.y); |
| 23885 | float line_y2 = line_y1 + (window->DC.IsSameLine ? window->DC.PrevLineSize.y : window->DC.CurrLineSize.y); |
| 23886 | window->DrawList->AddLine(ImVec2(curr_x - 5.0f, line_y1), ImVec2(curr_x + 5.0f, line_y1), col, 1.0f); |
| 23887 | window->DrawList->AddLine(ImVec2(curr_x - 0.5f, line_y1), ImVec2(curr_x - 0.5f, line_y2), col, 1.0f); |
| 23888 | window->DrawList->AddLine(ImVec2(curr_x - 5.0f, line_y2), ImVec2(curr_x + 5.0f, line_y2), col, 1.0f); |
| 23889 | } |
| 23890 | |
| 23891 | // Draw last item rect in ForegroundDrawList (so it is always visible) |
| 23892 | void ImGui::DebugDrawItemRect(ImU32 col) |