紫夜非君吧 关注:8贴子:121
  • 0回复贴,共1

GDI+绘制粗箭头

只看楼主收藏回复

Point p1 = new Point(20,20);
Point p2 = new Point(80, 300);
Graphics g = this.Chart.CreateGraphics();
//Pen p = new Pen(Color.Blue,5);
//p.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid;//恢复实线
//p.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;//定义线尾的样式为箭头
Penlinepen = new Pen(Color.Blue, 2);
linepen.CustomEndCap = new System.Drawing.Drawing2D.AdjustableArrowCap((float)(linepen.Width * 3), (float)(linepen.Width * 4), true);
g.DrawLine(linepen, new Point(10, 10), new Point(100, 100));
//g.DrawLine(p,p1,p2);
g.Dispose();


IP属地:上海1楼2016-06-13 18:38回复