1.绘制基本图形
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace _02绘制基本图形
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Pen pen = new Pen(Brushes.Red, 5);
private void 直线ToolStripMenuItem_Click(object sender, EventArgs e)
{
graphics.DrawLine(pen, new Point(0, 0), new Point(100, 0));
}
private void 椭圆ToolStripMenuItem_Click(object sender, EventArgs e)
{
graphics.DrawEllipse(pen, new Rectangle(new Point(0, 0), new Size(200, 200)));
}
pri