Draw a 10px wide rectangle around CurposPos.x using Line Y1/Y2 in current window's DrawList
| 17983 | |
| 17984 | // Draw a 10px wide rectangle around CurposPos.x using Line Y1/Y2 in current window's DrawList |
| 17985 | void 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) |
| 17998 | void ImGui::DebugDrawItemRect(ImU32 col) |