XEROX DRAWFILE 2 4 1 DrawFile 1 4 By: Ron Kaplan (Kaplan.pa@Xerox.com) Internal INTRODUCTION Contains two functions for reading and writing (color) DRAW-format files into a Lisp figure data-structure. FUNCTIONS (READDRAW FILE FONTS DASHING) [Function] Reads the (color) DRAW-format file FILE into Lisp. FONTS is an alist that maps draw font numbers into font-name font-ascent pairs. DASHING is the Interlisp-D style dashing characteristic to be used for dashed curves. If FONTS is not given, the value of DEFAULTDRAWFONTS is used, and similarly, DEFAULTDASHING is used for DASHING. (WRITEDRAW FILE FIGURE FONTS) [Function] Writes the Lisp figure data-structure FIGURE onto file FILE, which may then be read into DRAW and displayed, edited, printed, etc. FONTS is interpreted as in READDRAW, except that the mappings are done in reverse. A Lisp figure data-structure is a list of figure elements, each one of which is headed by either the atom CURVE, if it is a spline curve, or TEXT, if it is a text string. A figure element may also be a list of figure elements, so that do figures may be ORed together by either LIST or APPEND. The remainder of the elements are defined by the records CURVE, TEXT, and POSITION, which are included in this file. Note that these records are not present on the compiled fileÿÿï%ÿyou should LOADFROM or import this file to get them, and then copy them to your own file of functions that process figures. (SHOWCURVE FIGURE WINDOW) [Function] will draw the given FIGURE in WINDOW. EXAMPLES The package comes with a few data files (DRAWFILE-SNOOPY1 and DRAWFILE-SNOOPY2). NOTES This figure format is identical to the one used by the Interlisp-D figure package for displaying, transforming, and editting figures. (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC )) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC )) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC )) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))1È È(È (È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEADMODERN MODERN MODERN MODERN MODERNLOGO  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN &  l   # LSa  &¬&²    Q†ÞTzº