Bug 687215

Summary: rounding problems in long paths using relative movements
Product: Ghostscript Reporter: Hans-Bernhard Broeker <broeker>
Component: Graphics LibraryAssignee: Jack Moffitt <jack>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: 8.11   
Hardware: All   
OS: All   
Customer: Word Size: ---

Description Hans-Bernhard Broeker 2003-12-22 06:53:39 UTC
Certain postscript files made by the freeware plotting program gnuplot 
experienced a mis-placement of plot elements when displayed by ghostscript,
but not on actual PS printers. This only happened when very long paths with 
sometimes tens of thousands of short rmoveto and rlineto pen movements were 
used.  Gnuplot does that in an effort to minimize the postscript file size.  
The effect is resolution-dependent, too: turning from 96dpi to 600dpi in 
GSView makes it disappear...

It seems that ghostscript quickly accumulates rounding error in short 
movements, to the point where the final accumulated error is large enough to 
be easily spottable on screen.

We've since added a somewhat ugly workaround in gnuplot (forcibly interrupting 
the path and doing a stroke every ~100 steps), but it'd sure be nice to see 
this quenched at the suspected source.
Comment 1 Alex Cherepanov 2003-12-22 13:21:16 UTC
Ghostscript should be fixed indeed but the work around in gnuplot can be
improved. For instance, gnuplot can convert relative commands to
absolute commands on PostScript level. 


*** This bug has been marked as a duplicate of 687173 ***