This should be easy for someone with good Trig skills, but I give it 500 points anyway.

I'm trying to draw an "arrow" on picture, and need to be able to make the arrow "head" proportionally. The arrow head will change depending on the angle that the original line was drawn.

Since everything is in terms of "rects" it's a little tricky to get the arrow head lines in the proper coordinates.

I'm sure it can be done with Cosines, etc. which will be a suitable solution, but if anyone has a brilliant trick I'm open to that too.

For an example of what the arrow would look like, draw a square and then draw a line bisecting it. Erase erased the bottom and right sides, and the erase about 90% of the right and left sides to create the pointing arrow "head". It's easy for a square, but not so easy for a rectangle.

Thanks.

X As Double

Y As Double

xV As Double

yV As Double

End Type

Private Function step(which As atom)

which.X = which.X - which.xV

which.Y = which.Y - which.yV

End Function

Private Function invert(ByRef X As Double) As Double

invert = X * -1

End Function

drawSquare a.X, a.Y, b.X, b.Y, c.X, c.Y, d.X, d.Y

Private Sub drawSquare(x1 As Double, y1 As Double, x2 As Double, y2 As Double, x3 As Double, y3 As Double, x4 As Double, y4 As Double)

On Error Resume Next

l = (Abs(x1 - x2) / 50) Mod 256

Me.Line (x1, y1)-(x2, y2), RGB(256 - l, l, l)

end sub