Bug 687359

Summary: Current point is inprecise
Product: Ghostscript Reporter: Igor Melichev <igor.melichev>
Component: Graphics LibraryAssignee: Igor Melichev <igor.melichev>
Status: NOTIFIED FIXED    
Severity: normal CC: broeker, helmut, Stephen.Harker
Priority: P2    
Version: master   
Hardware: All   
OS: All   
Customer: Word Size: ---
Attachments: A big path
patch.txt

Description Igor Melichev 2004-03-11 07:18:41 UTC
Accumulating a big path with 'rlineto', a too big error is accumulated due to 
current point is represented in 'fixed' with 1/256 pixel precision in device 
space. It should be more precise. A precise result can be riched with 
representing current point in user space.

I don't like hacks here. I would prefer to fix it at once forever. Therefore 
the right solution is to add the current point to gs_imager_state and maintain 
it properly in :

- currentpoint;
- moveto, lineto, curveto, closepath;
- rmoveto, rlineto, rcurveto;
- arc, arcn, arct, arcto;
- gsave, grestore;
- save, restore;
- show, ashow, widthshow, awidthshow, xshow, xyshow, yshow, glyphshow, cshow, 
kshow;
- strokepath (?);
- charpath, uappend;

What do I miss ?
Comment 1 Igor Melichev 2004-03-11 07:21:38 UTC
Created attachment 549 [details]
A big path

Attaching a test file (same as for the bug 687264).
Comment 2 Igor Melichev 2004-03-11 07:27:24 UTC
See also 687215 and 687215. 
Comment 3 Igor Melichev 2004-03-11 07:29:21 UTC
*** Bug 687173 has been marked as a duplicate of this bug. ***
Comment 4 Igor Melichev 2004-03-12 12:22:19 UTC
One more related operator :

- reversepath
Comment 5 Igor Melichev 2004-03-12 16:48:28 UTC
Created attachment 552 [details]
patch.txt

Attaching a preliminary edition of a patch for this problem.
It passed a testing with PRECISE_CURRENTPOINT 0 (see log message), but has some
differences with pdfwrite, which to be analyzed. With PRECISE_CURRENTPOINT 1
the rendering difference is massive and was not analyzed yet.