## Painting an arrow

### Painting an arrow

As trivial as it may sounds painting an arrow at the end of a line (of
arbitrary angle) isn't easy afterall. The line crosses vertically from
(0,0) to (Width, Height) of a TGraphicControl. Now the idea is to draw
a polygon (triangle) with (0,0) and (x1,y1), (x2,y2) the points of its
edges. How do you calculate these values. Assume an arraw
with top angle of 30 degrees.

Any ideas?

Thanks
George

### Painting an arrow

George -

completely. In particular, if you've already chosen x1, y1, x2 and y2
then that pretty much determines the shape of the arrow. If you're
trying to figure out what x1, y1, x2 and y2 should be, then you need
to decide how far back down the line you want the arrow to extend.
Once you have that, apply basic geometry and use the Sin and Cos
functions as required.

Good luck.

Kurt

You can try my M*Shape components. Its simple draw any figure you like,
Polygons, PolyLines, PolyPolygons, PolyPolyLines, Bezier curves.
Its suitable as for usual forms as for QuickReport both.
There are very comprehensive property editors - Designer(like graphic
editor) and Editor (like spreadhit coordinate editor) and Regular editor (to
make regular poly's and stars).

You are welcome to my Delphi web-pages   www.chat.ru/~markmal

Mark