Bug 103956 - [PATCH] Fix Arthur 'clip' method
Summary: [PATCH] Fix Arthur 'clip' method
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: arthur backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-28 15:55 UTC by oliver.sander
Modified: 2017-12-18 23:46 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Example pdf file (1.46 KB, application/pdf)
2017-11-28 15:55 UTC, oliver.sander
Details
Patch that fixes 'ArthurOutputDev::clip' (2.01 KB, patch)
2017-11-28 15:57 UTC, oliver.sander
Details | Splinter Review

Description oliver.sander 2017-11-28 15:55:46 UTC
Created attachment 135773 [details]
Example pdf file

The 'clip' method of ArthurOutputDev sets the current clipping path to the path given to it in the GfxState variable.  However, the expected behavior is that the clipping path should be set to the intersection of the previous path with the new one (cf. the Cairo implementation, which does it that way).

Luckily, fixing this simply means using a different QPainter clipping option.  A patch is attached.  I also attach a simply example pdf file to trigger the problem.  When correctly rendered, you should see a part of a red ball.
Comment 1 oliver.sander 2017-11-28 15:57:15 UTC
Created attachment 135774 [details] [review]
Patch that fixes 'ArthurOutputDev::clip'
Comment 2 oliver.sander 2017-11-28 16:04:49 UTC
PS: This patch should apply to the master branch, with no additional patches.
Comment 3 Albert Astals Cid 2017-12-18 23:46:43 UTC
I've pushed the fix but not the documentation change to OutputDev.h since both comments said exactly the same which seems weird to me as i understand we don't have two functions that do "the same".

Please improve the documentation so that it's clear what's the difference betwen the two methods and put it in a new bug :)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.