Browse Source

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

Samuele Zolfanelli 3 years ago
parent
commit
e27c5acedd
3 changed files with 4 additions and 4 deletions
  1. 2 2
      core/io/image.cpp
  2. 1 1
      core/io/image.h
  3. 1 1
      doc/classes/Image.xml

+ 2 - 2
core/io/image.cpp

@@ -416,8 +416,8 @@ int Image::get_height() const {
 	return height;
 	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 {
 bool Image::has_mipmaps() const {

+ 1 - 1
core/io/image.h

@@ -209,7 +209,7 @@ private:
 public:
 public:
 	int get_width() const; ///< Get image width
 	int get_width() const; ///< Get image width
 	int get_height() const; ///< Get image height
 	int get_height() const; ///< Get image height
-	Vector2 get_size() const;
+	Vector2i get_size() const;
 	bool has_mipmaps() const;
 	bool has_mipmaps() const;
 	int get_mipmap_count() const;
 	int get_mipmap_count() const;
 
 

+ 1 - 1
doc/classes/Image.xml

@@ -250,7 +250,7 @@
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_size" qualifiers="const">
 		<method name="get_size" qualifiers="const">
-			<return type="Vector2" />
+			<return type="Vector2i" />
 			<description>
 			<description>
 				Returns the image's size (width and height).
 				Returns the image's size (width and height).
 			</description>
 			</description>