CLIM mail archive


Re: postscript output with scaling and draw-text* in CLIM 1.1

    Date: Thu, 10 Sep 1992 12:15 EDT
    From: (Gregory M. Whittaker)


    Perhaps I'm not being clear enough about this problem; there are really two
    separate issues involved. First, why isn't the start-point of the text glyph
    being transformed, and second, why aren't the glyphs themselves transformed.

I think it is a simple bug in CLIM 1.1 that the start/end points are
being transformed, although I find it somewhat surprising that there is
a bug there at all.

    You have, I think, explained away the second problem, although I think that
    CLIM ought to supply some vector-based font for this kind of thing; but I

CLIM is not in any position to supply this sort of thing, since it is
explicitly not one of CLIM's goals to do rasterization or rendering of
text.  CLIM has to depend on what the underlying platform gives it.

    still don't understand why the starting point for the draw-text* is not being
    transformed uniformly with the graph arcs. I'd be happy if the "nodes" 
    remained fat or whatever font-size I specified, as long as they actually were
    planted in the right positions relative to the graph arcs. This is in fact
    what happens in the previous version that I sent when I use with-text-size.

    Previous version:

    (defmethod print-subclass-tree ((name symbol) &optional (size :tiny))
      (let* ((class (find-class name))
	     (filename (concatenate 'string (string (class-name class))
	(with-open-file (file filename :direction :output :if-exists :supersede)
	  (clim:with-output-to-postscript-stream (stream file :multi-page t)
	    (clim:with-text-size (size stream)
	      (clim:format-graph-from-root class
		#'(lambda (object s)
		    (write-string (string (class-name object)) s))
		#'clos:class-direct-subclasses :stream stream))))
	(excl:run-shell-command (concatenate 'string "lpr " filename))))

    The trouble with this approach is that the degree of compaction or expansion
    of the graph is determined by the text-size and does not cover the range of
    contraction that I need. 

    If the starting points of the transformed arcs began at the end-points of the 
    textual-nodes, and the start-points of the textual-nodes were at the end-points
    of the arcs then I could live with "untransformed" glyphs, but the way things
    stand now, the postscript output for the textual-nodes portion of the graph is
    identical no matter what I put in for a transformation size (using the code
    included below). I think that this much at least is a bug in the CLIM implemen-
    tation of 1.1. I only have documentation for CLIM 1.0 and 2.0.alpha.  There is
    no mention of towards-x or towards-y in the 1.0 documentation, and the 2.0
    documentation is irrelevant at this point since 2.0.alpha dose not yet include

By the way, there are also problems in the PostScript port that cause
the formatted output engines not to lay things out accurately.  This may
be biting you as well.

    Finally, I think it would be very useful for the with-output-to-postscript-stream
    to accept an additional keyword (:eps nil) for the purposes of including these
    views into standard document preparation software. I'm not grossly offended by 
    the earlier suggestion you made of offering a kludgey :scale keyword also, but 
    it does seem to clash with the overall transformation protocol.

What does :EPS NIL do?


Main Index | Thread Index