I am trying to use python svgwrite to make an object scale and rotate at the same time. My efforts has so far been to add two consecutive "animateTransform". It does however seem to only take the last action into account, as seen in my example.
import svgwrite
path = [(100,100),(100,200),(200,200),(200,100)]
image = svgwrite.Drawing('test.svg',size=(300,300))
rectangle = image.add(image.polygon(path,id ='polygon',stroke="black",fill="white"))
rectangle.add(image.animateTransform("rotate","transform",id="polygon", from_="0 150 150", to="360 150 150",dur="4s",begin="0s",repeatCount="indefinite"))
rectangle.add(image.animateTransform("scale","transform",id="polygon", from_="0", to="1",dur="4s",begin="0s",repeatCount="indefinite"))
image.save()
display(SVG('test.svg'))
Can anyone help?