【C#】Graphics.DrawLine画虚线
					当前位置:点晴教程→知识管理交流
					
					→『 技术文档交流 』
					
				 
				
 private void MainForm_Paint(object sender, System.Windows.Forms.PaintEventArgs e) 
{ 
//点的大小, 值一样则是画点 
float[] BlueValues = {5, 15 20,25s}; 
//颜色及画笔大小设置 
Pen pen = new Pen(Color.Blue, 1); 
//指定设定值,此处可以更改各种线条样式 
pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Custom; 
pen.DashPattern = new float[] { 5, 5 }; 
//画一条竖线 
e.Graphics.DrawLine(pen, new Point(20, 50), new Point(20, 150)); 
} 
该文章在 2022/8/8 18:47:06 编辑过  | 
		
			 关键字查询 
				相关文章 
				正在查询...  |