예제 #1
0
        public FortuneVoronoiUI()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            seeder      = new Random();
            pb.AutoSize = true;
            bitmap      = new Bitmap(512, 512);

            background = new Bitmap(512, 512);
            Graphics g2 = Graphics.FromImage(background);

            g2.Clear(Color.White);
            g2 = null;

            g = Graphics.FromImage(bitmap);
            g.SmoothingMode = SmoothingMode.HighQuality;
            g.Clear(Color.White);
            pb.Image      = bitmap;
            this.AutoSize = true;

            voronoi = new Voronoi(0.1);
        }