xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny Ayers" <danny...@virgilio.it>
Subject getting/setting transforms
Date Fri, 02 Nov 2001 18:44:49 GMT
Hi,
The app that I'm working on needs me to be able to change the values in a
transform,
i.e. in

<g  transform="translate(200, 200)">
stuff
</g>

change the x & y values.

I'm not certain if I was reading the Javadoc correctly, but it looked like I
should have been able to use getTransformToElement(SVGElement element) in
SVGLocatable. However, when I tried this I got the (not entirely helpful!)
exception below. I'm currently hacking a utility to allow me to do what I
want by pulling out the transform attribute as a whole string and messing
with it, but I have a feeling that this kind of operation must have been
covered elsewhere. Has it? Or is there a way of doing what I'm after that
I've not noticed?

java.lang.RuntimeException:  !!! TODO:
SVGTransformableSupport.getTransformToElement()
        at
org.apache.batik.dom.svg.SVGTransformableSupport.getTransformToElement(SVGTr
ansformableSupport.java:85)
        at
org.apache.batik.dom.svg.SVGGraphicsElement.getTransformToElement(SVGGraphic
sElement.java:140)
        at com.isacat.orgn.svg.SvgChart.setId(SvgChart.java:43)
        at
com.isacat.orgn.base.GraphObserverImpl.setId(GraphObserverImpl.java:138)
        at com.isacat.orgn.persist.XMLChart.createTitle(XMLChart.java:159)
        at
com.isacat.orgn.persist.XMLChart.createGraphElement(XMLChart.java:142)
        at com.isacat.orgn.persist.XMLChart.walk(XMLChart.java:99)
        at com.isacat.orgn.persist.XMLChart.load(XMLChart.java:70)
        at com.isacat.orgn.view.SwingView.loadGraph(SwingView.java:79)
        at com.isacat.orgn.view.SwingView.<init>(SwingView.java:63)
        at com.isacat.orgn.view.SwingView.main(SwingView.java:46)
Exception in thread "main"

BTW, I'm mailing this to the dev list directly as even if I've missed
something really obvious from the doc for my particular task (i.e. something
for the user's list), there still remains the question of this exception -
surely the Javadoc should reflect what the method does, rather than what it
would be nice for it to do?

Cheers,
Danny.

---
Danny Ayers
http://www.isacat.net

Alternate email (2001) :
danny666@virgilio.it
danny_ayers@yahoo.co.uk


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


Mime
View raw message