createImageBitmap - add options to specify SVG viewport #1881

Open
jakearchibald opened this Issue Oct 10, 2016 · 0 comments

Projects

None yet

2 participants

@jakearchibald
Contributor

I proposed in #1880 that the layout size of an <img> should set the viewport for SVG in terms of media queries when drawing to a <canvas>, as it lets you control the viewport size independent to drawn pixels.

Since createImageBitmap lets you draw a blob, you lose control over the viewport. Feels like we should add options to specify the viewport, which would fall back to the pattern described in #1880.

createImageBitmap(blob, {
  viewportWidth,
  viewportHeight
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment