🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #886

Re: Why is my PostScript text upside down? Help! Help!

#886
From: Glenn Reid
Date: Wed, 09 Sep 1992 10:32
34 lines
1554 bytes
Paul Hagstrom writes

> Easy enough.  Now, the problem is this: ALL OF THE TEXT IS UPSIDE DOWN!  It  
is  
> reflected vertically from what it should be.  Now, of course, the first  
thing  
> to think is: oh!  The coordinates must be flipped!  But, [self isFlipped]  
> returns NO, and I never specifically tell it to setFlipped:YES, which,  
> according to the documentation, I should have to do explicitly if the  
> coordinates are to be flipped.

If your text is flipped but the rest of it is okay (which you don't say
explicitly, but which seems to be the case), then you can fix it by
asking for your font differently.

If you use the Font object (which you should) there are two ways to get a
new font:

  myFont = [Font newFont:"Helvetica" size:24.0];

  myFont = [Font newFont:"Helvetica" size:24.0 matrix:NX_FLIPPEDMATRIX];

Take your pick.  Use whichever you're not using at the moment :-)

Then just

  [myFont set];
  PSmoveto ( 10.0, 10.0 );
  PSshow("Hello world");

--
 Glenn Reid        		NeXTmail: glenn@rightbrain.com
 RightBrain Software		415-326-2974 (NeXTfax 326-2977)
 Palo Alto, California
Technical Details
Message-ID: <876@rtbrain.rightbrain.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!nntp1.radiomail.net!fernwood!rtbrain!rightbrain.com
References: <lalm3pINNpm5@news.bbn.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!nntp1.radiomail.net!fernwood!rtbrain!rightbrain.com
From: glenn@rightbrain.com (Glenn Reid)
Newsgroups: comp.sys.next.programmer
Subject: Re: Why is my PostScript text upside down?  Help!  Help!
Message-ID: <876@rtbrain.rightbrain.com>
Date: 9 Sep 92 10:32:25 GMT
References: <lalm3pINNpm5@news.bbn.com>
Sender: glenn@rightbrain.com
Reply-To: glenn@rightbrain.com
Lines: 34