Bug 690036 - clipping differ from Adobe
Summary: clipping differ from Adobe
Status: RESOLVED DUPLICATE of bug 693509
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: PC Windows NT
: P2 normal
Assignee: Robin Watts
URL:
Keywords: discuss
Depends on:
Blocks: 689264
  Show dependency tree
 
Reported: 2008-08-21 06:35 UTC by leonardo
Modified: 2013-06-03 20:16 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description leonardo 2008-08-21 06:35:24 UTC
The PDF reference manual version 1.7 reads on page 511 : "For clipping, the 
clipping region consists of the set of pixels that would be included
by a fill operation.". Our implementation doesn't follow it. 

When a path is filled, we paint those pixels, which's centers fall inside the 
path expanded with fill adjustement. The fill adjustment depends on 
resolution. With small resolutions it is 0.25, with high resolutions it is 
0.5 .

When clipping with a single rectangle gx_clip_list_from_rectangle rounds the 
lower boundary down to integral pixels and does the upper boundary up, what is 
equivalent to fill_adjust=0.5 . When clipping with a complex path, 
gx_cpath_intersect_path_slow applies fill_adjust=0.5 .

Thus with small resolution our clipping differs from Adobe.

This problem was discovered while analyzing Bug 689264 "Regression: 
differences in Testform.v1.0.2.pdf".
Comment 1 Henry Stiles 2009-11-19 07:50:34 UTC
Reassigning path and fill problems to Robin Watts.
Comment 2 Robin Watts 2010-01-28 17:22:58 UTC
Reassigning to new email address.
Comment 3 Shailesh Mistry 2011-08-03 19:13:40 UTC
Bug still reproducible in Ghostscript 9.03
Comment 4 Ray Johnston 2013-06-03 20:16:30 UTC
This is the underlying problem with bug 693509, which is a customer bug with
a file attached, so I am marking this one a duplicate of that one.

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