[whatwg] Size of SVG->Img->Canvas

Boris Zbarsky bzbarsky at MIT.EDU
Thu Nov 17 15:25:33 PST 2011


On 11/18/11 11:56 AM, Gavin Kistner wrote:
> In each of the eight combinations of (img heightwidth/CSS heightwidth/SVG heightwidth) being present or not, what are the intrinsic dimensions of the "image" drawn to the canvas?

The spec defines this, no?  It's cited in 
https://bugzilla.mozilla.org/show_bug.cgi?id=700533

> (Should it always use the raster bitmap created for the img?

What makes you think such a thing even exists?  Gecko doesn't create a 
bitmap for an <img> pointing to an SVG file until actually painting the 
image (just like for an inline <svg> element).

> Should it re-rasterize the sourced SVG at the specified height/width?)

The SVG should be re-rasterized at the width and height of the rectangle 
on the canvas it's being drawn into, I should think.

-Boris



More information about the whatwg mailing list