Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Specify what the viewport should be when drawing SVG to a canvas #1880
I've filed an issue with SVG, as displaying SVG in an image doesn't seem well-defined w3c/svgwg#289
However, we need to define how SVG is drawn to a canvas, particularly in terms of media queries.
canvas2dContext.drawImage(img, x, y, width, height);
Edge uses the layout size of the
At the moment every browser does something different here. Documentation and demos: https://jakearchibald.com/2016/svg-media-queries/#drawing-svg-to-a-canvas