CLIM mail archive

[Prev][Next][Index][Thread]

Interaction of with-room-for-graphics and with-translation



    Date: Fri, 24 Sep 1993 15:39 EDT
    From: Mike Harper <mlh@BBN.COM>

    I am just beginning to use the stream transformation facilities and do not
    have a very good model of how they work. I am attempting to use with-translation
    inside a call to with-room-for-graphics and the with-translation appears to
    have no effect. Why is this? Does using with-room-for-graphics preclude the use
    of the other transformation facilities?

WITH-ROOM-FOR-GRAPHICS works by collecting the output of its body
(possibly inside a Cartesian coordinate system), then moving the output
so that its upper left corner is at (0,0).  So if you have the text
cursor at (0,0) and then draw something at (1000,1000) inside of a call
to WITH-ROOM-FOR-GRAPHICS, the resulting output will still be at (0,0).

WITH-TRANSLATION simply causes a translation transformation to be
applied to the coordinates of graphical output.

So, if you use WITH-TRANSLATION inside WITH-ROOM-FOR-GRAPHICS with the
expectation that that WITH-TRANSLATION will magically cause the entire
result to be somewhere besides where the text cursor is, that won't
happen.  Other than that, using transformations inside of
WITH-ROOM-FOR-GRAPHICS "just works".

References:

Main Index | Thread Index