public MainForm() { Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; InitializeComponent(); w = new World(); /*SolidColorBitmap scb = new SolidColorBitmap(); * ColorBlender cb = new ColorBlender(); * * w.AddNode(scb); * w.AddNode(cb); * scb.GetPinByName("Color").Connect(cb.GetPinByName("Output"));*/ BitmapFileReader bf1 = new BitmapFileReader(); bf1.FileName = "Base.jpg"; BitmapFileReader bf2 = new BitmapFileReader(); bf2.FileName = "Blend.jpg"; BitmapXBlender bb = new BitmapXBlender(); bb.BlendMode = BlendMode.ColorBurn; bb.SetPinConstantValue("Mix", 1.0); w.AddNode(bf1); w.AddNode(bf2); w.AddNode(bb); bb.GetPinByName("Input 1").Connect(bf1.GetPinByName("Output")); bb.GetPinByName("Input 2").Connect(bf2.GetPinByName("Output")); /* * TimeToLFO t2l = new TimeToLFO(); * t2l.SetPinConstantValue("Amplitude", 0.5); * t2l.SetPinConstantValue("Bias", 0.5); * w.AddNode(t2l); * bb.GetPinByName("Mix").Connect(t2l.GetPinByName("Output")); */ BitmapChannelRemap cr = new BitmapChannelRemap(); w.AddNode(cr); cr.GetPinByName("Input").Connect(bb.GetPinByName("Output")); BitmapViewer bv = new BitmapViewer(); w.AddNode(bv); bv.UpdateInterval = 1000 / 20; bv.GetPinByName("Input").Connect(cr.GetPinByName("Output")); connView.World = w; NodeRegistry.Instance.Populate(); UpdateNodeCatalogView(); UpdateNodeListView(); nodeTabCtrl.SelectedTab = connTabPage; bv.Interact(); }