Hi!

I use Batik 1.5 CVS, jdk140 on Linux Suse7.2

The problem is with the screen coordinates obtained from the Batik
 MouseEvent.

When I click on an element in the viewer I print the screen coordinate:

        event.getScreenX() and event.getScreenY().

I also print the coordinates obtained from the java mouse event:

        Point p = event.getPoint();
        SwingUtilities.convertPointToScreen( p, (Component)event.getSource() );

        p.getX() and p.getY()

These two coordinates should be the same (shouldn't they?)! The fact is that
they aren't. The problem becomes bigger when I zoom the SVG image (with my
own zoom: scaling the renderingtransform of the SVGview). When zooming in,
the coordinates of the batik mousevents seem to become smaller and smaller.

Some debug output:
(no zoom)
     [java] Java screen coords: 0.0, 0.0
     [java] Batik screen coords: 57, 94
     [java] Java screen coords: 1279.0, 1023.0
     [java] Batik screen coords: 909, 760
(200% zoom)
     [java] Java screen coords: 0.0, 0.0
     [java] Batik screen coords: 127, 191
     [java] Java screen coords: 1270.0, 1015.0
     [java] Batik screen coords: 537, 499
(400% zoom)
     [java] Java screen coords: 0.0, 4.0
     [java] Batik screen coords: 157, 210
     [java] Java screen coords: 1279.0, 1023.0
     [java] Batik screen coords: 370, 374

Is this a bug?

Thanks in advance,

Michael.


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

Reply via email to