`
touchinsert
  • 浏览: 1291789 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

C# 图片上画连线时 自定义两点间的划线段样式

 
阅读更多
Graphics g = this.pictureBox1.CreateGraphics();
Brush brush = new SolidBrush(Color.White);
Pen pen = new Pen(brush, 1);
//pen.DashStyle = DashStyle.Solid;//using System.Drawing.Drawing2D;
pen.DashPattern = new float[]{2,10};
pen.DashStyle = DashStyle.Custom;
g.DrawLine(pen,new Point(x1,y1),new Point(x2,y2));
g.Dispose();
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics