Fop
  1. Fop
  2. FOP-1036

[PATCH] reference-orientation and negative values

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: layout/unqualified
    • Labels:
    • Environment:
      Operating System: other
      Platform: Other
    • External issue ID:
      36391

      Description

      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.

      1. 36391_reforient.fo
        3 kB
        Yannick Valot
      2. 36391_reforient.diff
        1 kB
        Yannick Valot
      3. 36391_reforient_before.pdf
        2 kB
        Yannick Valot
      4. 36391_reforient_after.pdf
        2 kB
        Yannick Valot

        Activity

        Hide
        Yannick Valot added a comment -

        Attachment 36391_reforient.diff has been added with description: The proposed patch

        Show
        Yannick Valot added a comment - Attachment 36391_reforient.diff has been added with description: The proposed patch
        Hide
        Yannick Valot added a comment -

        Attachment 36391_reforient.fo has been added with description: Test FO file

        Show
        Yannick Valot added a comment - Attachment 36391_reforient.fo has been added with description: Test FO file
        Hide
        Yannick Valot added a comment -

        Attachment 36391_reforient_before.pdf has been added with description: PDF output before applying the patch

        Show
        Yannick Valot added a comment - Attachment 36391_reforient_before.pdf has been added with description: PDF output before applying the patch
        Hide
        Yannick Valot added a comment -

        Attachment 36391_reforient_after.pdf has been added with description: PDF output with the patch

        Show
        Yannick Valot added a comment - Attachment 36391_reforient_after.pdf has been added with description: PDF output with the patch
        Hide
        Jeremias Maerki added a comment -

        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.

        Show
        Jeremias Maerki added a comment - 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.
        Hide
        Jeremias Maerki added a comment -

        The remaining problem is now fixed in FOP Trunk:
        http://svn.apache.org/viewvc?rev=618992&view=rev

        Show
        Jeremias Maerki added a comment - The remaining problem is now fixed in FOP Trunk: http://svn.apache.org/viewvc?rev=618992&view=rev
        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

          People

          • Assignee:
            fop-dev
            Reporter:
            Yannick Valot
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development