| 4946 | }; |
| 4947 | |
| 4948 | static ImRect GetResizeBorderRect(ImGuiWindow* window, int border_n, float perp_padding, float thickness) |
| 4949 | { |
| 4950 | ImRect rect = window->Rect(); |
| 4951 | if (thickness == 0.0f) rect.Max -= ImVec2(1,1); |
| 4952 | if (border_n == 0) return ImRect(rect.Min.x + perp_padding, rect.Min.y - thickness, rect.Max.x - perp_padding, rect.Min.y + thickness); // Top |
| 4953 | if (border_n == 1) return ImRect(rect.Max.x - thickness, rect.Min.y + perp_padding, rect.Max.x + thickness, rect.Max.y - perp_padding); // Right |
| 4954 | if (border_n == 2) return ImRect(rect.Min.x + perp_padding, rect.Max.y - thickness, rect.Max.x - perp_padding, rect.Max.y + thickness); // Bottom |
| 4955 | if (border_n == 3) return ImRect(rect.Min.x - thickness, rect.Min.y + perp_padding, rect.Min.x + thickness, rect.Max.y - perp_padding); // Left |
| 4956 | IM_ASSERT(0); |
| 4957 | return ImRect(); |
| 4958 | } |
| 4959 | |
| 4960 | // 0..3: corners (Lower-right, Lower-left, Unused, Unused) |
| 4961 | // 4..7: borders (Top, Right, Bottom, Left) |
no test coverage detected