/// <summary> /// Advanced Initialization /// </summary> /// <param name="c">Connector Alignment on its homeNode</param> /// <param name="r">Drawing position, relative to homeNode</param> /// <param name="n">Connector's homeNode</param> /// <param name="i">Input or Output. <c>true</c> - Input; <c>false</c> - Output</param> public void Init(ConCorner c, Rect r, Node n, knobType i, Color co) { Init(); corner = c; rect = r; homeNode = n; input = i; color = co; }
/// <summary> /// Mirrors this Connector horizontaly to the other side of the Node. Used for /// preventing curve spaghetti, where connection curves run all over the Node /// </summary> public void SwitchSide() { rect.x = -rect.x - rect.width; switch (corner) { case ConCorner.top: corner = ConCorner.right; break; case ConCorner.bottom: corner = ConCorner.left; break; case ConCorner.right: corner = ConCorner.left; break; case ConCorner.left: corner = ConCorner.right; break; } }