Rotate transforms now optimize angles, and have test coverage.

This commit is contained in:
Johan Sundström 2011-03-12 03:35:13 -08:00
parent 45bc6c0fac
commit 5987a9a271
5 changed files with 52 additions and 14 deletions

View file

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 293 B

Before After
Before After

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="rotate(719.5)"/>
<!-- all rotation angles can be mapped to the shorter range [-90, 270[ -->
</svg>

After

Width:  |  Height:  |  Size: 289 B

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="rotate(-540.0) rotate(0)"/>
<!-- all rotation angles can be mapped to the shorter range [-90, 270[ -->
</svg>

After

Width:  |  Height:  |  Size: 300 B