public override Point PortPoint(NodePortDirection direction, string port) { float W = 0, H = 0; int row_height = 0, ins = 0, outs = 0; GetBodySize(ref W, ref H, ref row_height, ref ins, ref outs); if (direction == NodePortDirection.Input) { if (port == "") { return(new Point((int)(X - W / 2), (int)(Y - H / 2 + 10 + row_height / 2))); } else { return(new Point((int)m_ports["in:" + port].X, (int)(m_ports["in:" + port].Y + m_ports["in:" + port].Height / 2))); } } else { if (port == "") { return(new Point((int)(X + W / 2), (int)(Y - H / 2 + 10 + row_height / 2))); } else { return(new Point((int)m_ports["out:" + port].Right, (int)(m_ports["out:" + port].Y + m_ports["out:" + port].Height / 2))); } } }
public override Point PortPoint(NodePortDirection direction, string port) { if (direction == NodePortDirection.Input) { return(new Point(X - 15, Y)); } else { return(new Point(X + 15, Y)); } }
public abstract Point PortPoint(NodePortDirection direction, string port);
public override Point PortPoint(NodePortDirection direction, string port) { return(new Point(X, Y)); }