上传者: 42188512
|
上传时间: 2021-11-10 11:11:58
|
文件大小: 357KB
|
文件类型: -
绘制直线与平滑曲线示例
private void Form1_Paint(object sender,PaintEventArgs e)
{
Pen redPen = new Pen(Color.Red, 3);
Pen greenPen = new Pen(Color.Green, 3);
Point[] curvePoints =
{ new Point( 50, 250),new Point(100, 25),new Point(200, 250),
new Point(250, 50),new Point(300, 75),new Point(350, 200),
new Point(400, 150)};
e.Graphics.DrawLines(redPen, curvePoints);
e.Graphics.DrawCurve(greenPen, curvePoints); }