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

Function WindowPosAbsToRel

include/imgui/imgui_internal.h:3138–3138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3136 inline ImRect WindowRectAbsToRel(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x - off.x, r.Min.y - off.y, r.Max.x - off.x, r.Max.y - off.y); }
3137 inline ImRect WindowRectRelToAbs(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x + off.x, r.Min.y + off.y, r.Max.x + off.x, r.Max.y + off.y); }
3138 inline ImVec2 WindowPosAbsToRel(ImGuiWindow* window, const ImVec2& p) { ImVec2 off = window->DC.CursorStartPos; return ImVec2(p.x - off.x, p.y - off.y); }
3139 inline ImVec2 WindowPosRelToAbs(ImGuiWindow* window, const ImVec2& p) { ImVec2 off = window->DC.CursorStartPos; return ImVec2(p.x + off.x, p.y + off.y); }
3140
3141 // Windows: Display Order and Focus Order

Callers 3

GetIDFromPosMethod · 0.85
BoxSelectPreStartDragFunction · 0.85
EndBoxSelectMethod · 0.85

Calls 1

ImVec2Function · 0.85

Tested by

no test coverage detected