Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing Arrow between two points in ASP.NET

I am dynamically generating an image in ASP.NET. How can I draw an arrow instead of the line in the below code snippet. I couldn't find any API for this.

Bitmap image = new Bitmap(640, 480);
Graphics graphics = Graphics.FromImage(image);
.
.
graphics.DrawLine(new Pen(Color.Red), lPoint, rPoint);
like image 306
Ajay Avatar asked Nov 15 '25 15:11

Ajay


1 Answers

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);

See LineCap Enumeration MSDN

like image 179
CharithJ Avatar answered Nov 17 '25 05:11

CharithJ