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 20:45:48 +0000

> (available at http://www.x.org/pub/contrib/libraries/xvertext.5.0.shar.Z, 
> as stated in the X FAQ) for text scaling and rotation. While they work
> for me, I have not done extensive testing, and no testing at all 
> in drawing with alpha.

Excellent work though _ I'm just in the process of adding these to try
them out. One question so far:

> and change the calls to the method draw:::::: to draw:::::::: thusly:
>
>       [font_info draw: s lenght: len 
>              onDisplay: XDPY drawable: draw
>              with: xgcntxt at: xp rotate:angle scale:scale];

You are passing in "scale" here, but in DPSshow this is not actually setup
from the matrix until after these calls. I am assuming that I need to
move the scale = [ctm sizeInMatrixSpace: NSMakeSize(1, 1)]; line from
the end of the method to the start so that it is called at the same place
as I call angle = [ctm rotationAngle]; right ?

I just applied these changes and it compiles fine (after I rememberd
to add the rotate.c to both halves of the #if in the makefile). It
also produces rotated and scaled text. Minor bug is that the rotation
of the text apears to be the opposite of expected though. I am using
PSrotate(90) to get text running up the screen, and it runs down the screen
instead, do your libraries expect a positive rotation to be clockwise ?

Scaled text is going to bring in some interesting illegibility problems
I can see :-) Thinking about how to implement that nice DPS functionality
of picking a best matching font for the resolution is going to be a hard
problem I suspect !

Good piece of coding...

-bat. [maybe I should go and think about rotated images as well in that case]



reply via email to

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