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

Viewport stretch transform was calculated incorrectly #60706

Closed
wants to merge 1 commit into from

Conversation

awsker
Copy link
Contributor

@awsker awsker commented May 2, 2022

Viewport stretch transform was calculated using old size and/or view size 2d override upon size change. Transform scale was calculated using integer divison (Vector2i). There's a case to be made that the method stretch_transform() belongs in the Viewport class since it's already aware of the concept of stretching even though it's only used by the SubViewport. If this was the case, stretch_transform() could be automatically called inside _set_size on the Viewport, instead of relying on the caller to supply a new stretch_transform

…verride upon size change. Transform scale was calculated using integer divison (Vector2i)
@awsker awsker requested a review from a team as a code owner May 2, 2022 09:18
@awsker awsker changed the title Stretch transform was calculated using old size and/or view size 2d o… Viewport stretch transform was calculated incorrectly May 2, 2022
@Calinou Calinou added this to the 4.0 milestone May 2, 2022
@Calinou
Copy link
Member

Calinou commented May 2, 2022

@awsker Does this bug also occur in 3.x?

@awsker
Copy link
Contributor Author

awsker commented May 2, 2022

@awsker Does this bug also occur in 3.x?

No, I discovered this bug when porting my project to alpha4

@akien-mga
Copy link
Member

Superseded by #67331.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants