Repository navigation
Make Layer.toImage() accept bounds rather than size - #17129
Merged
Merged
Conversation
It allows callers to account for things like shadows that paint outside the bounds of the widget. #16859
Contributor
Author
|
This includes #17126 |
Hixie
reviewed
Apr 30, 2018
| /// The returned [ui.Image] has uncompressed raw RGBA bytes, in the | ||
| /// dimensions [logicalSize] multiplied by the [pixelRatio]. | ||
| /// The returned [ui.Image] has uncompressed raw RGBA bytes, will be offset | ||
| /// by [bounds.topLeft], and have dimensions of [bounds.size] multiplied by |
Contributor
There was a problem hiding this comment.
unfortunately dartdoc won't like this
Hixie
reviewed
Apr 30, 2018
| transform.translate(-offset.dx, -offset.dy, 0.0); | ||
| final Matrix4 transform = new Matrix4.identity(); | ||
| transform.translate(bounds.left, bounds.top); | ||
| transform.translate(-offset.dx, -offset.dy); |
Contributor
There was a problem hiding this comment.
in theory you could save a couple of cycles by merging these calls
Contributor
|
you accidentally added a binary file to the PR |
Hixie
reviewed
Apr 30, 2018
|
|
||
| @override | ||
| Rect get paintBounds => Offset.zero & size; | ||
| Rect get paintBounds => Offset.zero & (size * configuration.devicePixelRatio); |
Contributor
There was a problem hiding this comment.
we should unit test this change to make sure we don't regress it
Contributor
* Added test of RenderView.paintBounds * Optimized matrix math in Layer.toImage() * Remove accidentally checked-in binary * Fixed dartdoc comments
Contributor
Author
|
All other comments addressed - merging on green |
Contributor
Author
|
Merging on red due to flakes (pub flake and #17137) |
DaveShuckerow
pushed a commit
to DaveShuckerow/flutter
that referenced
this pull request
May 14, 2018
It allows callers to account for things like shadows that paint outside the bounds of the widget. flutter#16859
Contributor
|
I think this issue might be related #17686 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It allows callers to account for things like shadows that paint
outside the bounds of the widget.
#16859