Example #1
0
File: Form1.cs Project: Lawyar/TVP
        private void AddPoloski(int nPolos)
        {
            for (int i = 0; i < nPolos; i++)
            {
                ori = random.Next(0, 9);

                int x = random.Next(this.Width - 200);
                int y = random.Next(this.Height - 200);

                if (ori < 5)
                {
                    Polosa p = new Polosa(x, y, wPolos, hPolos);
                    p.set_color(random.Next(0, 255), random.Next(0, 255), random.Next(0, 255));
                    pList.Add(p);
                }
                else
                {
                    Polosa p = new Polosa(x, y, hPolos, wPolos);
                    p.set_color(random.Next(0, 255), random.Next(0, 255), random.Next(0, 255));
                    pList.Add(p);
                }
            }
        }
Example #2
0
File: Polosa.cs Project: Lawyar/TVP
 internal bool Overlap(Polosa p)
 {
     return(r.IntersectsWith(p.r));
 }