When loading a Graphvis generated SVG with ellipses for nodes, it fails to
parse the file. The SVG parser is expecting some of the ellipse parameters
to be "Long" when they are in fact more like "Double" values. I made a
quick local change to see if the file could be loaded. I changed:
SVGReader.createEllipse(Element,Context,boolean) from:
long w=(Long.valueOf(e.getAttribute(_rx))).longValue();
long h=(Long.valueOf(e.getAttribute(_ry))).longValue();
to:
long w=(Double.valueOf(e.getAttribute(_rx))).longValue();
long h=(Double.valueOf(e.getAttribute(_ry))).longValue();
SVGReader.getNextNumber(StringBuffer) from:
while ((sb.length()>0) && ((Character.isDigit(sb.charAt(0))) ||
(sb.charAt(0)=='-'))){
if (dgb.length()>0){res=(Integer.valueOf(dgb.toString())).intValue();}
to:
while ((sb.length()>0) && ((Character.isDigit(sb.charAt(0))) ||
(sb.charAt(0)=='-') || sb.charAt(0)=='.')){
if (dgb.length()>0){res=(Double.valueOf(dgb.toString())).intValue();}
I have attached a test case with ellipses.
Ryan
Emmanuel Pietriga
None
None
Public
|
Date: 2006-12-08 08:16
|
|
Date: 2006-12-08 08:12
|
| Filename | Description | Download |
|---|---|---|
| ApplicantInitialApplicationStateMachine.zip | Test case SVG (zipped) | Download |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2006-12-08 08:16 | epietrig |
| close_date | - | 2006-12-08 08:16 | epietrig |
| resolution_id | None | 2006-12-08 08:12 | epietrig |
| assigned_to | nobody | 2006-12-08 08:12 | epietrig |
| File Added | 206306: ApplicantInitialApplicationStateMachine.zip | 2006-12-08 05:32 | rgustav |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use