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 Circle as_rect()/as_frect() #2634

Merged
merged 6 commits into from
Feb 12, 2024

Conversation

itzpr3d4t0r
Copy link
Member

Co-authored-by: Emc2356 <63981925+emc2356@users.noreply.github.com>
Co-authored-by: NovialRiptide <35881688+novialriptide@users.noreply.github.com>
Co-authored-by: ScriptLineStudios <scriptlinestudios@protonmail.com>
Co-authored-by: Avaxar <44055981+avaxar@users.noreply.github.com>
@itzpr3d4t0r itzpr3d4t0r added New API This pull request may need extra debate as it adds a new class or function to pygame geometry pygame.geometry labels Dec 25, 2023
@itzpr3d4t0r itzpr3d4t0r requested a review from a team as a code owner December 25, 2023 16:42
@itzpr3d4t0r itzpr3d4t0r mentioned this pull request Dec 25, 2023
87 tasks
Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

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

While I don't hate the current name, should we consider alternatives? Something like get_bounding_rect?

@itzpr3d4t0r
Copy link
Member Author

I mean i tried to go with something short but get_bounding_rect was what we named it for Polygon and then renamed it to as_rect. "get_bounding_rect" describes the method better tho.

Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR 🎉

Left one review comment for your consideration

FRect(circle.x - circle.r, circle.y - circle.r, circle.r * 2, circle.r * 2)

.. ## Circle.as_frect ##

Copy link
Member

Choose a reason for hiding this comment

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

From now on, using versionadded tags may be a good idea. Both these functions need a versionadded 2.5.0 tag.

Actually now that I see this, the entire module is missing it. Maybe one note at the top of this doc saying the module was added in 2.4.0 should be added?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I'll add the versionadded for these methods in this PR and all the others in a separate one.

Copy link
Member

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@MyreMylar MyreMylar merged commit 4fe32e9 into pygame-community:main Feb 12, 2024
30 checks passed
@itzpr3d4t0r itzpr3d4t0r added this to the 2.5.0 milestone Feb 12, 2024
@itzpr3d4t0r itzpr3d4t0r deleted the circle-as-rect branch February 12, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
geometry pygame.geometry New API This pull request may need extra debate as it adds a new class or function to pygame
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants