Re: [svgwg] Layout size for drawing an embedded SVG to a canvas (#784)

This is defined by the HTML spec:

https://html.spec.whatwg.org/multipage/canvas.html#drawing-images:dom-context-2d-drawimage-3

and it says:

> If the sx, sy, sw, and sh arguments are omitted, then they must default to 0, 0, the image's intrinsic width in image pixels, and the image's intrinsic height in image pixels, respectively. If the image has no intrinsic dimensions, then the concrete object size must be used instead, as determined using the CSS "Concrete Object Size Resolution" algorithm, with the specified size having neither a definite width nor height, nor any additional constraints, the object's intrinsic properties being those of the image argument, and the default object size being the size of the output bitmap.

In this case this would resolve to the default object size - i.e the "size of the output bitmap" - so 200x100. See also discussion in #762. (FWIW, the size of the `<img>` should never influence.)

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

Received on Thursday, 2 April 2020 09:03:40 UTC