aboutsummaryrefslogtreecommitdiff
path: root/core/image.cpp
diff options
context:
space:
mode:
authorAndrii Doroshenko (Xrayez)2017-08-26 14:45:03 +0300
committerAndrii Doroshenko (Xrayez)2017-08-26 15:01:21 +0300
commit4de96518c889886afc87c548728a9df6444403fc (patch)
tree19d3255d7d4ec54eb0e8d121d74355a9756ffba0 /core/image.cpp
parent1894157c9fab05984428d83a743b0fe1d720c80c (diff)
downloadgodot-4de96518c889886afc87c548728a9df6444403fc.tar.gz
godot-4de96518c889886afc87c548728a9df6444403fc.tar.zst
godot-4de96518c889886afc87c548728a9df6444403fc.zip
Diffstat (limited to 'core/image.cpp')
-rw-r--r--core/image.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/image.cpp b/core/image.cpp
index 91572e44e..0f09fbc0c 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -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);