-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Rename Image's get_rect
to get_region
#66017
Conversation
658d266
to
eb0ccea
Compare
eb0ccea
to
782b90b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR meeting: we agree the current name is bad, our suggestion would be "get_region()", so if you change it to that one, we can merge 🎉
Will do then, after a well-deserved shower! |
ce91a08
to
235b4de
Compare
get_rect
to get_cropped_image
get_rect
to get_region
There we go! |
@Mickeon Docs need to be re-sorted because they're not alphabetical anymore of the change, otherwise looks good to me! |
Also renames its parameter to from "rect" to "region".
235b4de
to
ebf86c9
Compare
Ooops. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved (as discussed in PR meeting)
Thanks! |
Closes godotengine/godot-proposals#5421.
This PR renames Image's
get_rect()
toget_region()
because the former is very vague, in the grand scheme of things. You may have just barely been able to tell what it does by looking at it.Also renames its parameter to from "rect" to "region".
Do note that the reason this name was chosen over
copy_rect()
was because I felt like it didn't quite solve the issue brought up on the proposal. This PR can easily be changed if approved and if there's a clear consensus.