Bug 687359 - Current point is inprecise
Summary: Current point is inprecise
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: All All
: P2 normal
Assignee: Igor Melichev
URL:
Keywords:
: 687173 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-11 07:18 UTC by Igor Melichev
Modified: 2008-12-19 08:31 UTC (History)
3 users (show)

See Also:
Customer:
Word Size: ---


Attachments
A big path (104.66 KB, application/postscript)
2004-03-11 07:21 UTC, Igor Melichev
Details
patch.txt (28.63 KB, patch)
2004-03-12 16:48 UTC, Igor Melichev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.