As far as I could get it from the docs (
Tk::Canvas), and as I tried, the following should work: Substitute the
canvas->createArc(...); lines by
$canvas->createArc($x1,$y1,$x2,$y2, -width=> 5, -fill=> 'purple',-outl
+ine=> 'purple',-style=> 'arc', -extent=> 59.59, -start => 300);
$canvas->createArc($x1,$y1,$x2,$y2, -width=> 5, -fill=> 'blue', -outl
+ine=> 'blue', -style=> 'arc', -extent=> 30, -start => 270);
$canvas->createArc($x1,$y1,$x2,$y2, -width=> 5, -fill=> 'red', -outl
+ine=> 'red', -style=> 'arc', -extent=> 150, -start => 120);
$canvas->createArc($x1,$y1,$x2,$y2, -width=> 5, -fill=> 'green', -outl
+ine=> 'green', -style=> 'arc', -extent=> 120, -start => 0);
$canvas->createText($x_center+75, $y_center+75, -fill => 'black', -tex
+t => 'Foo Genome');
$canvas->createText($x_center+75, $y_center+90, -fill => 'black', -tex
+t => '25,632 bp');
Note the additional
-start items.
To your second question: Have a look at the example at the end of
The Perl/Tk User's Guide.
Hope this helped.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.