bug-gnustep
[Top][All Lists]
Advanced

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

Re: patch for text scaling and rotation


From: Pete French
Subject: Re: patch for text scaling and rotation
Date: Mon, 25 Mar 2002 23:29:34 +0000

> That's perplexing, PSrotate(90) gets me text that moves up the screen. 
> This is on a x86 processor.

This is also an x86 processor. There are some oddnesses with text under
OpenStep vs GNUstep. In my opinion GNustep behaviour is more correct, but
under OpenStep the text always seems to act as if the view was flipped,
so uusing drawAt on a string will put it in the wrong place! I have no idea
how this might affect rotation behaviour, and its probably a rred herring. I'll
try andget a tiny demo fragment that shows the odd effects I am seeing though.

> A question: the xvertext routines first render the text horizontally, 
> then scale it, and finally rotate (this sclaed text). I am somewhat 
> unclear as to whether this is how it should be done - especially as 
> PSscale() and PSrotate() do not commute. Thanks for any wisdom.

Well, if you know you are just supportiing scale/rotate (and not any
old wierd arbitrary shearing projection) then I'd move the origin such
that the text is rendered at 0,0 - then map what happens to the base vectors
(0,1) and (1,0) through the transformation matrix. Take the mod of the results
to give the scale factors in each direction, render and scale the font
horixontally and then rotate it by the angle the (1,0) vector rotated by (and
sod what happened to the other one). That should work shouldnt it ?

-bat.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]