mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Add handy get_size() method to Image class
This commit is contained in:
@@ -343,6 +343,11 @@ int Image::get_height() const {
|
||||
return height;
|
||||
}
|
||||
|
||||
Vector2 Image::get_size() const {
|
||||
|
||||
return Vector2(width, height);
|
||||
}
|
||||
|
||||
bool Image::has_mipmaps() const {
|
||||
|
||||
return mipmaps;
|
||||
@@ -2215,6 +2220,7 @@ void Image::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_width"), &Image::get_width);
|
||||
ClassDB::bind_method(D_METHOD("get_height"), &Image::get_height);
|
||||
ClassDB::bind_method(D_METHOD("get_size"), &Image::get_size);
|
||||
ClassDB::bind_method(D_METHOD("has_mipmaps"), &Image::has_mipmaps);
|
||||
ClassDB::bind_method(D_METHOD("get_format"), &Image::get_format);
|
||||
ClassDB::bind_method(D_METHOD("get_data"), &Image::get_data);
|
||||
|
||||
Reference in New Issue
Block a user