You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by "Stephen Parry (JIRA)" <ji...@apache.org> on 2017/02/02 20:56:51 UTC

[jira] [Created] (BATIK-1176) Paths involving large real numbers are generated / truncated to integers

Stephen Parry created BATIK-1176:
------------------------------------

             Summary: Paths involving large real numbers are generated / truncated to integers
                 Key: BATIK-1176
                 URL: https://issues.apache.org/jira/browse/BATIK-1176
             Project: Batik
          Issue Type: Bug
          Components: SVGGraphics2D
    Affects Versions: 1.8
         Environment: JDK 8 Windows 10
            Reporter: Stephen Parry
         Attachments: BatikTest.java, batikTest.svg

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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org