Bug 692006 - Line across the table on p.1
Summary: Line across the table on p.1
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: PC Windows 7
: P4 normal
Assignee: Tor Andersson
URL: http://code.google.com/p/sumatrapdf/i...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-28 15:25 UTC by zeniko
Modified: 2011-03-01 22:42 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
patch: insert a fz_moveto after every fz_closepath (1.03 KB, patch)
2011-02-28 17:14 UTC, zeniko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zeniko 2011-02-28 15:25:09 UTC
From the URL:

In the attached file, on p.1 in the topmost table, a line of the border of the table is not around the table, but it is going across it, in Sumatra, in Acrobat it looks fine.
Comment 1 zeniko 2011-02-28 17:14:16 UTC
Created attachment 7297 [details]
patch: insert a fz_moveto after every fz_closepath

The reason for this bug is that closing a path doesn't return the path to its origin:

<moveto x="58.19" y="534.81" />
<lineto x="563.41" y="534.81" />
<lineto x="563.41" y="519.69" />
<lineto x="58.19" y="519.69" />
<closepath />
<lineto x="563.41" y="534.81" />
<lineto x="563.41" y="288.79" />
<lineto x="58.19" y="288.79" />
<closepath />

Repeating the original moveto before a lineto following right after a closepath results in the expected rendering.
Comment 2 zeniko 2011-02-28 18:02:16 UTC
Right, pointers are tricky. We're going with http://code.google.com/p/sumatrapdf/source/detail?r=2885 for now. The cleaner solution would be to add a pair of coordinates to FZ_CLOSEPATH instead of inserting these spurious FZ_MOVETO instructions - as otherwise dev_trace and fz_debugpath will show them as well.