Hi Cameron,

I don't know if this is a real bug, because I was able to get the
functionality I want. However, it took me a long time to find the cause
/ a solution and the behaviour is a little bit strange.
Having both the "id" for the animation and a transform-Attribute in a
group-Element, the animation doesn't work, giving me an
ArrayIndexOutOfBoundsexception. Spending separate group-Elements for the
transform-action and the id, everything works fine.
I don't know, if this is a bug or if it's not possible to have both
things in one group-Element. Perhaps you can have a view and decide on
your own if it's worth fixing this or not.

Thanks a lot

Florian


Here's the exception I get:

java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
        at java.util.Vector.setElementAt(Unknown Source)
        at
org.apache.batik.anim.values.AnimatableTransformListValue.<init>(Animata
bleTransformListValue.java:69)
        at
org.apache.batik.dom.svg.SVGOMElement.getBaseValue(SVGOMElement.java:712
)
        at
org.apache.batik.dom.svg.SVGGraphicsElement.getUnderlyingValue(SVGGraphi
csElement.java:296)
        at
org.apache.batik.bridge.SVGAnimationElementBridge.getUnderlyingValue(SVG
AnimationElementBridge.java:127)
        at
org.apache.batik.anim.AbstractAnimation.getComposedValue(AbstractAnimati
on.java:145)
        at
org.apache.batik.anim.AnimationEngine.tick(AnimationEngine.java:280)
        at
org.apache.batik.bridge.SVGAnimationEngine.access$2(SVGAnimationEngine.j
ava:1)
        at
org.apache.batik.bridge.SVGAnimationEngine$AnimationTickRunnable.run(SVG
AnimationEngine.java:657)
        at
org.apache.batik.util.RunnableQueue.run(RunnableQueue.java:236)
        at java.lang.Thread.run(Unknown Source)

################################################
This example doesn't work:

<svg contentScriptType="text/ecmascript" width="400px"
xmlns:xlink="http://www.w3.org/1999/xlink"; zoomAndPan="magnify"
contentStyleType="text/css" viewBox="0 0 400.0 400.0" height="400px"
preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg";
version="1.0">
<g transform="translate(-1030,-1030)">
 <g id="animation" transform="translate(1205.5,1222.5) scale(0.1)">
   <g id="l6" transform="translate(-1205.5,-1222.5)">
 <circle r="75" fill-opacity="0.75" style="fill:#0000ff;" cx="1205.5"
cy="1222.5"/>
  </g>
 </g>
</g>
<animateTransform xlink:href="#animation"
    attributeName="transform"
    type="scale"
   values="1;10"
   begin="5s"
   dur="3s"
   repeatCount="1"
   additive="sum"
   calcMode="linear"
   fill="freeze"/>
 </svg>

################################################
This example works without problems:

<svg contentScriptType="text/ecmascript" width="400px"
xmlns:xlink="http://www.w3.org/1999/xlink"; zoomAndPan="magnify"
contentStyleType="text/css" viewBox="0 0 400.0 400.0" height="400px"
preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg";
version="1.0">

<g transform="translate(-1030,-1030)">
 <g transform="translate(1205.5,1222.5) scale(0.1)">
  <g id="animation">
   <g id="l6" transform="translate(-1205.5,-1222.5)">
 <circle r="100" fill-opacity="0.75" style="fill:#0000ff;" cx="1205.5"
cy="1222.5"/>
   </g>
  </g>
 </g>
</g>
<animateTransform xlink:href="#animation"
    attributeName="transform"
    type="scale"
   values="1;10"
   begin="5s"
   dur="3s"
   repeatCount="1"
   additive="sum"
   calcMode="linear"
   fill="freeze"/>
 </svg>




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

Reply via email to