Output destination argument of McCLIM listener commands - Lisp Propulsion Laboratory log

Lisp Propulsion Laboratory log

Paolo Amoroso's weblog. Main interests: Lisp, astronomy (Moon), space exploration (Apollo and early manned programs) Calendar of past entries | Related links xml

Output destination argument of McCLIM listener commands

Friday, August 20, 2004

It is possible to print to a PostScript file the class graphs discussed in yesterda's entry, by taking advantage of the :Output Destination keyword argument of Show Class Superclasses, Show Class Subclasses and other McCLIM listener commands.

The possible values of :Output Destination can be File, for sending the output to a file, Stream, for sending it to a CLIM stream, or Postscript File. Here is the listener command for drawing a graph of clim:gadget's subclasses, scaled at 0.9 in both axes, to a PostScript file (user input emphasized):

Show Class Subclasses (class) clim:gadget
(keywords):Scale X (scale x[1]) 0.9 :Scale Y (scale y[1]) 0.9
:Output Destination (output destination[NIL]) (completion[STREAM])
Postscript File (postscript destination) "filename.ps"

The resulting PostScript file is here. You need yesterday's patch for this to work. Also note that in the description of yesterday's command, I forgot to emphasize some of the user input, i.e. keyword argument names.

The PostScript output of the above command with the same graph at full size shows that McCLIM's PostScript generation needs some more work. In particular, page margins and fitting all the output within the page don't work. While in the caveats department, also note that support for the output destination keywork is still experimental. But this functionality looks promising.

Copyright © 2004 by Paolo Amoroso

Created with BlogMax

August 2004
Mon Tue Wed Thu Fri Sat Sun
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
Jul  Sep
About Lisp | Practical Common Lisp (learn Lisp) | Planet Lisp (blog agregator) | Common Lisp Directory (software and resources) | Why Lisp?