Are you calling the method while in the update thread? If I recall
correctly, it may be required be required
If needed, wrapper with something like:
getUpdateManager().getUpdateRunnableQueue().invokeLater(new Runnable() {
public void run() {
....get bbox
}
});
On Wed, May 19, 2010 at 11:37 AM, Julien Beghin <[email protected]>wrote:
> Well both of the solutions seem's to do "nothing" ....
>
> The getBBox method always return null, maybe because the tesxt element is
> location under the group tag (G) and in the définition part,
> The text is not under a use tag...
>
> Any other idea ?
>
> ------------------------------
> From: [email protected]
> Date: Wed, 19 May 2010 11:24:11 -0400
> Subject: Re: Getting a bounded box
> To: [email protected]
>
>
> I've always used:
>
> SVGRedt bbox = ((SVGLocatable)element).getBBox();
>
> you may need to account for the transforms also....use
> SVGLocatable.getTransformToElement() and SVGPoint.matrixTransform() if
> needed
>
>
>
>
>
> On Wed, May 19, 2010 at 10:14 AM, Julien Beghin
> <[email protected]>wrote:
>
> Hi there,
>
>
>
> We are dealing with a matter of bounded box :
>
>
>
> First of all, we are defining a link via the "use" tag like following :
>
>
>
> <use transform="translate(180,-325)" xmlns:xlink="
> http://www.w3.org/1999/xlink"
> xlink:href="#6b0e597d-917e-4534-bb96-178a151a146c" xlink:type="simple"
> xlink:actuate="onLoad" id="INSTANCE_6b0e597d-917e-4534-bb96-178a151a146c"
> xlink:show="embed" pointer-events="stroke"/>
>
>
>
> This link points towrds a group in the definition part :
>
>
>
> <g id="6b0e597d-917e-4534-bb96-178a151a146c" cursor="pointer"
> transform="scale(1.00,-1.00)" stroke-linejoin="round"
> stroke-linecap="round">
>
> <desc>0LHT026VE</desc>
>
> <text style="text-anchor:middle;font-size:2.50000pt;font-family:monotxt"
> transform="translate(0.00000,-2.50000) scale(1,-1) rotate(-0.00000)
> scale(1.00000,1)">
>
> <tspan dx="0" dy="2.5" fill="rgb(0,0,0)" x="0" xml:space="preserve"
> stroke="rgb(0,0,0)">026VE</tspan>
>
> </text>
>
> <path fill="none" d="M -2.5 -1.5 L -2.5 1.5 L 2.5 -1.5 L 2.5 1.5"
> stroke-dasharray="1.00000,1.00000" stroke-width="0.600000"
> stroke="rgb(0,0,0)"/>
>
> <path fill="none" stroke-width="0.800000"
> stroke-dasharray="1.00000,1.00000" d="M -2.9 1.25 A 0.4 0.4 0.0 1 1 -2.1
> 1.25 A 0.4 0.4 0.0 1 1 -2.9 1.25" stroke="rgb(0,0,0)"/>
>
> </g>
>
>
>
> What we are wanting to do is to get the bounded box of the text element, in
> this group.
>
> There is no problem with getting the bounded box of the whole group, but
> curiously, I can't find a way to only the "text"'s bounded box
>
>
>
> Can someone help ?
>
>
>
> Regards,
>
>
>
> Julien
>
> ------------------------------
> De nouvelles Emoticones sur Messenger ? Téléchargez les Emoticones pâte à
> modeler
> !<http://www.ilovemessenger.fr/emoticones/emoticones-pate-a-modeler.aspx>
>
>
>
> ------------------------------
> Envie de plus d'originalité dans vos conversations ? Téléchargez
> gratuitement les Emoch'ticones
> !<http://www.ilovemessenger.fr/emoticones/telecharger-emoticones-emochticones.aspx>
>