home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiniExamples / AppKit / AskMe / Clock.psw < prev    next >
Encoding:
Text File  |  1995-06-12  |  528 b   |  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.