Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createImageBitmap - add options to specify SVG viewport #1881

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

createImageBitmap - add options to specify SVG viewport #1881

jakearchibald opened this issue Oct 10, 2016 · 0 comments

Comments

@jakearchibald
Copy link
Collaborator

@jakearchibald jakearchibald commented Oct 10, 2016

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.