Beispiel #1
0
        public RayCastForm()
        {
            InitializeComponent();
            UpdateWorker.WorkerReportsProgress = true;
            UpdateWorker.WorkerSupportsCancellation = true;

            RenderGraphics=this.CreateGraphics();

            for (int i = 0; i <=10; i++)
            {
                rSolidBrush = new SolidBrush(Color.FromArgb(i*25, 0, 0));
                solidBrushes.Add(rSolidBrush);
                pens.Add(new Pen(rSolidBrush));
            }

            int ix = 0;
            //RPen = new Pen(GetBrushFromList(solidBrushes,10));
            RPen = GetPenFromList(pens, 10);

            MyRayCast=new CRayCast(this.Width,this.Height);
            MyRayCast.InitRayCast();
            GeneratePens();
            mPen = new Pen(new SolidBrush(Color.White));
            backpen = new Pen(new SolidBrush(Color.Red));

            backpen.DashStyle=DashStyle.Dash;
            UpdateWorker.RunWorkerAsync();

            Paint +=new PaintEventHandler(RayCastForm_Paint);

            //RenderGraphics.Dispose();
        }
Beispiel #2
0
        public RayCastForm()
        {
            InitializeComponent();
            UpdateWorker.WorkerReportsProgress      = true;
            UpdateWorker.WorkerSupportsCancellation = true;

            RenderGraphics = this.CreateGraphics();


            for (int i = 0; i <= 10; i++)
            {
                rSolidBrush = new SolidBrush(Color.FromArgb(i * 25, 0, 0));
                solidBrushes.Add(rSolidBrush);
                pens.Add(new Pen(rSolidBrush));
            }

            int ix = 0;

            //RPen = new Pen(GetBrushFromList(solidBrushes,10));
            RPen = GetPenFromList(pens, 10);

            MyRayCast = new CRayCast(this.Width, this.Height);
            MyRayCast.InitRayCast();
            GeneratePens();
            mPen    = new Pen(new SolidBrush(Color.White));
            backpen = new Pen(new SolidBrush(Color.Red));

            backpen.DashStyle = DashStyle.Dash;
            UpdateWorker.RunWorkerAsync();

            Paint += new PaintEventHandler(RayCastForm_Paint);


            //RenderGraphics.Dispose();
        }