MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / PushClipRect

Method PushClipRect

3rdparty/imgui/src/imgui.cpp:5904–5909  ·  view source on GitHub ↗

Push a clipping rectangle for both ImGui logic (hit-testing etc.) and low-level ImDrawList rendering. - When using this function it is sane to ensure that float are perfectly rounded to integer values, so that e.g. (int)(max.x-min.x) in user's render produce correct result. - If the code here changes, may need to update code of functions like NextColumn() and PushColumnClipRect(): some frequently

Source from the content-addressed store, hash-verified

5902// - This is analogous to PushFont()/PopFont() in the sense that are a mixing a global stack and a window stack,
5903// which in the case of ClipRect is not so problematic but tends to be more restrictive for fonts.
5904void ImGui::PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect)
5905{
5906 ImGuiWindow* window = GetCurrentWindow();
5907 window->DrawList->PushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect);
5908 window->ClipRect = window->DrawList->_ClipRectStack.back();
5909}
5910
5911void ImGui::PopClipRect()
5912{

Callers 11

TableUpdateLayoutMethod · 0.45
TableDrawBordersMethod · 0.45
RenderNavCursorMethod · 0.45
GetViewportBgFgDrawListFunction · 0.45
DemoWindowLayoutFunction · 0.45

Calls 2

GetCurrentWindowFunction · 0.85
backMethod · 0.45

Tested by

no test coverage detected