xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baron, Randy {PRG~Basel}" <RANDY.BA...@Roche.COM>
Subject RE: AW: Question with zooming
Date Wed, 30 Apr 2003 16:01:08 GMT
Hi Silke,
  I didn't follow your original post but I did just see one thing that stands out: "!!! TODO:
getScreenCTM()" on the first line of the error message.  I don't know if it will solve your
problem, but it's probably worth pointing out:
  I think if you get this you are using a method that is not implemented yet, at least not
in the version you're using.  In this case, if you diff Batik 1.5beta5 and 1.5beta4 you see
that getScreenCTM is implemented only in beta5.

-Randy



-----Original Message-----
From: "Böhler, Silke" [mailto:Silke.Boehler@enerko.de] 
Sent: Wednesday, April 30, 2003 5:08 PM
To: 'Batik Users'
Subject: AW: AW: Question with zooming

Hello Thomas,

thank you for your help. But I can't execute this svg in the
Squiggle-Browser. I'm getting the following error (I get the same error when
using getScreenCTM in my application; I thought I was using the wrong
method, therefore I posted my request):

java.lang.RuntimeException:  !!! TODO: getScreenCTM()
	at org.apache.batik.dom.svg.SVGLocatableSupport.getScreenCTM(Unknown
Source)
	at org.apache.batik.dom.svg.SVGOMTextElement.getScreenCTM(Unknown
Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.mozilla.javascript.NativeJavaMethod.call(Unknown Source)
	at org.mozilla.javascript.ScriptRuntime.call(Unknown Source)
	at org.mozilla.javascript.gen.c4.call(<SVG>:52)
	at org.mozilla.javascript.optimizer.OptRuntime.callSimple(Unknown
Source)
	at org.mozilla.javascript.gen.c7.call(<SVG>:1)
	at org.mozilla.javascript.gen.c7.exec(<SVG>)
	at org.apache.batik.script.rhino.RhinoInterpreter.evaluate(Unknown
Source)
	at
org.apache.batik.bridge.ScriptingEnvironment.runEventHandler(Unknown Source)
	at
org.apache.batik.bridge.ScriptingEnvironment$ScriptingEventListener.handleEv
ent(Unknown Source)
	at
org.apache.batik.dom.events.EventSupport.fireEventListeners(Unknown Source)
	at org.apache.batik.dom.events.EventSupport.dispatchEvent(Unknown
Source)
	at org.apache.batik.dom.AbstractNode.dispatchEvent(Unknown Source)
	at
org.apache.batik.bridge.BridgeEventSupport$Listener.dispatchMouseEvent(Unkno
wn Source)
	at
org.apache.batik.bridge.BridgeEventSupport$Listener.mouseMoved(Unknown
Source)
	at
org.apache.batik.gvt.event.AWTEventDispatcher.processMouseEvent(Unknown
Source)
	at
org.apache.batik.gvt.event.AWTEventDispatcher.dispatchMouseEvent(Unknown
Source)
	at
org.apache.batik.gvt.event.AWTEventDispatcher.dispatchEvent(Unknown Source)
	at org.apache.batik.gvt.event.AWTEventDispatcher.mouseMoved(Unknown
Source)
	at
org.apache.batik.swing.svg.JSVGComponent$1$MouseMovedRunnable.run(Unknown
Source)
	at org.apache.batik.util.RunnableQueue.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)



Freundliche Grüße,
 
     Silke Böhler
 
_________________________
 
Silke Böhler
 
ENERKO Informatik GmbH
Landstraße 20
52457 Aldenhoven
 
Tel: 0 24 64 / 97 15 19
Fax: 0 24 64 / 97 15 65 19
Mail: silke.boehler@enerko.de
Web: www.enerko.de
_________________________
 
 


-----Ursprüngliche Nachricht-----
Von: Thomas E Deweese [mailto:thomas.deweese@kodak.com] 
Gesendet: Montag, 28. April 2003 14:43
An: Batik Users
Betreff: RE: AW: Question with zooming



Hi Silke,

    Well I would suggest picking up a good SVG book this will explain much
of the context for Batik - Also having a good knowledge of the current DOM
API's is useful (for event handling etc).  As for Batik specifics I'm sorry
to say there is no Batik Handbook.  This mail list is probably the best
place to ask questions.  The Batik Website tries to provide some example
code and some overview information, and of course there is always the source
and the 'example' applications.

    The problem you are having is that you aren't accounting for
currentScale/Translate in the code that is moving the elements (this is a
general SVG problem).  I strongly suggest you use the SVGLocatable interface
to get the "screenCTM" and apply the inverse of that to the currentX/Y in
the mouse events in order to get coordinates that mean something for the
target of your event.  There have been other messages about this in the past
so I suggest searching the archives (Also
samples/tests/spec/scripting/currentSCaleTranslate.svg
shows how to do this in JavaScript - which should be fairly easy to
translate to Java - which I presume is what you are using...).

    Good luck!

>>>>> "LJ" == Lolling, Jan <Jan.Lolling@t-systems.com> writes:

LJ> Hello Silke, What moving do you do ?  scale or translate ?

LJ> I do the same as you. The infra structure for manipulting svg 
LJ> elements is a little bit complex. I have wrote an own package for 
LJ> that thread.

LJ> The worst problem doing this job is dealing with various coordinate 
LJ> systems.  It is better you provide an example svg document an than 
LJ> we can talk about your problems.

LJ> Mit freundlichen Grüssen

LJ> Jan Lolling

LJ> T-Systems Systems Integration Entwicklungszentrum Berlin
LJ> Hausanschrift: Wittestrasse 30H, 13509 Berlin Postanschrift: 
LJ> Postfach 652, 13476 Berlin Tel.: (0 30) 4 35 77-54 44 Fax: (0 30) 4 
LJ> 35 77-53 07 mailto:jan.lolling@t-systems.com Internet: 
LJ> http://www.t-systems.com


LJ> -----Ursprüngliche Nachricht----- Von: "Böhler, Silke" 
LJ> [mailto:Silke.Boehler@enerko.de] Gesendet: Freitag, 25. April 2003 
LJ> 12:36 An: 'batik-users@xml.apache.org' Betreff: Question with 
LJ> zooming


LJ> Hello to all,

LJ> I have some problems with batik.

LJ> First I'm looking for some good explaining stuff or handbook.

LJ> The second is an actual problem I have in developing a java 
LJ> application that uses the batik classes:

LJ>     I load some SVG-Code from an ORACLE-Database to my DOM/SVG-tree. 
LJ> Now I want to move the objects by dragging the mouse. I wrote some 
LJ> eventhandlers and my objects do move. The problem is the scale. When 
LJ> I zoom out of the Image, the object move slower than the mouse, 
LJ> zooming in lets the objects move faster than the mouse. Somehow I 
LJ> can't get the actual zoom-scale.

LJ> Is there anybody that can help me?

LJ> thank you very much,
 
LJ>      Silke Böhler
 
LJ> _________________________
 
LJ> Silke Böhler
 
LJ> ENERKO Informatik GmbH Landstraße 20 52457 Aldenhoven
 
LJ> Tel: 0 24 64 / 97 15 19 Fax: 0 24 64 / 97 15 65 19 Mail: 
LJ> silke.boehler@enerko.de Web: www.enerko.de _________________________
 



LJ> --------------------------------------------------------------------
LJ> -
LJ> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
LJ> additional commands, e-mail: batik-users-help@xml.apache.org

LJ> --------------------------------------------------------------------
LJ> -
LJ> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
LJ> additional commands, e-mail: batik-users-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message