Skip to content

Commit

Permalink
Merge pull request godotengine#62861 from samdze/image-size-vector2i
Browse files Browse the repository at this point in the history
Make Image.get_size() return a Vector2i instead of a Vector2
  • Loading branch information
akien-mga authored Aug 8, 2022
2 parents 6d94465 + e27c5ac commit c8cdc10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/io/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ int Image::get_height() const {
return height;
}

Vector2 Image::get_size() const {
return Vector2(width, height);
Vector2i Image::get_size() const {
return Vector2i(width, height);
}

bool Image::has_mipmaps() const {
Expand Down
2 changes: 1 addition & 1 deletion core/io/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class Image : public Resource {
public:
int get_width() const; ///< Get image width
int get_height() const; ///< Get image height
Vector2 get_size() const;
Vector2i get_size() const;
bool has_mipmaps() const;
int get_mipmap_count() const;

Expand Down
2 changes: 1 addition & 1 deletion doc/classes/Image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
</description>
</method>
<method name="get_size" qualifiers="const">
<return type="Vector2" />
<return type="Vector2i" />
<description>
Returns the image's size (width and height).
</description>
Expand Down

0 comments on commit c8cdc10

Please sign in to comment.