Draw a 10px wide rectangle around CurposPos.x using Line Y1/Y2 in current window's DrawList
| 17892 | |
| 17893 | // Draw a 10px wide rectangle around CurposPos.x using Line Y1/Y2 in current window's DrawList |
| 17894 | void ImGui::DebugDrawLineExtents(ImU32 col) |
| 17895 | { |
| 17896 | ImGuiContext& g = *GImGui; |
| 17897 | ImGuiWindow* window = g.CurrentWindow; |
| 17898 | float curr_x = window->DC.CursorPos.x; |
| 17899 | float line_y1 = (window->DC.IsSameLine ? window->DC.CursorPosPrevLine.y : window->DC.CursorPos.y); |
| 17900 | float line_y2 = line_y1 + (window->DC.IsSameLine ? window->DC.PrevLineSize.y : window->DC.CurrLineSize.y); |
| 17901 | window->DrawList->AddLine(ImVec2(curr_x - 5.0f, line_y1), ImVec2(curr_x + 5.0f, line_y1), col, 1.0f); |
| 17902 | window->DrawList->AddLine(ImVec2(curr_x - 0.5f, line_y1), ImVec2(curr_x - 0.5f, line_y2), col, 1.0f); |
| 17903 | window->DrawList->AddLine(ImVec2(curr_x - 5.0f, line_y2), ImVec2(curr_x + 5.0f, line_y2), col, 1.0f); |
| 17904 | } |
| 17905 | |
| 17906 | // Draw last item rect in ForegroundDrawList (so it is always visible) |
| 17907 | void ImGui::DebugDrawItemRect(ImU32 col) |