(C#)GDI+简单绘图画曲线
来源:互联网 发布:x86平板安装ubuntu 编辑:程序博客网 时间:2024/04/30 07:12
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace _10._2._3{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Pen pen = new Pen(Color.Yellow, 5); Point[] points = { new Point(10,20), new Point(120,9), new Point(9,178), new Point(159,28), new Point(80,288), new Point(389,100) }; e.Graphics.DrawCurve(pen, points,0); e.Graphics.DrawCurve(pen, points,1); } }}