MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / PushClipRect

Method PushClipRect

ImGUI GLFW Tutorial/imgui/imgui.cpp:4364–4369  ·  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

4362// some frequently called functions which to modify both channels and clipping simultaneously tend to use the
4363// more specialized SetWindowClipRectBeforeSetChannel() to avoid extraneous updates of underlying ImDrawCmds.
4364void ImGui::PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect)
4365{
4366 ImGuiWindow* window = GetCurrentWindow();
4367 window->DrawList->PushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect);
4368 window->ClipRect = window->DrawList->_ClipRectStack.back();
4369}
4370
4371void ImGui::PopClipRect()
4372{

Callers 7

TableUpdateLayoutMethod · 0.45
TableDrawBordersMethod · 0.45
RenderNavHighlightMethod · 0.45
GetViewportDrawListFunction · 0.45
AcceptDragDropPayloadMethod · 0.45
ShowDemoWindowLayoutFunction · 0.45

Calls 1

GetCurrentWindowFunction · 0.70

Tested by

no test coverage detected