A use tag with x and y coordinates specified as percentages throws a null
pointer exception.
Here is the tag used:
<use x="10%" y="10%"
width="50" xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="#symbol1"
id="symbol1" height="50"/>
Here is the error:
java.lang.NullPointerException
at
org.apache.batik.bridge.UnitProcessor$DefaultContext.getViewportWidth(UnitPr
ocessor.java:382)
at
org.apache.batik.util.UnitProcessor.percentagesToPixels(UnitProcessor.java:2
23)
at
org.apache.batik.util.UnitProcessor.svgToUserSpace(UnitProcessor.java:166)
at
org.apache.batik.util.UnitProcessor.svgToUserSpace(UnitProcessor.java:131)
at
org.apache.batik.bridge.UnitProcessor.svgToUserSpace(UnitProcessor.java:313)
at
org.apache.batik.bridge.UnitProcessor.svgHorizontalCoordinateToUserSpace(Uni
tProcessor.java:247)
at
org.apache.batik.bridge.SVGUseElementBridge.computeTransform(SVGUseElementBr
idge.java:178)
at
org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseElement
Bridge.java:152)
at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:182)
at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:148)
at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:188)
at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:148)
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:76)
at
org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:81)
It appears that the ctx is null in the getViewportWidth method.
It works fine for other use Element types for example <path> and <text> but
not for <use> Elements.
Thanks,
/Cory
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]