Skip to content

Add Rect::origin and update Rect::new to specify the origin location of rectangles. #1493

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

Merged
merged 6 commits into from
Jul 12, 2025

Conversation

noahprice-dev
Copy link
Contributor

Answers #1492

The goal is to ensure the origin location is understood and made available to users, as this point is used as a basis for transformations and positioning. Would work in stride with Rect::center.

@Cobrand
Copy link
Member

Cobrand commented Jul 10, 2025

Add a white line before and after the function you added to make it consistent with the rest, otherwise looks good.

src/sdl2/rect.rs Outdated
@@ -12,7 +12,7 @@ use std::ptr;

/// The maximal integer value that can be used for rectangles.
///
/// This value is smaller than strictly needed, but is useful in ensuring that
/// This value is smaller than st isrictly needed, but is useful in ensuring that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

@noahprice-dev
Copy link
Contributor Author

Fixed the typo as well as a formatting issue I introduced in the Changelog file. Apologies for the collateral damage from editing on mobile 😅 .

@Cobrand Cobrand merged commit 5f65b60 into Rust-SDL2:master Jul 12, 2025
16 of 17 checks passed
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.

3 participants