Home Overview FAQ Documentation Download Mailing List Geomview For Windows? Support Users Development Bug Reporting Contributing Contact Us Sponsors
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [ REQ 6105]: Bug in PS snapshot
Hi, The program PS snapshot (included with geomview 1.5) produces PostScript files which can not be included into other PostScript files. The cause of this `bug' is the PostScript procedure `drawpoly' which is defined in the output files of PS snapshot. This procedure uses the size of the operand stack to determine the number of points on the current polygon. This works fine if the stack is empty before the first polygon is drawn. However, this is usually not the case if the output file of PS snapshot is included into another PostScript file. An easy way to fix this bug, is to replace the current definition of the procedure `drawpoly': /drawpoly { setgray newpath moveto count 4 ge { count 2 idiv { lineto } repeat closepath gsave fill grestore edgecolor stroke } { count 2 eq {lineto} {0 0 rlineto} ifelse stroke } ifelse } def by the following definitions: count /offset exch def % Save the current stack size /numpoints { count offset sub 2 idiv } def % Number of points on the stack /drawpoly { setgray newpath moveto numpoints 2 ge { numpoints { lineto } repeat closepath gsave fill grestore edgecolor stroke } { numpoints 1 eq {lineto} {0 0 rlineto} ifelse stroke } ifelse } def Of course, a more elegant solution would be to pass the number of points to be drawn to the procedure `drawpoly' (using the stack). Sincerely yours, Erik Jan Lingen. F.J. Lingen | Department of Civil Engineering | phone : +31-15-2782164 Delft University of Technology | fax : +31-15-2611465 P.O. Box 5048 | e-mail : EJ.Lingen at CT.TUDelft.NL 2600 GA DELFT | The Netherlands |
|
||
Home | Overview | FAQ | Documentation | Support | Download | Mailing List Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors |
|||
site hosted by |