| 15462 | } |
| 15463 | |
| 15464 | static void ScaleWindow(ImGuiWindow* window, float scale) |
| 15465 | { |
| 15466 | ImVec2 origin = window->Viewport->Pos; |
| 15467 | window->Pos = ImFloor((window->Pos - origin) * scale + origin); |
| 15468 | window->Size = ImTrunc(window->Size * scale); |
| 15469 | window->SizeFull = ImTrunc(window->SizeFull * scale); |
| 15470 | window->ContentSize = ImTrunc(window->ContentSize * scale); |
| 15471 | } |
| 15472 | |
| 15473 | // Scale all windows (position, size). Use when e.g. changing DPI. (This is a lossy operation!) |
| 15474 | void ImGui::ScaleWindowsInViewport(ImGuiViewportP* viewport, float scale) |
no test coverage detected