This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I've tried to implement the algorithm described in section "7.2 Computing the equivalent transform of an SVG viewport" and found it to be wrong. > 9. Initialize translate-x to vb-x - e-x. > 10. Initialize translate-y to vb-y - e-y. The purpose of this is to move the viewport origin to the left/top coordinates of the viewBox. I. e. when the viewBox is to the right of the initial origin (vb-x > e-x), the origin needs to be moved to the right: x values get thus smaller (tx < 0). In addition, the last sentence implies that translation is applied after scaling. In this case the translation values also need to be multiplied by the scaling values. Therefore these steps must be > 9. Initialize translate-x to (e-x - vb-x) * scale-x. > 10. Initialize translate-y to (e-y - vb-y) * scale-y. Here are a few test cases to illustrate: x="0" y="0" width="21" height="10" viewBox="11 13 3 2" preserveAspectRatio="none" is equivalent to transform="translate(-77 -65) scale(7 5)" x="0" y="0" width="21" height="10" viewBox="11 13 3 2" preserveAspectRatio="xMinYMin meet" is equivalent to transform="translate(-55 -65) scale(5 5)" x="0" y="0" width="21" height="10" viewBox="11 13 3 2" preserveAspectRatio="xMidYMid meet" is equivalent to transform="translate(-52 -65) scale(5 5)" x="0" y="0" width="21" height="10" viewBox="11 13 3 2" preserveAspectRatio="xMaxYMax meet" is equivalent to transform="translate(-49 -65) scale(5 5)" x="0" y="0" width="21" height="10" viewBox="11 13 3 2" preserveAspectRatio="xMinYMin slice" is equivalent to transform="translate(-77 -91) scale(7 7)" x="0" y="0" width="21" height="10" viewBox="11 13 3 2" preserveAspectRatio="xMidYMid slice" is equivalent to transform="translate(-77 -93) scale(7 7)" x="0" y="0" width="21" height="10" viewBox="11 13 3 2" preserveAspectRatio="xMinYMin slice" is equivalent to transform="translate(-77 -95) scale(7 7)"
We're now using GitHub issues to track SVG spec bugs, I've created a copy of this issue here: https://github.com/w3c/svgwg/issues/215
I got directed here from https://www.w3.org/Graphics/SVG/feedback.html, maybe you should update that page.