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

  1. Path: sparky!uunet!wupost!micro-heart-of-gold.mit.edu!news.bbn.com!news.bbn.com!news
  2. From: hagstrop@oberon.mathcs.carleton.edu (Paul Hagstrom)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Why is my PostScript text upside down?  Help!  Help!
  5. Date: 7 Sep 1992 04:20:09 GMT
  6. Lines: 32
  7. Message-ID: <lalm3pINNpm5@news.bbn.com>
  8. NNTP-Posting-Host: bbn.com
  9.  
  10. Ok, I'm at a loss.. I've got a plotting program that I'm trying to write, and  
  11. here's what's happening..
  12.  
  13. I am trying to draw a grid, and on that grid I am tryint to draw numbers.  So,  
  14. what I do is this:
  15.  
  16.     PSmoveto(0,grid);
  17.     sprintf(buffer,"(0.00,%f7.2)",grid);
  18.     PSshow(buffer);
  19.     
  20. Easy enough.  Now, the problem is this: ALL OF THE TEXT IS UPSIDE DOWN!  It is  
  21. reflected vertically from what it should be.  Now, of course, the first thing  
  22. to think is: oh!  The coordinates must be flipped!  But, [self isFlipped]  
  23. returns NO, and I never specifically tell it to setFlipped:YES, which,  
  24. according to the documentation, I should have to do explicitly if the  
  25. coordinates are to be flipped.
  26.  
  27. What can I do?  PSrotate(180.0) won't solve my problem because then I get  
  28. numbers that a right-side-up, but backwards!  What I need to do is reflect them  
  29. vertically, and I'm not sure how.  I don't want to flip the coordinates just to  
  30. print the text (that seems unwise, and in the documentation, it is said that  
  31. setFlipped: should only be called once -- preferably before drawing, like in an  
  32. initialization routine) and then flip them back to continue with the program,  
  33. do I?
  34.  
  35. Help!
  36.  
  37. Thanks to anyone who knows immediately what my problem is and can tell me..
  38. --
  39. schmotsignature.
  40. Paul Hagstrom
  41. (hagstrop@carleton.edu)
  42.