rossc@extro.ucc.su.oz.au (Ross Cartlidge) (08/30/90)
I wrote a PostScript prolog called "multi.ps". It's purpose is to put multiple "logical" pages onto a physical page(ie two a5 pages side by side on a a4 page). It works by overloading all the operators which affect the absolute graphics state with procedures which go back to the normal state, do their "thing" and convert back. Part of the "conversion" is mapping paths and clippaths - this uses pathforall. Someone has given me a PostScript file which, when multi.ps is prepended, gives an "undefinedresult" for operator "pathforall" What conditions can make this happen? Thanks -- ________________________________________________________________________ Ross Rodney Cartlidge | rossc@extro.ucc.su.oz.au University Computing Service, H08 | Phone: +61 2 6923497 University of Sydney, NSW 2006, Australia | FAX: +61 2 6606557
kevina@apple.com (This space for rent) (08/30/90)
In article <1990Aug30.004154.23677@metro.ucc.su.OZ.AU> rossc@extro.ucc.su.oz.au (Ross Cartlidge) writes: > ... > Part of the "conversion" is mapping paths and clippaths - this uses > pathforall. Someone has given me a PostScript file which, when > multi.ps is prepended, gives an "undefinedresult" for operator "pathforall" > > What conditions can make this happen? PostScript paths are mapped to device space (i.e. the resolution of the underlying pixels) as they are created. However, operators like "currentpoint" and "pathforall" operate in user space. In the case of pathforall, each point in the path must be mapped from device space to user space (as if by itransform) and placed on the stack for use by the appropriate callback procedure. A "undefinedresult" error probably means that somewhere in the combination of the original program and multi.ps, a singular (non-invertible) current transformation matrix (CTM) is getting established. The net result is usually a divide by zero error. (Either that or your points are getting out of range, but most Adobe interpreters are fairly lenient about infinity conditions.) One way to debug is to print out the matrix before pathforall is called and see if "invertmatrix" works on it. Good luck! --Kevin Andresen [kevina@apple.com] "It's a small world, but I wouldn't want to paint it."