Re: "transform" applied to <svg> element in SVG 2

> Are the browsers correct to use the center of the image as origin for 
> rotation and scaling for case "A"? If the browsers are correct, where is 
> this defined in the SVG 2 specification?
> 
> I read https://www.w3.org/TR/SVG2/coords.html#TransformProperty "8.5. 
> The ‘transform’ property" and 
> https://www.w3.org/TR/SVG2/coords.html#ViewBoxAttribute "8.6. The 
> ‘viewBox’ attribute", but I could not understand how itwould explain 
> the behavior I'm seeing.

I think I found the reason now in CSS with the "transform-origin" property:

https://drafts.csswg.org/css-transforms/#transform-origin-property

For the top-level <svg> element the default is "50% 50%", which explains 
that the origin for scaling and rotating is in the center of the image.

-- 
Stephan

Received on Friday, 13 November 2020 08:14:45 UTC