Hi Michael, "Bishop, Michael W. CONTR J9C880" <[EMAIL PROTECTED]> wrote on 02/27/2006 11:01:19 AM:
> I should mention that this only happens when the element in question is off-canvas. What do you mean by 'off-canvas'? Not currently in the rendering tree? If so then this isn't surprising, none of the SVG DOM will work unless the element is part of the rendering tree. You will have to put it in the rendering tree to get geometry calls (say under a 'g' element with visibility="hidden"). > From: Bishop, Michael W. CONTR J9C880 > Sent: Monday, February 27, 2006 10:40 AM > To: '[email protected]' > Subject: NullPointerException SVGMatrix.getXXX(); > > I have a situation when I select multiple objects and do a copy and paste with > them. I show the copied elements as selected, so I have to get their bounding > box. When I get the SVGMatrix from the SVGLocatable and then try to call > SVGMatrix.getA() (or any of the other matrix elements), I get a > NullPointerException. This occurs inside the Batik code with getting an > AffineTransform, etc. > > My work-around is this (inside a for loop that tries to bound all selected elements): > > try { > matrix.getA(); > } catch (NullPointerException npExeception) { > continue; > } > > Obviously this is not ideal. Has this problem been resolved in nightly > builds? This is a test run against the 1.6 final release. > > Michael Bishop --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
