Ron King wrote:

Could someone please tell me how to get a correct bbox from a zoomed document?

Hi Ron, You would probably find samples/tests/spec/scripting/text_content.svg useful.

   This makes use of getTransformToElement to transform the
bbox points to another elements coordinate system.  You probably
want to use getScreenCTM which gives the transform to the 'screen'
coordinate system, but other than getting a different transform the
point manipulation code is the same.

> I'm making a Batik based paint program, and I'm having some success.
> I can draw a rubber band rectangle around a part of the document,
> and then select all elements inside the rectangle. However, if I
> have zoomed the document to get to the finer details, I can't figure
> out how to capture the proper coordinates any more.
>
> When testing, I use getbbox to draw a rectangle around one element. > I can do this before I zoom, but after I have zoomed the box comes
> up in the wrong location. I have seen people on the list discuss the
> getbbox problem, but I haven't seen a straight-forward source code
> solution presented.






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to