[Tkinter-discuss] Angled text on canvas.

Michael Lange klappnase at web.de
Sat Nov 20 16:12:57 CET 2010


Hi,

Thus spoketh Cam Farnell <msa01 at bitflipper.ca> 
unto us on Fri, 19 Nov 2010 23:32:11 -0400:

> Hmm. Need to draw text on an angle on a canvas but no mention of angled
> text in the documentation.
> 
> Does anyone know if there is actually a way to do this or is it time to
> implement a vector font and do it the hard way?

In Tk-8.6 the canvas text element has a new -angle option, so using
Tk-8.6 is definitely the best way to do this.
If installing Tk-8.6 is not an option for you, you may try Blt which
seems to be able to rotate text according to: http://wiki.tcl.tk/3365 or
to use tkImg to create a window-image object and then rotate this image
as demonstrated in http://wiki.tcl.tk/4022 . The tcl wiki shows a few
more examples (see http://wiki.tcl.tk/_/gsearch?S=rotate+text) but they
are all more or less a pain in the neck, if possible I recommend using
Tk-8.6, it's probably much easier to install it and recompile Python to
use it than to set up rotated text with older tk versions.

Regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Yes, it is written.  Good shall always destroy evil.
		-- Sirah the Yang, "The Omega Glory", stardate unknown


More information about the Tkinter-discuss mailing list