MCPcopy Create free account
hub / github.com/Nelarius/imnodes / ScreenSpaceToGridSpace

Function ScreenSpaceToGridSpace

imnodes.cpp:256–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254// [SECTION] coordinate space conversion helpers
255
256inline ImVec2 ScreenSpaceToGridSpace(const ImNodesEditorContext& editor, const ImVec2& v)
257{
258 return v - GImNodes->CanvasOriginScreenSpace - editor.Panning;
259}
260
261inline ImRect ScreenSpaceToGridSpace(const ImNodesEditorContext& editor, const ImRect& r)
262{

Callers 5

BeginCanvasInteractionFunction · 0.85
ClickInteractionUpdateFunction · 0.85
EndNodeEditorFunction · 0.85
SetNodeScreenSpacePosFunction · 0.85

Calls 1

ImRectFunction · 0.50

Tested by

no test coverage detected