Render a rectangle shaped with optional rounding and borders
| 3307 | |
| 3308 | // Render a rectangle shaped with optional rounding and borders |
| 3309 | void ImGui::RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border, float rounding) |
| 3310 | { |
| 3311 | ImGuiContext& g = *GImGui; |
| 3312 | ImGuiWindow* window = g.CurrentWindow; |
| 3313 | window->DrawList->AddRectFilled(p_min, p_max, fill_col, rounding); |
| 3314 | const float border_size = g.Style.FrameBorderSize; |
| 3315 | if (border && border_size > 0.0f) |
| 3316 | { |
| 3317 | window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, 0, border_size); |
| 3318 | window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, 0, border_size); |
| 3319 | } |
| 3320 | } |
| 3321 | |
| 3322 | void ImGui::RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding) |
| 3323 | { |
nothing calls this directly
no test coverage detected