You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please do not update the README or Change Log, we will do this when we merge your PR.
This PR (delete as applicable)
Adds a new feature
Describe the changes below:
Since BitmapText does not have original size, I set scaleX, scaleY to 1 to get original size,
then calculate new scaleX, scaleY by displayWidth, displayHeight.
Since displayWidth, displayHeight properties does not have setter, I thought it is a new feature.
Because that BitmapText has scaleX, scaleY properties, it can have setter of displayWidth, displayHeight propertie.
But BitmapText does not store original size (size when scale is 1) directly, I have to get this original size first. This solution is not straightforward I agree.
I think I'd rather just store the original size somewhere and use that. Although I guess it will need resetting every time you change the font size, for example.
I think I'd rather just store the original size somewhere and use that. Although I guess it will need resetting every time you change the font size, for example.
Hi @rexrainbow. Thanks for the PR. We have merged it with the master branch. It will be part of the next release. Do test it out and let us know if you encounter any issues.
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
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.
Please do not update the README or Change Log, we will do this when we merge your PR.
This PR (delete as applicable)
Describe the changes below:
Since BitmapText does not have original size, I set scaleX, scaleY to
1to get original size,then calculate new scaleX, scaleY by displayWidth, displayHeight.