MCPcopy Create free account
hub / github.com/Joe1sn/S-inject / ScaleWindow

Function ScaleWindow

extern/ImGui/imgui.cpp:15464–15471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15462}
15463
15464static 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!)
15474void ImGui::ScaleWindowsInViewport(ImGuiViewportP* viewport, float scale)

Callers 1

Calls 2

ImFloorFunction · 0.85
ImTruncFunction · 0.85

Tested by

no test coverage detected