Hi Dmitrij,
Most likely svgElement is no in the rendering tree. This generally means that it either has 'display="none"' or is in a 'defs' section.
The other possibility is that the document is not setup to be 'dynamic' - which using the SVG DOM requires.
We should really check this in the call to getTransformToElement, but we don't.
Dmitrij Sakara wrote:
Hi all,
I have the following code for transformation element coordinates to
screen:
Element root = svgElement.getOwnerDocument().getDocumentElement();
SVGMatrix matrix = ((SVGTransformable)
svgElement).getTransformToElement((SVGElement) root);
SVGPoint p = new SVGOMPoint(0, 0);
p = p.matrixTransform(matrix);
I receive the nullPointerException during the matrixTransform execution
java.lang.NullPointerException
at
org.apache.batik.dom.svg.SVGLocatableSupport$4.getAffineTransform(Unknow
n Source)
at org.apache.batik.dom.svg.AbstractSVGMatrix.getA(Unknown
Source)
at
org.apache.batik.dom.svg.SVGOMPoint.matrixTransform(Unknown Source)
Variables matrix and p are not null. What can be a problem?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]