mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
parent
ed84b2aaeb
commit
002e513b82
3 changed files with 13 additions and 3 deletions
13
imgui.cpp
13
imgui.cpp
|
|
@ -8192,11 +8192,18 @@ ImDrawList* ImGui::GetWindowDrawList()
|
|||
return window->DrawList;
|
||||
}
|
||||
|
||||
float ImGui::GetWindowDpiScale()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
IM_ASSERT(g.CurrentViewport != NULL);
|
||||
return g.CurrentViewport->DpiScale;
|
||||
}
|
||||
|
||||
ImGuiViewport* ImGui::GetWindowViewport()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindowRead();
|
||||
IM_ASSERT(window->Viewport != NULL);
|
||||
return window->Viewport;
|
||||
ImGuiContext& g = *GImGui;
|
||||
IM_ASSERT(g.CurrentViewport != NULL && g.CurrentViewport == g.CurrentWindow->Viewport);
|
||||
return g.CurrentViewport;
|
||||
}
|
||||
|
||||
ImFont* ImGui::GetFont()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue