Ho seguito pezzo di codice:Ruota rettangolo intorno al proprio centro in SVG
<svg>
<defs>
<rect id = "myRect"
x = "10"
y = "10"
height = "120"
width = "120"
stroke-width = "2px"
stroke = "red"
fill = "blue" />
</defs>
<g transform = "translate(100,30)">
<use xlink:href = "#myRect" />
</g>
<g transform = "translate(100, 100) rotate(45 ? ?)">
<rect id = "myRect"
x = "10"
y = "10"
height = "120"
width = "120"
stroke-width = "2px"
stroke = "green"
fill = "yellow" />
</g>
</svg>
Quando traduco rettangolo senza rotazione, si sta lavorando bene. Ma quando lo ruoto, volevo ruotarlo attorno al suo asse centrale. Cosa devo passare per ruotare l'attributo?
Avere due elementi con lo stesso id (myRect) causerà problemi. –