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

Make Image.get_size() return a Vector2i instead of a Vector2 #62861

Merged
merged 1 commit into from
Aug 8, 2022

Conversation

samdze
Copy link
Contributor

@samdze samdze commented Jul 9, 2022

Closes #62856

@samdze samdze requested a review from a team as a code owner July 9, 2022 17:38
@Calinou Calinou added this to the 4.0 milestone Jul 9, 2022
@samdze samdze requested a review from a team as a code owner July 9, 2022 20:08
@fire-forge
Copy link
Contributor

The documentation needs to be updated too:

godot/doc/classes/Image.xml

Lines 252 to 253 in d26442e

<method name="get_size" qualifiers="const">
<return type="Vector2" />

@samdze
Copy link
Contributor Author

samdze commented Jul 9, 2022

Done!

@clayjohn
Copy link
Member

get_size() is used throughout the codebase. This should likely be accompanied by a review of where it is being used and those uses should be updated to Vector2i/Size2i as well

@reduz
Copy link
Member

reduz commented Aug 8, 2022

This is good on its own, but we need to check other simliar places in the codebase that are pre Vector2i

@akien-mga akien-mga merged commit c8cdc10 into godotengine:master Aug 8, 2022
@akien-mga
Copy link
Member

Thanks!

@fire-forge
Copy link
Contributor

This is good on its own, but we need to check other simliar places in the codebase that are pre Vector2i

@reduz I did the rest of the Image and ImageTexture methods in #62871. I'm sure there are many other places that need conversion, but I haven't found any yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image.get_size() should return a Vector2i
6 participants