Game Development Reference
In-Depth Information
Now, the SVG standard does much more than simply define shapes, lines, paths,
and colors. The specification also defines groups of elements, whereby one may lit-
erally group a collection of nodes, so that they can possibly all be treated together as
a single unit. There are also transformations, animations, gradients, and even photo
filters, all of which can be applied to the simple primitives that are described previ-
ously. Take a look at the following code:
<svg xmlns="http://www.w3.org/2000/svg"
version="1.1" width="1000" height="1000">
<rect
x="500"
y="500"
width="900"
height="600"
fill="#c00"
stroke="#333"
stroke-width="2"
transform="translate(800, 50)
rotate(55, 0, 0)
scale(0.25)">
<animate
dur="1.5s"
attributeName="x"
values="-50; 100; -50"
repeatCount="indefinite" />
<animate
dur="1.5s"
attributeName="height"
values="50; 300; 50"
repeatCount="indefinite" />
</rect>
</svg>
Search WWH ::




Custom Search