Cairo feels a lot like OpenGL (Turtle graphics interpreter spike-test limping along...)


I got a simple spike test done for PyCairo usage. Mostly this is just me figuring out how PyCairo works and how it and PyGTK interact. No big deal right now, it takes turtle commands from the turtle object's queue (produced by Python source running in a background thread) and translates them into simple Cairo operations. Does scaling and centering so that the resulting image is always on-screen, but that's about it.

Cairo is lot closer to Turtle graphics than PyGTK. It basically feels like a cut-down version of OpenGL... which makes me want to reach for OpenGL when I'm working with it. Cairo also feels a lot like Turtle graphics :) , simplistic state, not much feedback support. Should see whether GooCanvas or the like allows for higher-level operations (e.g. easy drag and drop, selections, that kind of thing) without making it hard to get back to the base level.

Anyway, with that out of the way I'm planning to modify the spike test to allow for animating the results (no big deal, just need to find the timers in PyGTK so that I can iterate to show fragments of the queue). Then likely look into letting the user step through the code as it is drawn, that is, opening a code-editing window in one frame, the turtle in another and watching a slow animation where the code highlights the lines as the turtle draws the current queue results. That's going to require some finessing of the sys set trace stuff I'm guessing. Also want to allow for the Turtle to notify the GUI when there's new queue items (likely a gobject event).

(For those asking why I'm starting here rather than on the GUI editing stuff, it's mostly because I haven't worked with GTK before (well, not writing it, save via wxPython), so I want to start on a smaller project than a full IDE).

Also finally installed bzr onto my main workstation to check out its capabilities. Try to get to that tomorrow. Still want to get the abiword collaborative stuff built on my workstation as well (so I can develop there). Then there's figuring out a recipe for getting emulated images built easily... lots to get done.

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.