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

Function DrawPin

imnodes.cpp:1419–1434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1417}
1418
1419void DrawPin(ImNodesEditorContext& editor, const int pin_idx)
1420{
1421 ImPinData& pin = editor.Pins.Pool[pin_idx];
1422 const ImRect& parent_node_rect = editor.Nodes.Pool[pin.ParentNodeIdx].Rect;
1423
1424 pin.Pos = GetScreenSpacePinCoordinates(parent_node_rect, pin.AttributeRect, pin.Type);
1425
1426 ImU32 pin_color = pin.ColorStyle.Background;
1427
1428 if (GImNodes->HoveredPinIdx == pin_idx)
1429 {
1430 pin_color = pin.ColorStyle.Hovered;
1431 }
1432
1433 DrawPinShape(pin.Pos, pin, pin_color);
1434}
1435
1436void DrawNode(ImNodesEditorContext& editor, const int node_idx)
1437{

Callers 1

DrawNodeFunction · 0.85

Calls 2

DrawPinShapeFunction · 0.85

Tested by

no test coverage detected