Angle of graphic line
Hey guys,
Is there a quicker way to find the angle of a graphic line other than using trigonometry?
Background: If I create a new line using add(), this line needs to get a gradient from start point to end point (these are given and used to create the line in the first pace). In order to use the right angle in the gradient settings, I need to know the angle of the graphic line. If I would have to use trigonometry, I would use geometricBounds to find out the height/width of the bounding box, find out the start and end points of my line (which I have) and with that determine in which quadrant the line goes through to use the right formula (sin/cos/tan) and finally convert from radiant to degree. Phew, so if there is any way how to just read the angle of the line, tat would be cool.
Thanks,
Frank
