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: [email protected]
ReportedBy: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]