ezd - easy drawing for programs on X displays Ezd is a graphics server that sits between an application program and the X server and allows both existing and new programs easy access to structured graphics. Ezd users have been able to have their programs produce interactive drawings within hours of reading the man page. Structured graphics: application defined graphical objects are ordered into drawings by the application. Drawings are displayed by mapping them onto windows. Multiple drawings may be mapped onto a window and a drawing may be mapped onto multiple windows. Pan and zoom operations are done by remapping the drawing. Postscript renderings of a window's contents are produced by a single command. Loose coupling to the application program: unlike most X tools, ezd does not require any event handling by the application. The ezd server mantains window contents. As the application makes changes to drawings, the server smoothly corrects the display. Communication between the application and the server is via text streams so feel free to write your application in COBOL. Interaction: objects in drawings are made interactive making them sensitive to mouse and keyboard events. When an event occurs on such an object, an application supplied Scheme expression is evaluated. This expression may simply relay the event to the application, or the entire application may be written in Scheme and embedded in the server. An example: draw three overlapping circles; when mouse button 1 is clicked on a circle, raise it to the top of the drawing: (object c1 (fill-arc 0 0 60 60 0 360 red)) (object c2 (fill-arc 30 0 60 60 0 360 green)) (object c3 (fill-arc 15 30 60 60 0 360 blue)) (click * 1 (ezd `(float ,*user-event-object*))) A technical report is available that describes this software: Bartlett, Joel F., "Don't Fidget with Widgets, Draw!", WRL Research Report 91/6, May 1991. You may send your order to: Technical Report Distribution DEC Western Research Laboratory, WRL-2 250 University Avenue Palo Alto, California 94301 USA or you may order via electronic mail by sending a message with "help" in the subject line to one of the following addresses: Digital E-net: DECWRL::WRL-TECHREPORTS Internet: WRL-Techreport@decwrl.dec.com UUCP: decwrl!wrl-techreports The software is owned by Digital Equipment Corporation and available under the following conditions: ;* Copyright 1990 Digital Equipment Corporation ;* All Rights Reserved ;* ;* Permission to use, copy, and modify this software and its documentation is ;* hereby granted only under the following terms and conditions. Both the ;* above copyright notice and this permission notice must appear in all copies ;* of the software, derivative works or modified versions, and any portions ;* thereof, and both notices must appear in supporting documentation. ;* ;* Users of this software agree to the terms and conditions set forth herein, ;* and hereby grant back to Digital a non-exclusive, unrestricted, royalty-free ;* right and license under any changes, enhancements or extensions made to the ;* core functions of the software, including but not limited to those affording ;* compatibility with other hardware or software environments, but excluding ;* applications which incorporate this software. Users further agree to use ;* their best efforts to return to Digital any such changes, enhancements or ;* extensions that they make and inform Digital of noteworthy uses of this ;* software. Correspondence should be provided to Digital at: ;* ;* Director of Licensing ;* Western Research Laboratory ;* Digital Equipment Corporation ;* 250 University Avenue ;* Palo Alto, California 94301 ;* ;* This software may be distributed (but not offered for sale or transferred ;* for compensation) to third parties, provided such third parties agree to ;* abide by the terms and conditions of this notice. ;* ;* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL ;* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF ;* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT ;* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL ;* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ;* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ;* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS ;* SOFTWARE. The software is available for anonymous ftp from 'gatekeeper.dec.com' [16.1.0.2]. The ezd files are in '/pub/DEC/ezd'. These files include: README - this file 01jul91.tar.Z - compressed tar file containing all source, DECstation .o files, examples, and documentation. To build ezd: 1. Create an working directory and load the files into it: > mkdir ezd-work > cd ezd-work > mv ???/???/???/01jul91.tar.Z . > uncompress 01jul91.tar.Z > tar -xf 01jul91.tar The directory now contains the Scheme->C source and DECstation .o files for the software. The doc directory contains the troff source and PostScript for the man page. The examples directory contains a few examples. 2. Build ezd. For a DECstation, this is straight forward as the .o files for ezd and Scheme->C are part of the distribution: > make ezd-for-DECstation Other systems require Scheme->C, a portable Scheme-to-C compiler, as the ezd source must be compiled to C and then linked with a system specific version of the Scheme->C runtime library. The Scheme->C system is also available from 'gatekeeper.dec.com' and is in the directory '/pub/DEC/Scheme-to-C'. Once it has been installed, change the SCXL variable in 'makefile' to designate the Scheme->C X library, scxl.a, and: > make ezd 3. Test ezd by compiling one of the examples, make sure that the environment variable DISPLAY is correctly set: > cd examples > make clock > ln -s ../ezd > clock A window containing a clock face should now be displayed. Drag either of the hands using mouse button 1 to set the clock. Click mouse button 3 on the background to terminate the program. Joel Bartlett bartlett@decwrl.dec.com