Re: [svgwg] 7.2 equivalent transform of an SVG viewport is mathematically wrong

I think the correct formula should be:
```
tx = (-vb-x * scale-x) + e-x
ty = (-vb.y * scale-y) + e-y
```

This is saying, for any point (p-x, p-y) in the inner viewbox, the 
steps are:

1. Calculate the transform required to move the point from the origin 
of it's viewport to where it lies:
`p'-x = p-x - vb-x`

2. Then, bring that transformation into the outer viewport by first 
scaling it into that viewports coordinate space, then transform based 
on the inner viewports origin.
p'-x = (p'-x * scale-x) + e-x

The transformation of p is controlled by the x and y attributes, so 
assume p is always (0,0), and that simplifies to:

```
p'-x = (-vb-x * scale-x) + e-x
p'-y = (-vb-y * scale-y) + e-y
```


-- 
GitHub Notification of comment by nikosandronikos
Please view or discuss this issue at 
https://github.com/w3c/svgwg/issues/215#issuecomment-236059814 using 
your GitHub account

Received on Friday, 29 July 2016 00:00:31 UTC