in reply to Re^2: Tk:Canvas - Arc with an arrow?
in thread Tk:Canvas - Arc with an arrow?
My program is now consistently displaying little red curved push pins. :-)
Your math skills are quite impressive.
So the next step will be to calculate the correct terminal angle, in order to draw the arrowhead.
By the way, where you've written:
if ($x2 < $x) { my $tmp = $x; $x=$x2; $x2=$tmp; }
the following is a bit more succinct (and avoids the temporary variable):
($x2 < $x) and ($x, $x2) = ($x2, $x); # Swap $x and $x2
|
|---|