Bug 36391

Summary: [PATCH] reference-orientation and negative values
Product: Fop - Now in Jira Reporter: Yannick Valot <yvalot>
Component: page-master/layoutAssignee: fop-dev
Status: CLOSED FIXED    
Severity: normal Keywords: PatchAvailable
Priority: P2    
Version: trunk   
Target Milestone: ---   
Hardware: Other   
OS: other   
Attachments: The proposed patch
Test FO file
PDF output before applying the patch
PDF output with the patch

Description Yannick Valot 2005-08-27 02:32:55 UTC
Using -90, -180 and -270 as reference-orientation instead of 90, 180 and 270
results in content being drawn outside its block.

This is because the Coordinate Transformation Matrix does not contain a
translation in for negative values. The translation is added (in
CTM.getCTMandRelDims) for positive values but not negative.

I also added these negative values in CTM.rotate so that the CTM gets cleans
zeroes instead of approximate 1E-12 thingies.

I attached a simple test file to test the bug and its correction.

The result is still weird for 180 and -180 (and different from XEP), but I think
it could be quite a little bit harder to explain.
Comment 1 Yannick Valot 2005-08-27 02:36:07 UTC
Created attachment 16220 [details]
The proposed patch
Comment 2 Yannick Valot 2005-08-27 02:37:28 UTC
Created attachment 16221 [details]
Test FO file
Comment 3 Yannick Valot 2005-08-27 02:38:35 UTC
Created attachment 16222 [details]
PDF output before applying the patch
Comment 4 Yannick Valot 2005-08-27 02:39:15 UTC
Created attachment 16223 [details]
PDF output with the patch
Comment 5 Jeremias Maerki 2005-08-27 23:57:05 UTC
Patch applied. Thanks a lot, especially for the test case.
http://svn.apache.org/viewcvs?rev=240459&view=rev
http://svn.apache.org/viewcvs?rev=240461&view=rev

The result for 180 and -180 is definitely wrong. There's a bug that needs to be
fixed eventually. But since this is low-priority for me, I'm going to leave it
for now. I've added a comment to the new test case block-container4a that
explains what is wrong. So I think I'll close this issue. It's primarily for the
patch, after all, and the bug won't be missed now that there is a check in our
test suite. If anyone disagrees, just reopen the issue or create a new one.
Comment 6 Jeremias Maerki 2008-02-06 06:08:47 UTC
The remaining problem is now fixed in FOP Trunk:
http://svn.apache.org/viewvc?rev=618992&view=rev
Comment 7 Glenn Adams 2012-04-01 06:33:15 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed