Bug 36391 - [PATCH] reference-orientation and negative values
Summary: [PATCH] reference-orientation and negative values
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: page-master/layout (show other bugs)
Version: trunk
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2005-08-27 02:32 UTC by Yannick Valot
Modified: 2012-04-01 06:33 UTC (History)
0 users



Attachments
The proposed patch (1.34 KB, patch)
2005-08-27 02:36 UTC, Yannick Valot
Details | Diff
Test FO file (3.04 KB, text/plain)
2005-08-27 02:37 UTC, Yannick Valot
Details
PDF output before applying the patch (2.13 KB, application/pdf)
2005-08-27 02:38 UTC, Yannick Valot
Details
PDF output with the patch (2.12 KB, application/pdf)
2005-08-27 02:39 UTC, Yannick Valot
Details

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