----- Original Message -----
From: Martin Peach martin.peach@sympatico.ca To: Jonathan Wilkes jancsika@yahoo.com Cc: András Murányi muranyia@gmail.com; pd-list pd-list@iem.at Sent: Friday, August 26, 2011 2:30 PM Subject: Re: [PD] [PD-dev] tkwidgets
On 2011-08-26 11:31, Jonathan Wilkes wrote:
It might be a good idea to list the problems with tcl/tk so we can weigh them against the difficulty of using a different GUI toolkit. The problems I see are:
- difficult to implement a decent zoom function for a canvas
- can't display png without the Img library (included in 8.6)
- can't do alpha transparency
Of the three I listed, I'm mostly interested in the first as it means that (without prior planning) it's hard to take a patch you've been working on at font size 10 and display it adequately over a projector, for example. (If there's a work around I'd like to know it.)
I'd like to hear others, but I'm mostly interested in problems with tcl/tk >= 8.5 as the GUI.
- Because tcl/tk is an interpreted language it is a lot slower than a compiled
language: you have a script in ASCII that has to go through a processor that interprets the script to call a lower-level machine that actually does the work, while Qt is compiled so it does what you ask it directly, more or less.
- tcl/tk behaves differently on the three main platforms. See the problems with
font sizing for instance.
You cannot guarantee the exact same font metrics across platforms, no matter what toolkit you use, because they depend on the font rendering engine of that particular platform. I checked this out in qt documentation, and the solution was the same as it should be for tcl/tk: have a loop where you measure the width of your text at font size x and increment x until it fits the box without overlapping.
Other than the font, however, the vector drawings on a tk canvas are the same across platforms.
Martin