2011-09-08 81 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