MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / ScaleWindow

Function ScaleWindow

include/imgui/imgui.cpp:15881–15888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15879}
15880
15881static void ScaleWindow(ImGuiWindow* window, float scale)
15882{
15883 ImVec2 origin = window->Viewport->Pos;
15884 window->Pos = ImFloor((window->Pos - origin) * scale + origin);
15885 window->Size = ImTrunc(window->Size * scale);
15886 window->SizeFull = ImTrunc(window->SizeFull * scale);
15887 window->ContentSize = ImTrunc(window->ContentSize * scale);
15888}
15889
15890// Scale all windows (position, size). Use when e.g. changing DPI. (This is a lossy operation!)
15891void ImGui::ScaleWindowsInViewport(ImGuiViewportP* viewport, float scale)

Callers 1

Calls 2

ImFloorFunction · 0.85
ImTruncFunction · 0.85

Tested by

no test coverage detected