TkGS: the Tk Graphics System

TkGS: the Tk Graphics System

By Frédéric BONNET <frederic.bonnet@ciril.fr>

Last updated (d/m/y h:m): 10/02/2000 16:47

TkGS (the Tk Graphics System) is a cross-platform graphics system for the Tk Toolkit that is intended to replace the current XLib emulation layer implemented in the Win32 and MacOS versions of Tk.

TkGS is intended to be a low-level cross-platform API to leverage GUI differences, the same way the Tcl API leverages OS differences. It is not intended to be a high-level drawing system.

TkGS is mainly a specification, although a draft implementation is available. The current specification is available here:

http://www.purl.org/net/bonnet/Tcl/TkGS/specs.htm
There is a draft implementation here:
http://www.purl.org/net/bonnet/pub/TkGS-devel.zip : source archive (33 kB)
http://www.purl.org/net/bonnet/pub/TkGS-devel-win32.zip: binary extension for Windows and Tcl/Tk 8.0 (37 kB)
The first file is a ZIP archive that contains the source for a Tcl loadable extension implementing a simple TkGG-enabled widget. The extension currently only works on Tk8.0, but only minimal effort is needed to port it to higher versions (ie extension-related stuff like stubs). The sources are cross-platform but currently only a Windows MS VC++ project file is supplied. The extension defines, along the widget, several device drivers: Win32 and Xlib (native on Unix, emulated on other platforms) for windowed output, PostScript for PS file generation, and "Canvas script", a special driver that generates Tk canvas commands from TkGS calls. The widget itself is a modified "square" widget from the Tk source (tkSquare.c). The only modifications are drawing related (Xlib calls replaced by TkGS calls) and extra commands for canvas and PostScript output.

This implementation should be considered very alpha software. Its primary intent is to be a proof-of-concept and a testbed for TkGS implementors. Thus, it can still contain old Tk and Xlib calls.


since 09/07/1999.