discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Vertical text on graph axis


From: Pete French
Subject: Re: Vertical text on graph axis
Date: Tue, 10 Jun 2003 11:50:17 +0100

> I haven't used any PS calls.  I don't know anything about them.  I've
> just been using GNUstep for a few months.  Could you point me toward
> the docs I need to try it out?

Unsure where you would find them to be honest. The old OpenStep worked using
Display PostScript as I am sure you know. You could do drawing into a window
by generating PostScript and sending it to the window. To do this there
was a fnction "DPSPrintf"which worked like printf but send stuff direct to
the window server.

This is not an efficent way to do stuff, of course. So NeXT provided function
calls that let you call PostScript functions from C. So to draw aline fro
10,10  to 50,50 I could do:

PSmoveto(10,10);
PSlineto(10,10);
PSstroke();

All that sort of stuff has  now been lumped into NSBesierPath as far as I
am aware - but the calls are still there. Under OSX I assume they map to their
Quarts equivalents, under GNUstep they work more or less as they did in
OpenStep (which is an excellent thing).

So If I wanted to out soome text at loication 30,30 I would do:

PSmoveto(30,30);
PSshow("hello world");

If I want the text to be vertical:

PSmoveto(30,30);
PSrotate(-90.0);
PSshow("hello world");

to avoid this making all future drawing rotated through 90 degrees I can do:

PSgsave();
PSmoveto(30,30);
PSrotate(-90.0);
PSshow("hello world");
PSgrestore();

as gsave and grestore save and restore the graphics atate respectively. This
is how I do all drawing under all *Step systems as it seems the most portable.

-bat.




reply via email to

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