home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / SourceCode / MiniExamples / AskMe / Clock.psw < prev    next >
Text File  |  1991-05-10  |  528b  |  23 lines

  1. /*
  2.  * Clock.psw, Postscript code for drawing the digital clock.
  3.  * You may freely copy, distribute and reuse the code in this example.  
  4.  * NeXT disclaims any warranty of any kind, expressed or implied, as to its 
  5.  * fitness for any particular use.
  6.  */
  7.  
  8.  
  9.  
  10.  
  11. /* centerShow centers the width of a string at the specific x y location 
  12.  * using specified gray
  13.  */ 
  14. defineps PSWcenterShow (float x; float y; char *str; float gray)
  15.         gray setgray
  16.         x (str) stringwidth pop 2 div sub y moveto
  17.         (str) show
  18.         stroke
  19. endps
  20.  
  21.  
  22.  
  23.