- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
void Draw(object sender, PaintEventArgs e)
{
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
//X
e.Graphics.DrawLine(new Pen(Color.Blue, 3), new Point(0, this.Height / 2), new Point(this.Width, this.Height / 2));
//Y
e.Graphics.DrawLine(new Pen(Color.Red, 3), new Point(this.Width / 2, this.Height), new Point(this.Width / 2, 0));
PointF[] p = new PointF[this.Width];
//MessageBox.Show((Math.PI / 180 * 1).ToString());
for(int i = 0, z = this.Width; i < (this.Height / 2); i++, z++)
{
p[i].X = (float)Math.Cos(z) * this.Width;
p[i].Y = (float)Math.Sin(i) * this.Height;
}
e.Graphics.DrawCurve(new Pen(Color.LightSkyBlue, 2), p, 2);
}