Open
Conversation
Contributor
|
@oleg68 I'm not yet certain of how this approach will perform and affect some sample sets. There might be certain tricks done with transparent 1px images in a few sample sets. I'll need to test this carefully to see if there are side effects caused by it. The scaling (both down and up) layout mechanism need a bit of re-designing anyway (for instance to assure that the keyboard layout always will be sane without disturbing blank spaces). Maybe rounding up and never going below 1 px might be a better idea than invalidating... |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Earlier when resising a panel lower it's original size there were assertion failed messages "Image is not valid".
The reason was that some elements had some size equal to 1 pixel. When downscaling the image, the size became 0 that made the bitmap as invalid.
This PR introduces lots of validations when scaling the bitmap. If some size becomes 0, then the GOBitmap instance is marked as invalid, and GetResultBitmap returns nullptr instead of invalid bitmap instance, and GODC::DrawBitmap does not try to draw it.