zinc

TkZinc is a Tk widget developed with Perl/Tk, Tcl/Tk and Python/Tk bindings. TkZinc widgets are very similar to Tk canvases in that they support structured graphics. Graphical items can be manipulated, and bindings can be associated with them to implement interaction behaviors. But unlike the canvas, TkZinc can structure the items in a hierarchy, and has support for affine 2D transforms. Clipping can be set for sub-trees of the item hierarchy and the item set is quite more powerful, including field-specific items for Air Traffic systems. TkZinc is fast enough to allow the implementation of 2k2k radar displays with smooth animations. It is structured enough to allow the implementation of direct manipulation desktop GUIs.

Since the 3.2.2 version, TkZinc also offers as a runtime option, support for openGL rendering, giving access to features such as antialiasing, transparency, color gradients and even a new, openGL oriented, item type : triangles. In order to use the openGL features, you need the support of the GLX extension on your X11 server.


 What: TkZinc
 Where: http://www.tkzinc.org/ (AMG: 404)
 Description: Widget with Tcl, Perl, and Python Tk bindings.  Similar to
        canvas, but supports hierarchical structuring and affine 2d transforms.
        Clippings can be set for subtrees. Works with X11 (including MacOS X
        Fink) and Windows.
        Currently at version 3.3
 Updated: 10/2004
 License: LGPL
 Contact: mailto:lecoanet at cena dot fr 

DKF 13/09/2017: Code now appears to be at https://bitbucket.org/plecoanet/tkzinc

chw 2017-10-03: Thanks for the pointer, Tkzinc now runs in undroidwish as per check-in https://www.androwish.org/index.html/info/6cd1c31096bb7936 I wish it could be re-released under a BSD-like license.


IDG Has anyone successfully compiled zinc on Windows?

PT 12-Jun-2003: Yes. The current source distribution (Tkzinc-3.2.93) can be built using Visual Studio 6 using the makefile.vc file included in the distribution. It looks very nice indeed.

If you modify the build file a little it seems that it also supports stubs properly - therefore - you guessed it - it can be used in a starkit. I'll upload a starkit containing the demo code and the windows binary to the sdarchive as tkzinc.kit. I'll leave it to someone else to incorporate linux and other binaries.

PLC I'll try to make a starkit available with each release of Tkzinc. It will contain at least a lib for Windows and one for linux i386 with openGL enabled (it will require a correct openGL install). The starkits will be available on the Tkzinc main site while stable releases will be uploaded to the sdarchive: Get https://www.tcl-lang.org/starkits/tkzinc.kit

PLC 14-May-2004: A new release 3.2.98 is available at the usual place. A starkit for this release is available, it works for Windows and Linux and come with tkimg for convenience (the demos use some png/jpeg images). Run: Tkzinc.kit demo Tkzinc to launch the demo.

CME 8-Oct-2004: A new stable release 3.3 is available at the usual place http://www.tkzinc.org/ . A starkit for this release is available.


Zinc is also a metallic chemical element, symbol Zn, that is often found in dry cells used to power small electrical equipment (e.g. torches, alarm clocks, etc.).

CME A bit of history: Zinc stands for Zinc Is Not Canvas. And Zinc is also a colloquial french word for plane, which seemd great when working in a HMI research team for Air Traffic Control.

Zinc was also a '90s era commercial GUI framework that might now be owned by Wind River.

CME That is why now, the real name became TkZinc and it appears as so in the doc.


Damn! Looks very interesting. Given the item hierarchy abilities, does anybody else see this as possibly the basis of a real tk html display widget?

PWQ 16 Jan 05, I compiled zinc under linux with openGL support (would not compile without it). I ran the demos. The performance was underwelming. I have accelerated card and compared with other GL demos, this one was bad. I don't know where all the time was spent, but it would not cut it as a html, canvas, or any other type of widget.

PLC Ok, Tkzinc is not using all the tricks to get a real fast openGL experience but then it should not be underwelming either. Could you give some more info on the problems ? BTW, I would love to find some tool to grasp where the bottlenecks really are. I am trying to use MacOS openGL profiler to that end. Any idea if such a tool is available on Windows ?


Why does Tcl seem to have caught on so much better in the francophone world? We may have to change its name to Freedom Script.


DKF: There have been suggestions that Tk should use Zinc for a next-generation canvas. However, Zinc is GPL and thus impossible to integrate with the core. Seriously. It can't be done without forcing many commercial users of Tk to drop their use of our software. The GPL fanatics would have us think this this is acceptable natural wastage, but they are WRONG.

CME: There was an error in Zinc description above. TkZinc or Zinc is LGPL. It is by the way already in use for commercial purposes.

GWL: LGPL is still problematic (mostly politically) for many companies. It would simplifiy things if they could be convinced to go BSD like the Tcl/Tk core. Then it might be possible to get Zinc used as the next-generation canvas.

PLC: I am really considering a switch to the same licensing as Tk itself. It might be active in the next release.

JoseEMarchesi I find the LGPL license quite convenient for Zinc. I would ever prefer GPL. BTW, i am not a fanatist of any kind. I would not call the BSD supporters fanatists.


GN Does zinc work with TCL/TK Aqua or only under x11?

PLC: It currently works only under X11. I am considering a native port but it seems that some criteria are not met yet. For one, it seems difficult to emulate polygonal regions in the current compatibility layer


this might be a stupid question, i'm a total newbie at Tcl/Tk but how do you install tkZinc-3.3.0 on a winXP desktop?? How does one use the starkit?


AM (21 august 2008) Here is some information on TkZinc from the zinc mailing list that might be of interest:

Philipp Wissneth wrote:

> Hello all, > > maybe some people won't like this question to be asked but for the further development of a long term project i'm working on it is quite important: Is there still any development activity on Tkzinc or is it stuck? I'm asking because the recent changes in the tkpath package make it an interesting canvas alternative, too (aside from the impression that it seems to be at an earlier stage of development than Tkzinc). > > Any replies are welcome :) > Hello Philipp,

 Well, I am still working on Tkzinc but on a new version which will drop quite
 a lot from the current stable code. This is a big step and a lot of work.
 We think it is worth it but it has some side effects such as the freeze of
 the current code. It will be maintained but no new features will be added by
 lack of time and volunteers.

 To give you an idea of the magnitude of the changes, Tkzinc new version
 drops the support for X11/GDI drawing to concentrate on OpenGL and 
 possibly DirectX. Likewise the new widget is no longer a part of Tk.
 Most of Tk intrinsics are still used but the idea is to offer a coherent
 graphical base to create high level specialized toolkits in a script
 language. This graphical substrate will offer modern rendering 
 capabilities (SVG, filters, porter duff compositing, ...) consistently
 to all toolkit graphical objects. The code is interfaced natively to
 python, perl, C, and if there is demand/volunteers can be to Tcl.

 Working code is already available with, not surprisingly, a lot a bugs,
 instabilities and limitations. For now, the plan is to explore breadth
 first, the most complex or novel features. This includes for example
 SVG filters, compositing, the beginning of an interface toolkit,
 ... and then plan a first working release. The end of this year can
 be a good candidate.

 Hope this shed some light on what is going on,

 Patrick

img_tkzinc