-
Notifications
You must be signed in to change notification settings - Fork 84
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
Clean up SVG renderer code #212
Clean up SVG renderer code #212
Conversation
this._context.setTransform(1, 0, 0, 1, 0, 0); | ||
// Set the CSS style of the canvas to the actual measurements. | ||
this._canvas.style.width = bbox.width; | ||
this._canvas.style.height = bbox.height; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying this comment over from the other PR: this was added way back in scratchfoundation/scratch-render@b35f684 and we were unable to determine why, exactly.
We provide [Scratch](https://scratch.mit.edu) free of charge, and want to keep it that way! Please consider making a [donation](https://secure.donationpay.org/scratchfoundation/) to support our continued engineering, design, community, and resource development efforts. Donations of any size are appreciated. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea what changed here--doesn't seem to be missing a newline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, thanks!
Resolves
A step towards #211 and scratchfoundation/scratch-render#594
Proposed Changes
This includes the first 3 commits from #127, with the requested changes made:
SvgRenderer
, and update the documentation and playground to match.SvgRenderer
's properties.SvgRenderer._drawFromImage
.Reason for Changes
These changes make it easier to split
SvgRenderer
up into multiple parts, some of which can be moved into the specific repositories which need them, and allow more complex changes like the ones required by scratchfoundation/scratch-render#594 to be implemented without touching this repo.Test Coverage
All existing tests pass