Hi,
I am making a C# based windows application in Visual studio 2017.
I am using below code to take center of circles from a file and plotting them with increasing radius. Also, I need to remove the intersection part of all circles.
Please suggest if I can do all the calculations in paint event or I used only only call paint event from other methods.
- protected override void OnPaint(PaintEventArgs e)
- {
- e.Graphics.TranslateTransform(this.ClientRectangle.Width / 3, this.ClientRectangle.Height / 3);
- Pen linePen = new Pen(System.Drawing.Color.CornflowerBlue);
- Int32 Num_of_Lines;
- Int32 gridLength;
- Int32 gridWidth;
- Int32 Size_of_circle;
- while (r < 300)
- {
- for (theta1 = 0; theta1 <= 360; theta1 = theta1 + .360F)
- {
- foreach (PointF point in this.circleCoordinates)
- {
- Pen redPen1 = new Pen(Color.Red, 100);
- e.Graphics.DrawArc(Pens.Red, point.X, point.Y, r, r, theta1, theta1 + .360F);
- }
- }
- e.Graphics.Clear(blue);
- r = r + 25;
- }
- foreach (PointF point in this.circleCoordinates)
- {
- Pen redPen1 = new Pen(Color.Red, 100);
- e.Graphics.DrawArc(Pens.Red, point.X, point.Y, 200, 200, 0, 360F);
- }
- linePen.Dispose();
- base.OnPaint(e);
- }
Please suggest solution for this, Also, give your mail id, so that I can ask my question there.