MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / GetResizeBorderRect

Function GetResizeBorderRect

Dependencies/ImGui/src/imgui.cpp:7166–7177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7164};
7165
7166static ImRect GetResizeBorderRect(ImGuiWindow* window, int border_n, float perp_padding, float thickness)
7167{
7168 ImRect rect = window->Rect();
7169 if (thickness == 0.0f)
7170 rect.Max -= ImVec2(1, 1);
7171 if (border_n == ImGuiDir_Left) { return ImRect(rect.Min.x - thickness, rect.Min.y + perp_padding, rect.Min.x + thickness, rect.Max.y - perp_padding); }
7172 if (border_n == ImGuiDir_Right) { return ImRect(rect.Max.x - thickness, rect.Min.y + perp_padding, rect.Max.x + thickness, rect.Max.y - perp_padding); }
7173 if (border_n == ImGuiDir_Up) { return ImRect(rect.Min.x + perp_padding, rect.Min.y - thickness, rect.Max.x - perp_padding, rect.Min.y + thickness); }
7174 if (border_n == ImGuiDir_Down) { return ImRect(rect.Min.x + perp_padding, rect.Max.y - thickness, rect.Max.x - perp_padding, rect.Max.y + thickness); }
7175 IM_ASSERT(0);
7176 return ImRect();
7177}
7178
7179// 0..3: corners (Lower-right, Lower-left, Unused, Unused)
7180ImGuiID ImGui::GetWindowResizeCornerID(ImGuiWindow* window, int n)

Callers 2

Calls 2

ImVec2Function · 0.85
ImRectFunction · 0.50

Tested by

no test coverage detected