コード例 #1
0
 private void ClrButton_Click(object sender, EventArgs e)
 {
     Tree1.CreateGraphics().Clear(Color.White);
     Tree2.CreateGraphics().Clear(Color.White);
     Tree3.CreateGraphics().Clear(Color.White);
     Tree4.CreateGraphics().Clear(Color.White);
     points = new List <Point>();
     ed[0]  = new List <Point>();
     ed[1]  = new List <Point>();
 }
コード例 #2
0
 private void GenButton_Click(object sender, EventArgs e)
 {
     aT.GTree(aT.root, chance, MaxDEPTH, rnd);
     aT.GetPoints(aT.root, Tree1.Width, Tree1.Height, points, ed);
     Tree1.CreateGraphics().DrawImage(aT.Draw(Tree1.Width, Tree1.Height, points, ed), new Point(0, 0));
     bT = aT;
     Tree2.CreateGraphics().DrawImage(bT.Draw(Tree2.Width, Tree2.Height, points, ed), new Point(0, 0));
     points = new List <Point>();
     ed[0]  = new List <Point>();
     ed[1]  = new List <Point>();
     cT.GTree(cT.root, chance, MaxDEPTH, rnd);
     cT.GetPoints(cT.root, Tree1.Width, Tree1.Height, points, ed);
     Tree3.CreateGraphics().DrawImage(cT.Draw(Tree3.Width, Tree3.Height, points, ed), new Point(0, 0));
     points = new List <Point>();
     ed[0]  = new List <Point>();
     ed[1]  = new List <Point>();
     dT.GTree(dT.root, chance, MaxDEPTH, rnd);
     dT.GetPoints(dT.root, Tree1.Width, Tree1.Height, points, ed);
     Tree4.CreateGraphics().DrawImage(dT.Draw(Tree4.Width, Tree4.Height, points, ed), new Point(0, 0));
     points = new List <Point>();
     ed[0]  = new List <Point>();
     ed[1]  = new List <Point>();
 }