MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / RenderFrame

Method RenderFrame

KBotExt/imgui/imgui.cpp:3413–3424  ·  view source on GitHub ↗

Render a rectangle shaped with optional rounding and borders

Source from the content-addressed store, hash-verified

3411
3412// Render a rectangle shaped with optional rounding and borders
3413void ImGui::RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border, float rounding)
3414{
3415 ImGuiContext& g = *GImGui;
3416 ImGuiWindow* window = g.CurrentWindow;
3417 window->DrawList->AddRectFilled(p_min, p_max, fill_col, rounding);
3418 const float border_size = g.Style.FrameBorderSize;
3419 if (border && border_size > 0.0f)
3420 {
3421 window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, 0, border_size);
3422 window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, 0, border_size);
3423 }
3424}
3425
3426void ImGui::RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding)
3427{

Callers

nothing calls this directly

Calls 3

ImVec2Function · 0.85
AddRectFilledMethod · 0.80
AddRectMethod · 0.80

Tested by

no test coverage detected