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 bu...@apache.org on 2012/04/05 00:28:27 UTC
DO NOT REPLY [Bug 53035] New: rendering a GeneralPath with NaN as a
point outputs a corrupt SVG path
https://issues.apache.org/bugzilla/show_bug.cgi?id=53035
Bug #: 53035
Summary: rendering a GeneralPath with NaN as a point outputs a
corrupt SVG path
Product: Batik
Version: 1.7
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: SVGGraphics2D
AssignedTo: batik-dev@xmlgraphics.apache.org
ReportedBy: andrew_wilcock@mentorg.com
Classification: Unclassified
Using the SVGGraphics2D with the following code:
public void paint(Graphics2D g2d) {
GeneralPath gp = new GeneralPath();
gp.moveTo(0,0);
gp.lineTo(100,100);
// OOPS!!!
gp.lineTo(Double.NaN,Double.NaN);
g2d.draw(gp);
}
The presence of the NaN in the path will cause the SVG output to contain an
invalid/corrupt path i.e.:
<path style="fill:none;" d="M0 0 L100 100 L� �"/>
Full test case added as an attachment.
I fully understand that this is not something one would normally do, but the
lack of any exception/error was a surprise.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 53035] rendering a GeneralPath with NaN as a point
outputs a corrupt SVG path
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53035
--- Comment #1 from Andy Wilcock <an...@mentorg.com> 2012-04-04 22:33:01 UTC ---
Created attachment 28544
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28544
Minimal test case for the problem
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org