Menu

#240 rotate(angle,cx,cy) does not work

open
General (130)
5
2004-08-03
2004-08-03
Anonymous
No

The svg transform command does not work at all

example:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="300" height="200">
<g transform="rotate(45 100 0) ">
<rect x="100" y="18" width="18" height="40"
style="fill:#FF0000"/>
</g>
</svg>

, and the same if you put commas : rotate(45,100,0) "

a work-around is to use translate commands:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="300" height="200">
<g transform="translate(100,0) rotate(45)
translate(-100,0)">
<rect x="100" y="18" width="18" height="40"
style="fill:#FF0000"/>
</g>
</svg>
</svg>

Discussion


Log in to post a comment.