imgui-node-editor icon indicating copy to clipboard operation
imgui-node-editor copied to clipboard

PinPivotRect isn't applied when the link is drawn with an arrow

Open gnif opened this issue 3 years ago • 0 comments

I am attempting to draw all the input arrows on top of each other, providing a perfect overlap so only one arrow is seen.

Without arrows this works fine: 2022-07-10-191134_371x253_scrot

With the arrows it does not: 2022-07-10-191222_284x223_scrot

To set the pivot point I am using the following code

ImVec2 min = ImGui::GetItemRectMin(); 
ImVec2 max = ImGui::GetItemRectMax(); 
ImVec2 pos =
{
  kind == ed::PinKind::Input ? min.x - 9.0f : max.x + 9.0f,
  min.y + (max.y - min.y) / 2.0f
};
ed::PinPivotRect(pos, pos);

gnif avatar Jul 10 '22 09:07 gnif