Article View: comp.lang.postscript
Article #5697Re: Text that erases background
From: Vidiot
Date: Tue, 17 Nov 1992 02:49
Date: Tue, 17 Nov 1992 02:49
23 lines
1609 bytes
1609 bytes
In article <1992Nov14.034940.7891@gvl.unisys.com> wrp@pslsrv1.gvl.unisys.com (Bill Pringle) writes:
<What you want to do is to draw a thick white line over the area where
<the string will be written. Set the line width to the point size,
<then use setgray to create a white line. You can use stringwidth to
<determine how long to make the line. Something like:
<
< % assume you are at the position to draw the text
< % and the text string is on top of the stack
< gsave
< 12 setlinewidth % assume 10 or 12 pt. font
< 0 setgray % drawing a white line
< dup stringwidth pop % get width to draw
< 0 exch rlineto stroke % draw the line
< grestore
You are forgetting that the width of the line is determined from the center
of the line, not the bottom edge. You will have to move the start of the line
to the center of the text box.
--
harvard\ spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot ucbvax!uwvax..........!astroatc!vidiot!brown
rutgers/ INTERNET:vidiot!brown%astroatc.UUCP@spool.cs.wisc.edu
brown@wi.extrel.com
Technical Details
Message-ID:
<4434@vidiot.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!spool.mu.edu!sdd.hp.com!cs.utexas.edu!swrinde!gatech!rutgers!uwvax!astroatc!vidiot!brownReferences:
<lg7203INNs5k@cronkite> <1992Nov14.034940.7891@gvl.unisys.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!spool.mu.edu!sdd.hp.com!cs.utexas.edu!swrinde!gatech!rutgers!uwvax!astroatc!vidiot!brown From: brown@vidiot.UUCP (Vidiot) Newsgroups: comp.lang.postscript Subject: Re: Text that erases background Message-ID: <4434@vidiot.UUCP> Date: 17 Nov 92 02:49:53 GMT References: <lg7203INNs5k@cronkite> <1992Nov14.034940.7891@gvl.unisys.com> Reply-To: brown@vidiot.UUCP (Vidiot) Organization: Vidiot's Hangout Lines: 23