New for version 1.2 ------------------- -- Simultaneously Python 2.x and 3.x compatible -- Revised internal data structures provide order of magntidue speedup for the core rendering system. As a result, system can gracefully handle upward of 1000 elements. -- For objects with equivalent depth, Z-ordering is consistent with the order in which those objects were added (with most recently added rendered on top); that ordering had been arbitrary in earlier versions. -- Image class supports pixel-level manipulations, both for images loaded from a file, or for an initially empty pixmap with given dimensions. Queries and updates are made with new methods getPixel(x,y) and setPixel(x,y,color). For efficiency sake, changes are batched and rendered only upon call to new method updatePixels() -- Images support full set of transformations (e.g., scale, rotate, flip, shear), without use of Python Image Library, as PIL is not yet available for Python3. Albeit, with relatively moderate speed. -- Shapes allow for dashed/dotted lines for their borders by use of a new method Shape.setBorderDash(dashLength, gapLength). For example, setBorderDash(3,2) gives a pattern of the form '--- --- ---' -- Path and Spline support forward and/or reverse arrows on their ends, via a new method setArrows(forward, reverse), where the parameters are booleans to designate whether arrows should be rendered. -- Horizontal justification of multiline messages for a Text object can be controlled with new method setJustification(style), where style is 'left', 'right', or 'center' -- Font size has been made more system-independent at 96 PPI, so that 12-pt font is rendered with approximate height of 16-pixels. -- Scaling a shape adjusts the border width accordingly. -- All Drawable objects, including Layers or user-defined subclasses, support freeze() and unfreeze() methods that allow for multiple changes to be made to the object without rendering intermediate states. (akin to the way that top-level canvases support explicit refreshes). This allows for code to perform batched manipulation of objects without reference to the containing canvas. -- Layer class supports a finalize() method. If this method is called, it permanently locks the composition of the layer. No further adds or removes can be made, although existing components of the layer can still be manipulated. -- Path, Polygon, Spline, and ClosedSpline classes support a finalize() method. If this method is called, it permanently locks the sequence of points that define the underlying path. -- Fixed a bug with Canvas methods zoomView and rotateView (previously zoom and rotate), that affected their behavior when combined with setView (previously setViewWindow) -- Improved support for "math mode" coordinate systems. An initial call to cs1graphics.configureMathMode(), canges the entire graphics system so that all canvases use the standard mathematics coordinate system with the origin at bottom-left and the positive y-axis oriented upward. In math mode, a positive rotation is conventionally counterclockwise rather than clockwise. -- For greater robustness across systems, cs1graphics performs all rendering and event handling in the main thread by default, rather than in a secondary thread. This is especially important on systems (most notably, the default OSX installation), which do not support accessing the underlying Tk instances from a secondary thread. The only semantic consequence of this decision involves the way EventHandlers are activated. The handlers are not immediately activated upon the addHandler call, as was the case in earlier versions of cs1graphics. Instead, they become active when the end of the main thread is reached (i.e., at end of script, or ctrl-D in interpreter), or when an explict call to a new function cs1graphics.startEventHandling() is made. This new function is a blocking call; control can be returned to the primary thread via a call to a new function stopEventHandling() from within a handler. Call cs1graphics.configureMultiThreaded upon initialization to revert to the truly multi-threaded mode, with rendering and event handling in a secondary thread. -- Deprecated requirement that _draw() method for user-defined classes bracket all commands within calls to _beginDraw() and _completeDraw(). For backward compatability, those functions still exist, yet do nothing. We note that the following previous features of cs1graphics have not yet been ported to the 1.2a1 alpha version, although we intend to address this support before a final release. -- Button, TextBox, Timer, and Monitor classes -- Added support for Python Image Library with Python2 to gain support for additional file formats, or faster image transformations -- Support for Canvas methods beginAnimation, createFrame, endAnimation -- configureMultiThreaded() has not been widely tested