Version 5 of Tk9

Updated 2006-07-20 21:10:44

George Peter Staplin 2006.07.11 : As the Tcl/Tk core team is taking their time with Tk 8.5, I've been working on my own Tk9 for a few months. It implements a window system using Tcl, and some C extensions from megapkg (megaimage, megaimagetk, structure). It has full support for alpha transparency in any widget. You can rotate windows, and every color in Tk9 consists of [list R G B A].

Features so far include (from megaimage):

  • antialiased line drawing using Wu's algorithm (full RGBA support).
  • rectangle drawing (full RGBA support)
  • rotation
  • scaling
  • arbitrary pixel put/get
  • getrow/putrow
  • and much much more! :)

NEWS 2006.07.20

I created a new demo for x86 Linux (requires an 8.5 tclkit):

http://www.xmission.com/~georgeps/implementation/software/demo/tk9_demo.kit

The mouse input and dragging works perfectly now with rotated tk9_windows. Now you can rotate any window in the demo. Just select the window and click the Tk8.x Rotate button at the bottom. This release is the first that demonstrates the Freetype font feature (only used if you have Vera.ttf).

Thanks to Gerald W. Lester for his help with the rotated-window-mouse-input algorithm, and the developers of the tcllib math package for the excellent point-in-polygon code that I used.

We can also now rotate windows over and over again with only a single rotations loss. This is the first tk9_demo to use the tk9.vfs and what will become the standard window.img.

I've updated the plans here: http://www.xmission.com/~georgeps/documentation/plans/Tk9-13.tar.bz2

Thanks to RDT for testing the demo in Linux. I build the starkits with qemu, and test with an 8.5 Tclkit from Linux via NetBSD's Linux emulation.

The grid manager is also at revision 4 in the 2nd prototype. It's moving along and the results are good.

2006.07.19

I have a working prototype of freetypeext.so:

http://www.xmission.com/~georgeps/implementation/software/demo/text_playground.png

Sample code that generated that is available here:

http://www.xmission.com/~georgeps/implementation/software/demo/text_playground.tcl

I plan to add kerning support, so that the text has better spacing between chars. Also see the text_playground.tcl file for further features I want to add that will be required for things like entry and text widgets.

I've started on my second prototype of a grid manager in Tcl. It now has -columnspan, -rowspan, and -sticky.

http://www.xmission.com/~georgeps/engineering/prototype/grid_proto_structure-4.tcl

A little work everyday adds up to a lot.


At the moment it uses megaimagetk's megaimage.frame (in the demo) for fast shared memory image display. Future performance will be even better.

I have a demo/prototype that you can drag around the windows in, and watch as the alpha transparency works flawlessly with the windows.

Here's an example of the Tk9 demo (prototype WIP):

http://www.xmission.com/~georgeps/implementation/software/demo/tk9_demo.png

Download the demo (for x86 Linux (built in Debian Sarge)): http://www.xmission.com/~georgeps/implementation/software/demo/tk9_demo.kit

Design Plans for Tk9 http://www.xmission.com/~georgeps/documentation/plans/

Future Features

  • megaimage polygon code
  • a new grid manager implemented in Tcl (work in progress)
  • complete window.img and use it in the demo.
  • better handling of alpha transparency when dragging rotated objects in the demo.
  • port to a bare framebuffer and use it as an alternative to X11 (possibly via VESA support).

I'm open to new developers helping. Are any of you interested in a mailing list?