Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1176

Paths involving large real numbers are generated / truncated to integers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8
    • None
    • SVGGraphics2D
    • None
    • JDK 8 Windows 10

    Description

      There are a number of shortcomings to how paths including large numbers are handled within paths. Numbers above 10e7 are converted to 32 bit integers; numbers are thus capped at 2.147483648e+9 and rounded. Longs are not supported at all. Internally everything floating point is eventually reduced to float and then int. Path2D.Double is therefore useless and Path is limited to 32 bit. Unlike CSS, the specifications allow for full scientific notation in path d attributes (https://www.w3.org/TR/SVG11/paths.html#PathDataBNF).
      See attached Java and SVG.

      Attachments

        1. batikTest.svg
          0.9 kB
          Stephen Parry
        2. BatikTest.java
          2 kB
          Stephen Parry

        Activity

          People

            Unassigned Unassigned
            sgparry Stephen Parry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: