[cl-typesetting-devel] How does rotation work?

Peter Seibel peter at gigamonkeys.com
Wed Jul 20 17:30:00 UTC 2005


On Jul 20, 2005, at 10:25 AM, Marc Battyani wrote:

> Peter Seibel wrote:
>
> Hi Peter,
>
> Sorry for the long reply delay, I'm just coming back from  
> backpacking in the
> Alps :-)
>
>
>> I'm trying to set set a block of text rotated 90 degrees but the
>> rotation seems to rotate the box right off the page. Around what axis
>> does pdf:rotate rotate stuff? Or more to the point, what's the
>> easiest way to draw a block at a particular place but rotated 90
>> degrees?
>>
>
> You can use the rotation parameter of draw-block. The rotation is  
> around the
> top left corner of the block IIRC.

Actually I think the rotation is around 0,0. So the trick is to use  
pdf:translate to translate the coordinate system to where you want  
the top left corner of the box to be and then draw-block at 0, 0 with  
whatever rotation you want. But if you draw-block at some x,y with a  
rotation it requires advanced trig to figure out where the box is  
actually going to end up. At least it seems that way to my math  
impaired brain.

-Peter

-- 
Peter Seibel           * peter at gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp  * http://www.gigamonkeys.com/book/





More information about the cl-typesetting-devel mailing list