I wish to write a PHP script that allows users to dynamically create images consisting of squares, lines and arrows. I know that there are functions in the GD library that draw rectangles, lines and polygons but have noticed that there is no function that allows the production of arrows and so have came to the realisation that I will have to write function to draw them myself.
Drawing the main body of the arrow (i.e. the line) is easy, the bit I am stuck with is drawing the lines representing the arrow head. This is because I wish to allow users to be able to draw arrow of any length and at any angle, and thus the angle of the arrow head lines will be different for every arrow drawn.
Does anyone have any suggestions about what I could do?
Thanks for your time and help in advance,