Hi all, Tonny Kohar <[EMAIL PROTECTED]> wrote on 11/28/2005 08:48:02 PM:
> On Mon, 2005-11-28 at 17:23 -0500, Bishop, Michael W. CONTR J9C880 > wrote: > > I can get close; the JSVGCanvas isn't at 0, 0 screen coordinates. I > > have a JMenuBar on the top and a JToolBar on the left. Before drawing > > anything to the glass pane, I set the translate values of the glass pane > > accordingly. > > You need to get the coord of the component itself not the parent > container eg: JFrame to get 0,0 coord. Why do you need the screen coords of anything? getScreenCTM will map things to the JSVGCanvas's coordinate system (0,0 should be the upper left of the JSVGCanvas). Since I use this to map the clientX/Y into the SVG content all the time with the screen CTM I'm fairly certain that it is correct. > We got similar problem when develop our Sketsa SVG Editor, we solve the > problem by create using Java shape instead of SVG shape to mimic the SVG > shape to be edited. And manipulate those Java shape then regenerate the > SVG correspond node then replace or just replace the attribute of > original SVG node with the generated one. > > Regards > Tonny Kohar > -- > Sketsa > SVG Graphics Editor > http://www.kiyut.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
