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

Fix rect shifted logic #1398

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Conversation

Player01osu
Copy link
Contributor

Currently, the rect shifted methods offsets itself by the shifted amount on one axis, and by the rect point on the other. The expected behavior is that the rect is shifted on one axis, while the other one stays the same.

This change sets the offset of the other axis to 0, as well as changing the tests to better cover these edge cases.

Shifting rect should not offset by rect point.
@Cobrand Cobrand merged commit 79f9ac7 into Rust-SDL2:master Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants