W3C home > Mailing lists > Public > www-svg@w3.org > October 2010

<animateMotion> specification clarification

From: Shane Stephens <shans@google.com>
Date: Tue, 12 Oct 2010 17:02:18 +1100
Message-ID: <AANLkTi=OLLQ-AhWU4qeJQ=rqFrKwoKjgGPfz5qro+iCs@mail.gmail.com>
To: www-svg@w3.org
What is the correct behaviour of this:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="5cm" height="3cm"  viewBox="0 0 500 300"
xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink" >
  <defs>
    <path id="path1" d="M100,250 C 100,50 400,50 400,250" fill="none"
stroke="blue" stroke-width="7.06"  />
  </defs>
  <svg id="MySymbol">
    <path d="M-25,-12.5 L25,-12.5 L 0,-87.5 z" fill="yellow"
stroke="red" stroke-width="7.06" id="MyTriangle" >
    </path>
    <animateMotion dur="6s" repeatCount="indefinite" rotate="auto" >
      <mpath xlink:href="#path1"/>
    </animateMotion>
  </svg>
</svg>

>From my reading of the specification it seems like it should render
the same as this:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="5cm" height="3cm"  viewBox="0 0 500 300"
xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink" >
  <defs>
    <path id="path1" d="M100,250 C 100,50 400,50 400,250" fill="none"
stroke="blue" stroke-width="7.06"  />
  </defs>
  <svg id="MySymbol">
    <path d="M-25,-12.5 L25,-12.5 L 0,-87.5 z" fill="yellow"
stroke="red" stroke-width="7.06" id="MyTriangle" >
      <animateMotion dur="6s" repeatCount="indefinite" rotate="auto" >
        <mpath xlink:href="#path1"/>
      </animateMotion>
    </path>
  </svg>
</svg>

which is indeed the case with Opera, but not Firefox, Chrome or Safari.

If my reading is correct I'll fix the behaviour in Webkit, but I
wanted to confirm this first.

Thanks,
    -Shane Stephens
Received on Tuesday, 12 October 2010 06:47:38 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:46 GMT