postscript hack help 
Author Message
 postscript hack help

I'm using Paradox (a PC database product) to generate and output several
reports to a postscript printer.  The postscript header file defines an Escape
Dictionary.  This dictionary translates escape sequences found in the report
into defined postscript actions-- normally changing the font type / style /
size.

I would like to code an escape sequence that will gray shade a box (in my
case, an entire line), but can't seem to get it to work.  My dictionary has
entries like:

    50  { RomanFont setfont popCmdStack }def
    51  { 0.5 setgray 72 612 moveto 288 0 rlineto 0 18 rlineto -288 0 rlineto
closepath fill popCmdStack }def

If I try and use the escape sequence 51 (esc3), I get the error message (from
a postscript preview) "Error: nocurrentpoint: OffendingCommand: show" Any
ideas how I should change the above to get the above to work?

Thanks
Brian



Fri, 18 Aug 1995 02:32:05 GMT  
 postscript hack help

|>

|> >     50  { RomanFont setfont popCmdStack }def
|> >     51  { 0.5 setgray 72 612 moveto 288 0 rlineto 0 18 rlineto -288 0 rlineto
|> > closepath fill popCmdStack }def
|> >
|> > If I try and use the escape sequence 51 (esc3), I get the error message (from
|> > a postscript preview) "Error: nocurrentpoint: OffendingCommand: show" Any
|> > ideas how I should change the above to get the above to work?
|>
|> I'm guessing that the currentpoint before your code runs
|> is the one it wants.  Try putting a gsave at the beginning of
|> your code and a grestore before the popCmdStack.
|>
|> (When you do the fill, the currentpoint becomes invalid,
|> which makes the next operation that needs it fail.)

Furthermore, a newpath may be required after every path-consuming action

--
+-o-+--------------------------------------------------------------+-o-+
| o |                \\\-  Brain Inside -///                       | o |
| o |                    ^^^^^^^^^^^^^^^                           | o |

+-o-+--------------------------------------------------------------+-o-+



Sat, 26 Aug 1995 23:26:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. It seems hacking, pls help

2. Need to hack a font - please help.

3. Help (please!) with page imposition hacking

4. humorous PostScript hack

5. Hack to Print PostScript to a file, Macintosh

6. A little PostScript hacking for NeXT screens

7. anyone into hacking in postscript?

8. Hacking postscript to print messages out of band

9. %%BoundingBox hacks, new and improved.

10. %%BoundingBox hacks for Transscript 2.1 psdit.c

11. PPD files, hacking

12. RFC: little Hack inverting images

 

 
Powered by phpBB® Forum Software