You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Cameron McCormack <ca...@mcc.id.au> on 2006/08/02 07:53:12 UTC

Re: problem with animateMotion in element

Andreas Neumann:
> The airplane does not show up. I tried commenting out the 
> <animateTransform/> element, but this didn't help, so it seems like the 
> problem is somewhere with the animateMotion inside the use element.

'use' elements cannot be animated yet, sorry.

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

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


Re: problem with animateMotion in element

Posted by Cameron McCormack <ca...@mcc.id.au>.
Andreas Neumann:
> F.e. Antoine Quints jumping cubes:
> 
> http://www.carto.net/papers/svg/samples/jumping_cubes.svg

Oh that’s way cool!

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

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


Re: problem with animateMotion in element

Posted by Andreas Neumann <ne...@karto.baug.ethz.ch>.
cool.

I can confirm that some of the <use /> SMIL animation examples already work.

F.e. Antoine Quints jumping cubes:

http://www.carto.net/papers/svg/samples/jumping_cubes.svg

Andreas

Cameron McCormack wrote:

>Hi Andreas.
>
>Andreas Neumann:
>  
>
>>No, I mean […]
>>    
>>
>
>This example now works with the code in SVN:
>
>  <svg xmlns="http://www.w3.org/2000/svg"
>       xmlns:xlink="http://www.w3.org/1999/xlink">
>    <defs>
>      <svg id="s" viewBox="0 0 100 100">
>        <circle cx="0" cy="0" r="100"/>
>      </svg>
>    </defs>
>    <use xlink:href="#s" width="100" height="100">
>      <animate attributeName="width" dur="5s" from="0" to="100"/>
>    </use>
>  </svg>
>
>This too:
>
>  <svg xmlns="http://www.w3.org/2000/svg"
>       xmlns:xlink="http://www.w3.org/1999/xlink" font-size="20">
>    <defs>
>      <circle id="c" cx="0" cy="0" r="100" fill="blue" opacity="0.5">
>        <animate id="a" attributeName="r" dur="5s" from="0" to="50"
>                 fill="freeze"/>
>      </circle>
>    </defs>
>    <use xlink:href="#c" x="100" y="100"/>
>    <use xlink:href="#c" x="200" y="100"/>
>    <use xlink:href="#c" x="150" y="150"/>
>    <text x="150" y="141" fill="white" display="none"
>          text-anchor="middle">
>      <set attributeName="display" begin="a.end" to="inline"/>
>      a.end
>    </text>
>  </svg>
>
>This definitely doesn’t work at the moment:
>
>  <defs>
>    <g id="g"/>
>  </defs>
>  <use xlink:href="#g"/>
>  <animate xlink:href="#g" …/>
>
>This is because internally used elements are handled by cloning the
>subtree.  The first other example works only because the 'animate'
>element gets cloned along with it.  At some point 'use' will have to be
>re-engineered to handle this (and also implement the .instanceRoot and
>.animatedInstanceRoot attributes).
>
>Cameron
>
>  
>


-- 
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093  Zurich, Switzerland

Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


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


Re: problem with animateMotion in element

Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi Andreas.

Andreas Neumann:
> No, I mean […]

This example now works with the code in SVN:

  <svg xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">
    <defs>
      <svg id="s" viewBox="0 0 100 100">
        <circle cx="0" cy="0" r="100"/>
      </svg>
    </defs>
    <use xlink:href="#s" width="100" height="100">
      <animate attributeName="width" dur="5s" from="0" to="100"/>
    </use>
  </svg>

This too:

  <svg xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink" font-size="20">
    <defs>
      <circle id="c" cx="0" cy="0" r="100" fill="blue" opacity="0.5">
        <animate id="a" attributeName="r" dur="5s" from="0" to="50"
                 fill="freeze"/>
      </circle>
    </defs>
    <use xlink:href="#c" x="100" y="100"/>
    <use xlink:href="#c" x="200" y="100"/>
    <use xlink:href="#c" x="150" y="150"/>
    <text x="150" y="141" fill="white" display="none"
          text-anchor="middle">
      <set attributeName="display" begin="a.end" to="inline"/>
      a.end
    </text>
  </svg>

This definitely doesn’t work at the moment:

  <defs>
    <g id="g"/>
  </defs>
  <use xlink:href="#g"/>
  <animate xlink:href="#g" …/>

This is because internally used elements are handled by cloning the
subtree.  The first other example works only because the 'animate'
element gets cloned along with it.  At some point 'use' will have to be
re-engineered to handle this (and also implement the .instanceRoot and
.animatedInstanceRoot attributes).

Cameron

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

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


Re: problem with animateMotion in element

Posted by Andreas Neumann <ne...@karto.baug.ethz.ch>.
>You mean like:
>
>  <defs>
>    <set id="s" …/>
>  </defs>
>  <g>
>    <use xlink:href="#s"/>
>  </g>
>
>Is that allowed?
>
>  
>
No, I mean

<defs>
    <symbol>
       <rect id="myRect"...>
          <animate ... />
       </rect>
    </symbol>
    <path id="myPath">
       <animate ... />
   </path
</defs>

<use xlink:href="#myRect" />
<use xlink:href="#myRect" x="50" y="450" />
<use xlink:href="#myPath" />

>>Are you planning to add SMIL support for <use /> elements in the 
>>upcoming 1.7 release, or are there technical limitations that would 
>>prevent that for the upcoming release?
>>    
>>
>
>No technical limitations I think, I just haven’t done it yet.
>  
>
ok

>>Example where SMIL animation is defined within a <use /> element:
>>http://www.carto.net/papers/svg/samples/path_animation.svg
>>
>>Examples where SMIL animation is defined in the defs and should be 
>>inherited in the <use /> instances:
>>
>>http://www.carto.net/neumann/svg/svgfireworks.html
>>http://www.carto.net/papers/svg/animated_weather_symbols/index.svgz
>>http://www.carto.net/papers/svg/samples/jumping_cubes.svg
>>    
>>
>
>Thanks I will try with these when I get around to implementing it.
>
>  
>
Thanks for having a look at these. Let me know if perhaps I did 
something wrong or if you want to discuss issues. At 
http://www.carto.net/papers/svg/samples/#anim I have listed in which UAs 
the samples work. Currently there is only Opera and ASV that I tested 
for animations. Will add Batik soon.

Thanks,
Andreas

-- 
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093  Zurich, Switzerland

Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


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


Re: problem with animateMotion in element

Posted by Cameron McCormack <ca...@mcc.id.au>.
Andreas Neumann:
> I have a couple of examples out there that have SMIL animations within a 
> <use /> element

That sounds ok.

> or where the animations should be inherited (animation 
> defined in the defs) section and then <use/>d several times.

You mean like:

  <defs>
    <set id="s" …/>
  </defs>
  <g>
    <use xlink:href="#s"/>
  </g>

Is that allowed?

> Are you planning to add SMIL support for <use /> elements in the 
> upcoming 1.7 release, or are there technical limitations that would 
> prevent that for the upcoming release?

No technical limitations I think, I just haven’t done it yet.

> Example where SMIL animation is defined within a <use /> element:
> http://www.carto.net/papers/svg/samples/path_animation.svg
> 
> Examples where SMIL animation is defined in the defs and should be 
> inherited in the <use /> instances:
> 
> http://www.carto.net/neumann/svg/svgfireworks.html
> http://www.carto.net/papers/svg/animated_weather_symbols/index.svgz
> http://www.carto.net/papers/svg/samples/jumping_cubes.svg

Thanks I will try with these when I get around to implementing it.

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

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


Re: problem with animateMotion in element

Posted by Andreas Neumann <ne...@karto.baug.ethz.ch>.
Thanks for the info,

I have a couple of examples out there that have SMIL animations within a 
<use /> element or where the animations should be inherited (animation 
defined in the defs) section and then <use/>d several times.

Are you planning to add SMIL support for <use /> elements in the 
upcoming 1.7 release, or are there technical limitations that would 
prevent that for the upcoming release?

Example where SMIL animation is defined within a <use /> element:
http://www.carto.net/papers/svg/samples/path_animation.svg

Examples where SMIL animation is defined in the defs and should be 
inherited in the <use /> instances:

http://www.carto.net/neumann/svg/svgfireworks.html
http://www.carto.net/papers/svg/animated_weather_symbols/index.svgz
http://www.carto.net/papers/svg/samples/jumping_cubes.svg

Andreas

Cameron McCormack wrote:

>Andreas Neumann:
>  
>
>>The airplane does not show up. I tried commenting out the 
>><animateTransform/> element, but this didn't help, so it seems like the 
>>problem is somewhere with the animateMotion inside the use element.
>>    
>>
>
>'use' elements cannot be animated yet, sorry.
>
>  
>


-- 
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093  Zurich, Switzerland

Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


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