[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
;;; -*- Package: USER; Base: 10; Mode: LISP; Syntax: Common-lisp; Default-character-style: (:SWISS :ROMAN :LARGE) -*-
(defun D,#TD1PsT[Begin using 006 escapes](1 0 (NIL 0) (NIL :BOLD NIL) "CPTFONTCB")hardcopy-test (2 0 (NIL 0) (NIL NIL NIL) "CPTFONT")(&key (hardcopy nil))
(with-open-stream (stream (hardcopy:make-hardcopy-stream
(hardcopy:get-hardcopy-device '(:file "andrew:lgp2;test.fig" :lgp2))))
(dw::with-hardcopy-upside-down-stream (stream) ;;; (3 0 (NIL 0) (NIL :ITALIC :SMALLER) "TVFONTI")<===============
2 (hardcopy-test-internal stream)))
(defun 1hardcopy-test-internal 2(&optional (stream *standard-output*))
(dw:in-sub-window (stream 300 300 100 100)
(princ "foo" stream))))
If you evaluate (hardcopy-test :hardcopy t), the outputted text will not be surrounded
by a border.
Now, there are a couple of things going on.
First, the border is actually outputted to the postscript
file created. However, the border is drawn with a different coordinate transform than
the test, it's transform thinks that positive y is in the "up" direction. So, it is drawn
about 600 pixels higher than the text (off the top of the page).
Second, one might think that the macro "with-hardcopy-upside-down-stream" is suspect,
since it is internal to dw. However, one could achieve the same incorrect result
by wrapping the form in a redisplayer, which somehow magically creates a
dw:hardcopy-upside-down-stream itself. I don't want to wrap the form in
a redisplayer, and I shouldn't have to.
Third, for the most part the dw:hardcopy-upside-down-stream takes care of
alot of things like reversing the handedness of the coordinate system, taking
into account page margins (I think) and translating the origin to the top
of the page.
Finally, if you don't use a redisplayer or a dw:hardcopy-upside-down-stream, you
get all kinds of error messages.
Here are some other things which don't work for me:
1) dw:continuation-output-size doesn't work with hardcopy-streams
2) nested calls to surrounding-output-with-border don't work with hardcopy-streams
Has anyone had similiar problems with printing to lgp2's. I've sent these
bugs to symbolics but haven't had any response - its been a few weeks.
Thanks for any help.