### Re^4: How to draw a curved arrow in perl Tk canvas ?

by KuntalBhusan (Acolyte)
 on Aug 01, 2012 at 10:46 UTC ( #984759=note: print w/replies, xml ) Need Help??

Thanks a lot....this solved my problem. I would also require to draw a self loop for a node in a canvas,i.e, an edge that will start and end in the same node showing a small loop. Is there some way around preferably using the createLine function... Precisely what I require is given a point (\$x,\$y), How to draw a small circular loop around it using createLine function. Any help would be highly appreciated...Thanks again for the help provided so far..
• Comment on Re^4: How to draw a curved arrow in perl Tk canvas ?

Replies are listed 'Best First'.
Re^5: How to draw a curved arrow in perl Tk canvas ?
by BrowserUk (Pope) on Aug 01, 2012 at 12:23 UTC
would also require to draw a self loop for a node in a canvas,i.e, an edge that will start and end in the same node showing a small loop.

Isn't that simply a circle? See Tk::Canvas createOval().

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

Not actually...I wanted using the createLine....but indeed it was simple..I figured it out just after posting :)
```
my (\$x1,\$y1);
my \$r = 50; # radius
my @new_coords = (\$x1,\$x2,\$x1-\$r,\$x2+\$r,\$x1,\$x2+(2*\$r),\$x1+\$r,\$x2+\$r,\$
+x1,\$x2+8);
\$id = \$can->createLine(@new_coords);

Thanks for the help anyways...

Create A New User
Node Status?
node history
Node Type: note [id://984759]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2018-03-22 00:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
When I think of a mole I think of:

Results (272 votes). Check out past polls.

Notices?