作业:文档形式

3到5页理解

1.理解

2.源代码解释(1到2页)

3.实现效果

项目地址: https://github.com/zhiyishou/polyer

Demo:https://zhiyishou.github.io/Polyer

[图形学]Delaunay三角剖分算法附C++实现

https://blog.csdn.net/qq_31804159/article/details/81709423

算法丨带内外边界的三角剖分算法(Delaunay)

https://blog.csdn.net/npu2017302288/article/details/80460552

三角剖分算法(delaunay)

https://www.cnblogs.com/zhiyishou/p/4430017.html

GDI

https://www.cnblogs.com/stg609/archive/2008/03/16/1108333.html

1.pen类创建画笔对象:

1) 新建一个Windows应用程序,适当加宽窗体宽度。然后切换到代码方式,添加名称空间引用:
using System.Drawing.Drawing2D;
2) 添加Form1_Paint事件代码

3)在Form1_Load中手动添加paint事件:

this.Paint += new PaintEventHandler(Form1_Paint);

 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; namespace drawpicture
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics; //创建画板,这里的画板是由Form提供的.
Pen pen = new Pen(Color.Blue, 10.5f);
g.DrawString("蓝色,宽度为10.5", this.Font,
new SolidBrush(Color.Black), , );
g.DrawLine(pen, new Point(, ), new Point(, ));
pen.Width = ;
pen.Color = Color.Red;
g.DrawString("红色,宽度为2", this.Font,
new SolidBrush(Color.Black), , );
g.DrawLine(pen, new Point(, ), new Point(, ));
pen.StartCap = LineCap.Flat;
pen.EndCap = LineCap.ArrowAnchor;
pen.Width = ;
g.DrawString("红色箭头线", this.Font,
new SolidBrush(Color.Black), , );
g.DrawLine(pen, new Point(, ), new Point(, ));
pen.DashStyle = DashStyle.Custom;
pen.DashPattern = new float[] { , };
pen.Width = ;
pen.EndCap = LineCap.NoAnchor;
g.DrawString("自定义虚线", this.Font,
new SolidBrush(Color.Black), , );
g.DrawLine(pen, new Point(, ), new Point(, ));
pen.DashStyle = DashStyle.Dot;
g.DrawString("点划线", this.Font, new SolidBrush(Color.Black), , );
g.DrawLine(pen, new Point(, ), new Point(, ));
}
private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
{ } private void Form1_Load(object sender, EventArgs e)
{
this.Paint += new PaintEventHandler(Form1_Paint);
} private void button1_Click(object sender, EventArgs e)
{ }
}
}

整个源码

运行情况:

2.画刷

public void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
SolidBrush myBrush = new SolidBrush(Color.Red);
g.FillEllipse(myBrush, this.ClientRectangle);
}

最新文章

  1. 安全退出,清空Session或Cookie
  2. 2016中国大学生程序设计竞赛(长春) Ugly Problem 模拟+大数减法
  3. Storm集群的安装配置
  4. linker command failed with exit code 1 (use -v to see invocation)
  5. html --- ajax --- javascript --- 简单的封装
  6. 【转】iOS中定时器NSTimer的使用
  7. jquery中json数据转换为字典
  8. Java多线程练习
  9. QuickReport多页打印
  10. DB2数据类型
  11. apollo实现c#与android消息推送(三)
  12. 异常-----freemarker.core.NonStringException
  13. 【编程笔记】Unity3D语言的类型系统--C#的类型系统
  14. 【HDU 1576】 A/B
  15. torch.view()详解及-1参数是什么意思
  16. Linux 部署 xxl-job 注意问题
  17. 001-RESTful服务最佳实践-RestFul准则、HTTP动词表示含义、合理的资源命名、响应格式XML和JSON
  18. day11 闭包函数和装饰器
  19. Android.PackageManager
  20. SVN previous operation has not finished

热门文章

  1. [转载]HTTP无状态是什么意思?
  2. php学习笔记-include
  3. R: 一页显示多张图的方法
  4. 3、PACBIO下机数据如何看
  5. debug配置
  6. DjVu、PDF中的隐藏文本
  7. 英文操作系统中中文乱码(SQL中 NVARCHAR 和 VARCHAR区别)
  8. blkid找不到需要的uuid
  9. C#去边框以及无边框窗体移动
  10. Quick Reference Card Urls For Web Developer