2011-09-08 113 views
3

我在ASP.NET中动态生成一个图像。如何绘制箭头而不是下面的代码片段中的行。我找不到任何API。绘制ASP.NET中两点之间的箭头

Bitmap image = new Bitmap(640, 480); 
Graphics graphics = Graphics.FromImage(image); 
. 
. 
graphics.DrawLine(new Pen(Color.Red), lPoint, rPoint); 

回答

4
Bitmap image = new Bitmap(640, 480); 
Graphics graphics = Graphics.FromImage(image); 
Pen p = new Pen(Color.Red, 10); 
p.EndCap = LineCap.ArrowAnchor; 
graphics.DrawLine(p, lPoint, rPoint); 

LineCap Enumeration MSDN