MCPcopy Create free account
hub / github.com/cinder/Cinder / PushClipRect

Method PushClipRect

src/imgui/imgui.cpp:5720–5725  ·  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

5718// - This is analogous to PushFont()/PopFont() in the sense that are a mixing a global stack and a window stack,
5719// which in the case of ClipRect is not so problematic but tends to be more restrictive for fonts.
5720void ImGui::PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect)
5721{
5722 ImGuiWindow* window = GetCurrentWindow();
5723 window->DrawList->PushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect);
5724 window->ClipRect = window->DrawList->_ClipRectStack.back();
5725}
5726
5727void ImGui::PopClipRect()
5728{

Callers 9

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

Calls 2

GetCurrentWindowFunction · 0.85
backMethod · 0.80

Tested by

no test coverage detected