(C#)GDI+简单绘图画曲线

原文链接: http://www.cnblogs.com/finlay/archive/2012/11/22/3234761.html
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);
        }
    }
}

转载于:https://www.cnblogs.com/finlay/archive/2012/11/22/3234761.html

猜你喜欢

转载自blog.csdn.net/weixin_30894389/article/details/94921382
今日推荐