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

Add 1D rectangle resizing #710

Merged
merged 3 commits into from
Nov 16, 2022
Merged

Conversation

rfuest
Copy link
Member

@rfuest rfuest commented Nov 15, 2022

This PR adds Rectangle::resized_x and Rectangle::resized_y to resize rectangles in one dimension. Some support types and methods are also added.

@rfuest rfuest linked an issue Nov 15, 2022 that may be closed by this pull request
@rfuest rfuest requested a review from jamwaffles November 15, 2022 19:43
@rfuest
Copy link
Member Author

rfuest commented Nov 15, 2022

Oops, I just noticed I didn't used the names we had decided to use in #703.

@rfuest rfuest marked this pull request as draft November 15, 2022 19:45
@rfuest rfuest marked this pull request as ready for review November 15, 2022 19:48
Copy link
Member

@jamwaffles jamwaffles left a comment

Choose a reason for hiding this comment

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

Looks good, just some minor nits and comment suggestions.

core/src/geometry/mod.rs Outdated Show resolved Hide resolved
core/src/primitives/rectangle/mod.rs Outdated Show resolved Hide resolved
core/src/primitives/rectangle/mod.rs Outdated Show resolved Hide resolved
core/src/primitives/rectangle/mod.rs Show resolved Hide resolved
core/src/primitives/rectangle/mod.rs Outdated Show resolved Hide resolved
core/src/primitives/rectangle/mod.rs Outdated Show resolved Hide resolved
core/src/primitives/rectangle/mod.rs Show resolved Hide resolved
@rfuest
Copy link
Member Author

rfuest commented Nov 16, 2022

Thanks for the suggestions to improve the docs, I've applied all of them.

@rfuest rfuest requested a review from jamwaffles November 16, 2022 11:10
Copy link
Member

@jamwaffles jamwaffles left a comment

Choose a reason for hiding this comment

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

Good to go!

@rfuest rfuest merged commit a53157b into embedded-graphics:master Nov 16, 2022
@rfuest rfuest deleted the rectangle-resized branch November 16, 2022 11:25
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.

Add one dimensional variants of Rectangle::resized
2 participants