J
Jon Cosby
I'm using this to draw rectangles in a PictureBox image. Not all of the
rectangles are complete, and after drawing several, some of them start
disapearing. What's the reason for this?
Pen selPen = new Pen(Color.White);
Graphics graphic = this.PicBox.CreateGraphics();
..................
Point coord1 = new Point(x0, y0);
Point coord2 = new Point(x0, y);
Point coord3 = new Point(x, y0);
Point coord4 = new Point(x, y);
graphic.DrawLine(selPen, coord1, coord2);
graphic.DrawLine(selPen, coord1, coord3);
graphic.DrawLine(selPen, coord2, coord4);
graphic.DrawLine(selPen, coord3, coord4);
rectangles are complete, and after drawing several, some of them start
disapearing. What's the reason for this?
Pen selPen = new Pen(Color.White);
Graphics graphic = this.PicBox.CreateGraphics();
..................
Point coord1 = new Point(x0, y0);
Point coord2 = new Point(x0, y);
Point coord3 = new Point(x, y0);
Point coord4 = new Point(x, y);
graphic.DrawLine(selPen, coord1, coord2);
graphic.DrawLine(selPen, coord1, coord3);
graphic.DrawLine(selPen, coord2, coord4);
graphic.DrawLine(selPen, coord3, coord4);