CLIM mail archive
[Prev][Next][Index][Thread]
Re: postscript output with scaling and draw-text* in CLIM 1.1
Scott,
In the previous response regarding :size,
>Um, 1.0 and 0.5 are pretty small point sizes (1/72 and 1/144 inch high,
>respectively, I think)... What is the size of the text in this output?
>Also, the PostScript port has had very little use or testing, so it
>would not surprise me if there was a bug establishing the font.
the 1.0 and 0.5 were :size keyword values in the code included below, not
in the previous version which used with-text-size.
Here is the code:
(defmethod print-scaled-subclass-tree ((name symbol) &optional (size 1.0))
(let* ((class (find-class name))
(filename (concatenate 'string (string (class-name class))
"-subclass-tree.ps")))
(with-open-file (file filename :direction :output :if-exists :supersede)
(clim:with-output-to-postscript-stream (stream file :multi-page t)
(let ((transform (clim:make-scaling-transformation size size)))
(clim:with-drawing-options (stream :transformation transform)
(clim:format-graph-from-root
class
#'(lambda (object s)
(multiple-value-call
#'clim:draw-text*
s
(string (class-name object))
(clim:stream-cursor-position* s)
:align-y :center
:transformation transform))
#'clos:class-direct-subclasses :stream stream))))
)))
;;;(excl:run-shell-command (concatenate 'string "lpr " filename)))))
;;; if you actually want to print out the results, uncomment the above
;;; line and delete the preceding three close-parens. I've been simply
;;; using pageview to examine the results of the tests, and only print-
;;; hardcopy when necesary for documentation.
--------
Cordially,
Gregory M. Whittaker, The MITRE Corporation
Center for Advanced Aviation
System Development
Internet: greg@mitre.org 7525 Colshire Drive
Phone: (703) 883-5549 McLean Virginia 22102-3481
FAX: (703) 883-1226 Mail Stop: W215
0,,
Follow-Ups:
Main Index |
Thread Index