public void TransmitBit(Glyph7x5 bit) { if (Out.Bits[InNum] == null) { In.Childrens.Remove(bit); Out.Childrens.Add(bit); Out.Bits[InNum] = bit; bit.ClearIndividualMatrix(); bit.Translate = Out.InputPosition(InNum) - Out.Translate + new Vector2(4, 2); Out.Start(); } }
public void ConnectWire(StreamingVisual from, int outNum, StreamingVisual to, int inNum) { StreamingWire wire = new StreamingWire(from.SimpleShader); Childrens.Add(wire); List <Vector2> points = new List <Vector2> { from.OutputPosition(outNum), to.InputPosition(inNum) }; wire.Path = points; from.ConnectTo(outNum, wire, 0); wire.ConnectTo(0, to, inNum); }
public void ConnectWire(StreamingVisual from, int outNum, StreamingVisual to, int inNum, Vector2[] middlePoints) { StreamingWire wire = new StreamingWire(from.SimpleShader); Childrens.Add(wire); Vector2 posOut = from.OutputPosition(outNum); Vector2 posIn = to.InputPosition(inNum); List <Vector2> points = new List <Vector2>(); points.Add(posOut); points.AddRange(middlePoints); points.Add(posIn); wire.Path = points; from.ConnectTo(outNum, wire, 0); wire.ConnectTo(0, to, inNum); }