Fop
  1. Fop
  2. FOP-1828

[PATCH] Fop - replaced vars w UnitConv and GraphicsConstants

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: general
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • External issue ID:
      49695

      Description

      Replace several variable constants with appropriate constants from xmlgraphics UnitConv and GraphicsConstants.

      Searched on 25.4, 2.54, and 72 (for both UnitConv and GraphicsConstants)

      Questions regarding additional constants:

      1) UnitConv vs. org.apache.fop.fo.properties.FixedLength
      FixedLength contains redundant constants. Fix?

      2) Variable 72000 is used in multiple places in conjunction with variable 300. Fix?

      3) PCL uses var 300 many times; no constant set to represent as default.
      Fix?

      1. mypatch.diff
        21 kB
        Joshua Marquart

        Activity

        Hide
        Glenn Adams added a comment -

        batch transition to closed; if someone wishes to restore one of these to resolved in order to perform a verification step, then feel free to do so

        Show
        Glenn Adams added a comment - batch transition to closed; if someone wishes to restore one of these to resolved in order to perform a verification step, then feel free to do so
        Hide
        Vincent Hennebert added a comment -

        Patch applied in rev. 1038291.
        http://svn.apache.org/viewvc?rev=1038291&view=rev
        Thanks for your contribution and sorry for the delay.

        I made the following modifications:
        • PDFRenderer: the normal resolution is and will always be 72dpi. GraphicsConstants.DEFAULT_DPI might very well change to something else than 72dpi in the future;
        • AFPConstants: left it to 72 for the same reason;
        • ImageConverterSVG2G2D: divide by DEFAULT_DPI and not IN2PT. Physically the same, logically different.

        Thanks,
        Vincent

        Show
        Vincent Hennebert added a comment - Patch applied in rev. 1038291. http://svn.apache.org/viewvc?rev=1038291&view=rev Thanks for your contribution and sorry for the delay. I made the following modifications: • PDFRenderer: the normal resolution is and will always be 72dpi. GraphicsConstants.DEFAULT_DPI might very well change to something else than 72dpi in the future; • AFPConstants: left it to 72 for the same reason; • ImageConverterSVG2G2D: divide by DEFAULT_DPI and not IN2PT. Physically the same, logically different. Thanks, Vincent
        Hide
        Joshua Marquart added a comment -

        Future similar patch to be applied to xmlgraphics.

        Also moved FOP reference to FOP UnitConv to use xmlgraphics UnitConv

        Show
        Joshua Marquart added a comment - Future similar patch to be applied to xmlgraphics. Also moved FOP reference to FOP UnitConv to use xmlgraphics UnitConv
        Hide
        Joshua Marquart added a comment -

        Attachment mypatch.diff has been added with description: Replaces many variables with constants from UnitConv and GraphicsConstants

        Show
        Joshua Marquart added a comment - Attachment mypatch.diff has been added with description: Replaces many variables with constants from UnitConv and GraphicsConstants

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development