The Tk::Abstract canvas manual page in CPAN says of a method :
$acnv->rotate(TagOrID, angle ?,x, y?)
This method rotates the object identified by TagOrID by angle. The ang
+le is specified in degrees. If an x, y coordinate is specified, then
+the object is rotated about that point. Otherwise, the object is rota
+ted about its center point, if that can be determined.
and also mentions later that :
As it stands, the module can only rotate the following object types ab
+out their centers:
Rectangles (if rectToPoly(1) is called)
Ovals (if ovalToPoly(1) is called)
All other object types (bitmap, image, arc, text, && window) can only
+be rotated about another point. A warning is issued if the user tries
+ to rotate one of these object types about their center. Hopefully, m
+ore types will be able to center-rotate in the future.
This means that it is able to rotate texts...
when I tried to do the same using the code below, my text is not rotated...
my $w = $mw->screenwidth;
my $h = $mw->screenheight;
my $canvas = $mw->Scrolled('AbstractCanvas',
-background => "white",
-scrollbars => "osoe",
-height => 0,
-relief => "solid",
-width => 0,
)->pack(-anchor=>'nw', -side=>'top', -fill=>'both', -expand=>1);
my $text = $canvas->createText(0,0,-anchor=>'center',-fill => 'red',-t
+ext => 'Hello Monks !!!',);
#my $text = $canvas->createText(2,10,-anchor=>'center',-fill => 'red',
+width => 1,-text => 'Hello Monks !!!',); ## this rotates but not the
seeking the Monks help..