Avoid crashing on "scale(1)" (short for "scale(1, 1)")
The scale function on the transform attribute has a short form, where only the first argument is used. But optimizeTransform would always assume that there were two when checking for the identity scale. Closes: #190 Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
8ddb7d8913
commit
18e57cddae
3 changed files with 19 additions and 1 deletions
5
unittests/transform-scale-is-identity.svg
Normal file
5
unittests/transform-scale-is-identity.svg
Normal 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="scale(1 1) scale(1)"/>
|
||||
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 268 B |
Loading…
Add table
Add a link
Reference in a new issue