0
|
1 |
<?xml version="1.0"?>
|
|
2 |
<svg width="5cm" height="3cm" viewBox="0 0 500 300"
|
|
3 |
xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
|
|
4 |
xmlns:xlink="http://www.w3.org/1999/xlink" >
|
|
5 |
<desc>Example animMotion01 - demonstrate motion animation computations</desc>
|
|
6 |
<rect x="1" y="1" width="498" height="298"
|
|
7 |
fill="none" stroke="blue" stroke-width="2" />
|
|
8 |
<!-- Draw the outline of the motion path in blue, along
|
|
9 |
with three small circles at the start, middle and end. -->
|
|
10 |
<path xml:id="path1" d="M100,250 C 100,50 400,50 400,250"
|
|
11 |
fill="none" stroke="blue" stroke-width="7.06" />
|
|
12 |
<circle cx="100" cy="250" r="17.64" fill="blue" />
|
|
13 |
<circle cx="250" cy="100" r="17.64" fill="blue" />
|
|
14 |
<circle cx="400" cy="250" r="17.64" fill="blue" />
|
|
15 |
<!-- Here is a triangle which will be moved about the motion path.
|
|
16 |
It is defined with an upright orientation with the base of
|
|
17 |
the triangle centered horizontally just above the origin. -->
|
|
18 |
<path d="M-25,-12.5 L25,-12.5 L 0,-87.5 z"
|
|
19 |
fill="yellow" stroke="red" stroke-width="7.06" >
|
|
20 |
<!-- Define the motion path animation -->
|
|
21 |
<animateMotion dur="6s" repeatCount="indefinite" rotate="auto" >
|
|
22 |
<mpath xlink:href="#path1"/>
|
|
23 |
</animateMotion>
|
|
24 |
</path>
|
|
25 |
</svg>
|