home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / programm / 6073 < prev    next >
Encoding:
Internet Message Format  |  1992-09-09  |  1.5 KB

  1. Path: sparky!uunet!nntp1.radiomail.net!fernwood!rtbrain!rightbrain.com
  2. From: glenn@rightbrain.com (Glenn Reid)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: Why is my PostScript text upside down?  Help!  Help!
  5. Message-ID: <876@rtbrain.rightbrain.com>
  6. Date: 9 Sep 92 10:32:25 GMT
  7. References: <lalm3pINNpm5@news.bbn.com>
  8. Sender: glenn@rightbrain.com
  9. Reply-To: glenn@rightbrain.com
  10. Lines: 34
  11.  
  12. Paul Hagstrom writes
  13.  
  14. > Easy enough.  Now, the problem is this: ALL OF THE TEXT IS UPSIDE DOWN!  It  
  15. is  
  16. > reflected vertically from what it should be.  Now, of course, the first  
  17. thing  
  18. > to think is: oh!  The coordinates must be flipped!  But, [self isFlipped]  
  19. > returns NO, and I never specifically tell it to setFlipped:YES, which,  
  20. > according to the documentation, I should have to do explicitly if the  
  21. > coordinates are to be flipped.
  22.  
  23. If your text is flipped but the rest of it is okay (which you don't say
  24. explicitly, but which seems to be the case), then you can fix it by
  25. asking for your font differently.
  26.  
  27. If you use the Font object (which you should) there are two ways to get a
  28. new font:
  29.  
  30.   myFont = [Font newFont:"Helvetica" size:24.0];
  31.  
  32.   myFont = [Font newFont:"Helvetica" size:24.0 matrix:NX_FLIPPEDMATRIX];
  33.  
  34. Take your pick.  Use whichever you're not using at the moment :-)
  35.  
  36. Then just
  37.  
  38.   [myFont set];
  39.   PSmoveto ( 10.0, 10.0 );
  40.   PSshow("Hello world");
  41.  
  42. --
  43.  Glenn Reid                NeXTmail: glenn@rightbrain.com
  44.  RightBrain Software        415-326-2974 (NeXTfax 326-2977)
  45.  Palo Alto, California
  46.