Hi all experts
I want draw a triangle with GD library with PHP. One soulation is using imagefilledpolygon function for draw a filled polygon. The second parameters in this function is an array containing the x and y coordinates of the polygons vertices consecutively. But I wnat draw with lenght of side! Type of triangles and their angles not important.
For example with three value in pixel unit I have a triangle in output!
Anyone help me?
I described in my first post:
The second parameters in this function is an array containing the x and y coordinates of the polygons vertices consecutively. But I wnat draw with lenght of side! Type of triangles and their angles not important.
For example with three value in pixel unit I have a triangle in output!
well, even for the imageline function, you need a set of x/y coordinates for the beginning of a line, and another for the end, so that won’t help you, either. I suppose you can create your own function that takes a starting point, length in pixels, and an angle to draw the line in, but that’s an awful lot of math to do, with sine, cosine and tangent (in some cases) calculations. Sounds like a lot of work.
Go to bed, Paul. How can you expect me to catch your post count, if you stay up and post more? In fact, you deserve a break. Take a week off. You deserve it. Better yet, take 2.