贝塞尔曲线

来源:互联网 发布:linux退出vi模式 编辑:程序博客网 时间:2024/04/30 06:11
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;using System.Drawing.Drawing2D;namespace WindowsFormsApplication2{    public partial class Form1 : Form    {        public Form1()        {            InitializeComponent();        }        private void Form1_Paint(object sender, PaintEventArgs e)        {            Graphics g = e.Graphics;            Pen p = new Pen(Color.Black, 2.0f);            Point p1 = new Point(50, 100);            Point p2 = new Point(100, 20);            Point p3 = new Point(200, 100);            Point p4 = new Point(250, 20);            g.DrawBezier(p, p1, p2, p3, p4);                  }           }}



0 0