多边形填充.docxVIP

  • 4
  • 0
  • 约1.72千字
  • 约 5页
  • 2017-02-11 发布于重庆
  • 举报
多边形填充

多边形填充算法实验实验目的掌握区域填充的算法思想,掌握光栅显示系统中多边形扫描线填充和种子填充,掌握4连通和8连通区域的扩展性。熟悉编写算法的原理和过程。实验原理实现基本图形的生成,在c#中利用Drawline,Drawpolygon函数生成多边形。实验算法实验代码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 WindowsFormsApplication1{public partial class Form1 : Form{public Form1(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){Graphics g = this.CreateGraphics();Pen pe = new Pen(Color.Red, 1);g.TranslateTransform(270, 155);g.DrawLine(pe, 100, -20, 200, 50

文档评论(0)

1亿VIP精品文档

相关文档