home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / postscri / 5562 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.5 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!spool.mu.edu!sdd.hp.com!cs.utexas.edu!swrinde!gatech!rutgers!uwvax!astroatc!vidiot!brown
  2. From: brown@vidiot.UUCP (Vidiot)
  3. Newsgroups: comp.lang.postscript
  4. Subject: Re: Text that erases background
  5. Message-ID: <4434@vidiot.UUCP>
  6. Date: 17 Nov 92 02:49:53 GMT
  7. References: <lg7203INNs5k@cronkite> <1992Nov14.034940.7891@gvl.unisys.com>
  8. Reply-To: brown@vidiot.UUCP (Vidiot)
  9. Organization: Vidiot's Hangout
  10. Lines: 23
  11.  
  12. In article <1992Nov14.034940.7891@gvl.unisys.com> wrp@pslsrv1.gvl.unisys.com (Bill Pringle) writes:
  13. <What you want to do is to draw a thick white line over the area where
  14. <the string will be written.  Set the line width to the point size,
  15. <then use setgray to create a white line.  You can use stringwidth to
  16. <determine how long to make the line.  Something like:
  17. <
  18. <    % assume you are at the position to draw the text
  19. <    % and the text string is on top of the stack
  20. <    gsave
  21. <        12 setlinewidth    % assume 10 or 12 pt. font
  22. <        0 setgray    % drawing a white line
  23. <        dup stringwidth pop    % get width to draw
  24. <        0 exch rlineto stroke    % draw the line
  25. <    grestore
  26.  
  27. You are forgetting that the width of the line is determined from the center
  28. of the line, not the bottom edge.  You will have to move the start of the line
  29. to the center of the text box.
  30. -- 
  31.       harvard\                          spool.cs.wisc.edu!astroatc!vidiot!brown
  32. Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
  33.       rutgers/            INTERNET:vidiot!brown%astroatc.UUCP@spool.cs.wisc.edu
  34.                                    brown@wi.extrel.com
  35.